diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-07-23 13:10:23 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-07-23 13:10:23 -0400 |
commit | a4e0d9af403d099e751797f6cc69e4a8e2d78ef1 (patch) | |
tree | 6f4afdffe5dbaad7529be987b8c3259a07395031 /arch | |
parent | c60f2b5c1defb6b1345968e1c65c2008c221d57d (diff) | |
parent | c010b2f76c3032e48097a6eef291d8593d5d79a6 (diff) |
Merge ../linux-2.6
Diffstat (limited to 'arch')
275 files changed, 10408 insertions, 3026 deletions
diff --git a/arch/arm/common/dmabounce.c b/arch/arm/common/dmabounce.c index 2744673314b4..dd2947342604 100644 --- a/arch/arm/common/dmabounce.c +++ b/arch/arm/common/dmabounce.c | |||
@@ -554,9 +554,8 @@ dmabounce_register_dev(struct device *dev, unsigned long small_buffer_size, | |||
554 | 554 | ||
555 | device_info = kmalloc(sizeof(struct dmabounce_device_info), GFP_ATOMIC); | 555 | device_info = kmalloc(sizeof(struct dmabounce_device_info), GFP_ATOMIC); |
556 | if (!device_info) { | 556 | if (!device_info) { |
557 | printk(KERN_ERR | 557 | dev_err(dev, |
558 | "Could not allocated dmabounce_device_info for %s", | 558 | "Could not allocated dmabounce_device_info\n"); |
559 | dev->bus_id); | ||
560 | return -ENOMEM; | 559 | return -ENOMEM; |
561 | } | 560 | } |
562 | 561 | ||
@@ -594,8 +593,7 @@ dmabounce_register_dev(struct device *dev, unsigned long small_buffer_size, | |||
594 | 593 | ||
595 | dev->archdata.dmabounce = device_info; | 594 | dev->archdata.dmabounce = device_info; |
596 | 595 | ||
597 | printk(KERN_INFO "dmabounce: registered device %s on %s bus\n", | 596 | dev_info(dev, "dmabounce: registered device\n"); |
598 | dev->bus_id, dev->bus->name); | ||
599 | 597 | ||
600 | return 0; | 598 | return 0; |
601 | 599 | ||
@@ -614,16 +612,15 @@ dmabounce_unregister_dev(struct device *dev) | |||
614 | dev->archdata.dmabounce = NULL; | 612 | dev->archdata.dmabounce = NULL; |
615 | 613 | ||
616 | if (!device_info) { | 614 | if (!device_info) { |
617 | printk(KERN_WARNING | 615 | dev_warn(dev, |
618 | "%s: Never registered with dmabounce but attempting" \ | 616 | "Never registered with dmabounce but attempting" |
619 | "to unregister!\n", dev->bus_id); | 617 | "to unregister!\n"); |
620 | return; | 618 | return; |
621 | } | 619 | } |
622 | 620 | ||
623 | if (!list_empty(&device_info->safe_buffers)) { | 621 | if (!list_empty(&device_info->safe_buffers)) { |
624 | printk(KERN_ERR | 622 | dev_err(dev, |
625 | "%s: Removing from dmabounce with pending buffers!\n", | 623 | "Removing from dmabounce with pending buffers!\n"); |
626 | dev->bus_id); | ||
627 | BUG(); | 624 | BUG(); |
628 | } | 625 | } |
629 | 626 | ||
@@ -639,8 +636,7 @@ dmabounce_unregister_dev(struct device *dev) | |||
639 | 636 | ||
640 | kfree(device_info); | 637 | kfree(device_info); |
641 | 638 | ||
642 | printk(KERN_INFO "dmabounce: device %s on %s bus unregistered\n", | 639 | dev_info(dev, "dmabounce: device unregistered\n"); |
643 | dev->bus_id, dev->bus->name); | ||
644 | } | 640 | } |
645 | 641 | ||
646 | 642 | ||
diff --git a/arch/arm/common/locomo.c b/arch/arm/common/locomo.c index d973c986f721..c3c3a3339049 100644 --- a/arch/arm/common/locomo.c +++ b/arch/arm/common/locomo.c | |||
@@ -543,7 +543,6 @@ locomo_init_one_child(struct locomo *lchip, struct locomo_dev_info *info) | |||
543 | goto out; | 543 | goto out; |
544 | } | 544 | } |
545 | 545 | ||
546 | strncpy(dev->dev.bus_id, info->name, sizeof(dev->dev.bus_id)); | ||
547 | /* | 546 | /* |
548 | * If the parent device has a DMA mask associated with it, | 547 | * If the parent device has a DMA mask associated with it, |
549 | * propagate it down to the children. | 548 | * propagate it down to the children. |
@@ -553,6 +552,7 @@ locomo_init_one_child(struct locomo *lchip, struct locomo_dev_info *info) | |||
553 | dev->dev.dma_mask = &dev->dma_mask; | 552 | dev->dev.dma_mask = &dev->dma_mask; |
554 | } | 553 | } |
555 | 554 | ||
555 | dev_set_name(&dev->dev, "%s", info->name); | ||
556 | dev->devid = info->devid; | 556 | dev->devid = info->devid; |
557 | dev->dev.parent = lchip->dev; | 557 | dev->dev.parent = lchip->dev; |
558 | dev->dev.bus = &locomo_bus_type; | 558 | dev->dev.bus = &locomo_bus_type; |
diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c index eb06d0b2cb74..c8e8f0ea59e1 100644 --- a/arch/arm/common/sa1111.c +++ b/arch/arm/common/sa1111.c | |||
@@ -550,9 +550,7 @@ sa1111_init_one_child(struct sa1111 *sachip, struct resource *parent, | |||
550 | goto out; | 550 | goto out; |
551 | } | 551 | } |
552 | 552 | ||
553 | snprintf(dev->dev.bus_id, sizeof(dev->dev.bus_id), | 553 | dev_set_name(&dev->dev, "%4.4lx", info->offset); |
554 | "%4.4lx", info->offset); | ||
555 | |||
556 | dev->devid = info->devid; | 554 | dev->devid = info->devid; |
557 | dev->dev.parent = sachip->dev; | 555 | dev->dev.parent = sachip->dev; |
558 | dev->dev.bus = &sa1111_bus_type; | 556 | dev->dev.bus = &sa1111_bus_type; |
@@ -560,7 +558,7 @@ sa1111_init_one_child(struct sa1111 *sachip, struct resource *parent, | |||
560 | dev->dev.coherent_dma_mask = sachip->dev->coherent_dma_mask; | 558 | dev->dev.coherent_dma_mask = sachip->dev->coherent_dma_mask; |
561 | dev->res.start = sachip->phys + info->offset; | 559 | dev->res.start = sachip->phys + info->offset; |
562 | dev->res.end = dev->res.start + 511; | 560 | dev->res.end = dev->res.start + 511; |
563 | dev->res.name = dev->dev.bus_id; | 561 | dev->res.name = dev_name(&dev->dev); |
564 | dev->res.flags = IORESOURCE_MEM; | 562 | dev->res.flags = IORESOURCE_MEM; |
565 | dev->mapbase = sachip->base + info->offset; | 563 | dev->mapbase = sachip->base + info->offset; |
566 | dev->skpcr_mask = info->skpcr_mask; | 564 | dev->skpcr_mask = info->skpcr_mask; |
@@ -570,6 +568,7 @@ sa1111_init_one_child(struct sa1111 *sachip, struct resource *parent, | |||
570 | if (ret) { | 568 | if (ret) { |
571 | printk("SA1111: failed to allocate resource for %s\n", | 569 | printk("SA1111: failed to allocate resource for %s\n", |
572 | dev->res.name); | 570 | dev->res.name); |
571 | dev_set_name(&dev->dev, NULL); | ||
573 | kfree(dev); | 572 | kfree(dev); |
574 | goto out; | 573 | goto out; |
575 | } | 574 | } |
@@ -593,7 +592,8 @@ sa1111_init_one_child(struct sa1111 *sachip, struct resource *parent, | |||
593 | if (dev->dma_mask != 0xffffffffUL) { | 592 | if (dev->dma_mask != 0xffffffffUL) { |
594 | ret = dmabounce_register_dev(&dev->dev, 1024, 4096); | 593 | ret = dmabounce_register_dev(&dev->dev, 1024, 4096); |
595 | if (ret) { | 594 | if (ret) { |
596 | printk("SA1111: Failed to register %s with dmabounce", dev->dev.bus_id); | 595 | dev_err(&dev->dev, "SA1111: Failed to register" |
596 | " with dmabounce\n"); | ||
597 | device_unregister(&dev->dev); | 597 | device_unregister(&dev->dev); |
598 | } | 598 | } |
599 | } | 599 | } |
diff --git a/arch/arm/common/scoop.c b/arch/arm/common/scoop.c index bc299b07a6fa..ae39553589dd 100644 --- a/arch/arm/common/scoop.c +++ b/arch/arm/common/scoop.c | |||
@@ -247,7 +247,7 @@ static int __devinit scoop_probe(struct platform_device *pdev) | |||
247 | devptr->gpio.base = -1; | 247 | devptr->gpio.base = -1; |
248 | 248 | ||
249 | if (inf->gpio_base != 0) { | 249 | if (inf->gpio_base != 0) { |
250 | devptr->gpio.label = pdev->dev.bus_id; | 250 | devptr->gpio.label = dev_name(&pdev->dev); |
251 | devptr->gpio.base = inf->gpio_base; | 251 | devptr->gpio.base = inf->gpio_base; |
252 | devptr->gpio.ngpio = 12; /* PA11 = 0, PA12 = 1, etc. up to PA22 = 11 */ | 252 | devptr->gpio.ngpio = 12; /* PA11 = 0, PA12 = 1, etc. up to PA22 = 11 */ |
253 | devptr->gpio.set = scoop_gpio_set; | 253 | devptr->gpio.set = scoop_gpio_set; |
diff --git a/arch/arm/kernel/ecard.c b/arch/arm/kernel/ecard.c index 8bfd299bfe77..f5cfdabcb87d 100644 --- a/arch/arm/kernel/ecard.c +++ b/arch/arm/kernel/ecard.c | |||
@@ -783,7 +783,7 @@ static void ecard_proc_init(void) | |||
783 | 783 | ||
784 | #define ec_set_resource(ec,nr,st,sz) \ | 784 | #define ec_set_resource(ec,nr,st,sz) \ |
785 | do { \ | 785 | do { \ |
786 | (ec)->resource[nr].name = ec->dev.bus_id; \ | 786 | (ec)->resource[nr].name = dev_name(&ec->dev); \ |
787 | (ec)->resource[nr].start = st; \ | 787 | (ec)->resource[nr].start = st; \ |
788 | (ec)->resource[nr].end = (st) + (sz) - 1; \ | 788 | (ec)->resource[nr].end = (st) + (sz) - 1; \ |
789 | (ec)->resource[nr].flags = IORESOURCE_MEM; \ | 789 | (ec)->resource[nr].flags = IORESOURCE_MEM; \ |
@@ -853,8 +853,7 @@ static struct expansion_card *__init ecard_alloc_card(int type, int slot) | |||
853 | for (i = 0; i < ECARD_NUM_RESOURCES; i++) { | 853 | for (i = 0; i < ECARD_NUM_RESOURCES; i++) { |
854 | if (ec->resource[i].flags && | 854 | if (ec->resource[i].flags && |
855 | request_resource(&iomem_resource, &ec->resource[i])) { | 855 | request_resource(&iomem_resource, &ec->resource[i])) { |
856 | printk(KERN_ERR "%s: resource(s) not available\n", | 856 | dev_err(&ec->dev, "resource(s) not available\n"); |
857 | ec->dev.bus_id); | ||
858 | ec->resource[i].end -= ec->resource[i].start; | 857 | ec->resource[i].end -= ec->resource[i].start; |
859 | ec->resource[i].start = 0; | 858 | ec->resource[i].start = 0; |
860 | ec->resource[i].flags = 0; | 859 | ec->resource[i].flags = 0; |
diff --git a/arch/arm/kernel/time.c b/arch/arm/kernel/time.c index cc5145b28e7f..368d171754cf 100644 --- a/arch/arm/kernel/time.c +++ b/arch/arm/kernel/time.c | |||
@@ -130,7 +130,9 @@ static const struct leds_evt_name evt_names[] = { | |||
130 | { "red", led_red_on, led_red_off }, | 130 | { "red", led_red_on, led_red_off }, |
131 | }; | 131 | }; |
132 | 132 | ||
133 | static ssize_t leds_store(struct sys_device *dev, const char *buf, size_t size) | 133 | static ssize_t leds_store(struct sys_device *dev, |
134 | struct sysdev_attribute *attr, | ||
135 | const char *buf, size_t size) | ||
134 | { | 136 | { |
135 | int ret = -EINVAL, len = strcspn(buf, " "); | 137 | int ret = -EINVAL, len = strcspn(buf, " "); |
136 | 138 | ||
diff --git a/arch/arm/mach-integrator/impd1.c b/arch/arm/mach-integrator/impd1.c index 62e653a3ea1a..5a1588cf8242 100644 --- a/arch/arm/mach-integrator/impd1.c +++ b/arch/arm/mach-integrator/impd1.c | |||
@@ -393,9 +393,7 @@ static int impd1_probe(struct lm_device *dev) | |||
393 | if (!d) | 393 | if (!d) |
394 | continue; | 394 | continue; |
395 | 395 | ||
396 | snprintf(d->dev.bus_id, sizeof(d->dev.bus_id), | 396 | dev_set_name(&d->dev, "lm%x:%5.5lx", dev->id, idev->offset >> 12); |
397 | "lm%x:%5.5lx", dev->id, idev->offset >> 12); | ||
398 | |||
399 | d->dev.parent = &dev->dev; | 397 | d->dev.parent = &dev->dev; |
400 | d->res.start = dev->resource.start + idev->offset; | 398 | d->res.start = dev->resource.start + idev->offset; |
401 | d->res.end = d->res.start + SZ_4K - 1; | 399 | d->res.end = d->res.start + SZ_4K - 1; |
@@ -407,8 +405,7 @@ static int impd1_probe(struct lm_device *dev) | |||
407 | 405 | ||
408 | ret = amba_device_register(d, &dev->resource); | 406 | ret = amba_device_register(d, &dev->resource); |
409 | if (ret) { | 407 | if (ret) { |
410 | printk("unable to register device %s: %d\n", | 408 | dev_err(&d->dev, "unable to register device: %d\n"); |
411 | d->dev.bus_id, ret); | ||
412 | kfree(d); | 409 | kfree(d); |
413 | } | 410 | } |
414 | } | 411 | } |
diff --git a/arch/arm/mach-integrator/lm.c b/arch/arm/mach-integrator/lm.c index 622cdc4212dd..f939c5091405 100644 --- a/arch/arm/mach-integrator/lm.c +++ b/arch/arm/mach-integrator/lm.c | |||
@@ -81,8 +81,10 @@ int lm_device_register(struct lm_device *dev) | |||
81 | dev->dev.release = lm_device_release; | 81 | dev->dev.release = lm_device_release; |
82 | dev->dev.bus = &lm_bustype; | 82 | dev->dev.bus = &lm_bustype; |
83 | 83 | ||
84 | snprintf(dev->dev.bus_id, sizeof(dev->dev.bus_id), "lm%d", dev->id); | 84 | ret = dev_set_name(&dev->dev, "lm%d", dev->id); |
85 | dev->resource.name = dev->dev.bus_id; | 85 | if (ret) |
86 | return ret; | ||
87 | dev->resource.name = dev_name(&dev->dev); | ||
86 | 88 | ||
87 | ret = request_resource(&iomem_resource, &dev->resource); | 89 | ret = request_resource(&iomem_resource, &dev->resource); |
88 | if (ret == 0) { | 90 | if (ret == 0) { |
diff --git a/arch/arm/plat-omap/mailbox.c b/arch/arm/plat-omap/mailbox.c index 6f33f58bca45..ff1413eae0b8 100644 --- a/arch/arm/plat-omap/mailbox.c +++ b/arch/arm/plat-omap/mailbox.c | |||
@@ -334,7 +334,7 @@ static int omap_mbox_init(struct omap_mbox *mbox) | |||
334 | } | 334 | } |
335 | 335 | ||
336 | mbox->dev.class = &omap_mbox_class; | 336 | mbox->dev.class = &omap_mbox_class; |
337 | strlcpy(mbox->dev.bus_id, mbox->name, KOBJ_NAME_LEN); | 337 | dev_set_name(&mbox->dev, "%s", mbox->name); |
338 | dev_set_drvdata(&mbox->dev, mbox); | 338 | dev_set_drvdata(&mbox->dev, mbox); |
339 | 339 | ||
340 | ret = device_register(&mbox->dev); | 340 | ret = device_register(&mbox->dev); |
diff --git a/arch/avr32/kernel/cpu.c b/arch/avr32/kernel/cpu.c index b8409caeb23d..e84faffbbeca 100644 --- a/arch/avr32/kernel/cpu.c +++ b/arch/avr32/kernel/cpu.c | |||
@@ -26,14 +26,16 @@ static DEFINE_PER_CPU(struct cpu, cpu_devices); | |||
26 | * XXX: If/when a SMP-capable implementation of AVR32 will ever be | 26 | * XXX: If/when a SMP-capable implementation of AVR32 will ever be |
27 | * made, we must make sure that the code executes on the correct CPU. | 27 | * made, we must make sure that the code executes on the correct CPU. |
28 | */ | 28 | */ |
29 | static ssize_t show_pc0event(struct sys_device *dev, char *buf) | 29 | static ssize_t show_pc0event(struct sys_device *dev, |
30 | struct sysdev_attribute *attr, char *buf) | ||
30 | { | 31 | { |
31 | unsigned long pccr; | 32 | unsigned long pccr; |
32 | 33 | ||
33 | pccr = sysreg_read(PCCR); | 34 | pccr = sysreg_read(PCCR); |
34 | return sprintf(buf, "0x%lx\n", (pccr >> 12) & 0x3f); | 35 | return sprintf(buf, "0x%lx\n", (pccr >> 12) & 0x3f); |
35 | } | 36 | } |
36 | static ssize_t store_pc0event(struct sys_device *dev, const char *buf, | 37 | static ssize_t store_pc0event(struct sys_device *dev, |
38 | struct sysdev_attribute *attr, const char *buf, | ||
37 | size_t count) | 39 | size_t count) |
38 | { | 40 | { |
39 | unsigned long val; | 41 | unsigned long val; |
@@ -46,15 +48,17 @@ static ssize_t store_pc0event(struct sys_device *dev, const char *buf, | |||
46 | sysreg_write(PCCR, val); | 48 | sysreg_write(PCCR, val); |
47 | return count; | 49 | return count; |
48 | } | 50 | } |
49 | static ssize_t show_pc0count(struct sys_device *dev, char *buf) | 51 | static ssize_t show_pc0count(struct sys_device *dev, |
52 | struct sysdev_attribute *attr, char *buf) | ||
50 | { | 53 | { |
51 | unsigned long pcnt0; | 54 | unsigned long pcnt0; |
52 | 55 | ||
53 | pcnt0 = sysreg_read(PCNT0); | 56 | pcnt0 = sysreg_read(PCNT0); |
54 | return sprintf(buf, "%lu\n", pcnt0); | 57 | return sprintf(buf, "%lu\n", pcnt0); |
55 | } | 58 | } |
56 | static ssize_t store_pc0count(struct sys_device *dev, const char *buf, | 59 | static ssize_t store_pc0count(struct sys_device *dev, |
57 | size_t count) | 60 | struct sysdev_attribute *attr, |
61 | const char *buf, size_t count) | ||
58 | { | 62 | { |
59 | unsigned long val; | 63 | unsigned long val; |
60 | char *endp; | 64 | char *endp; |
@@ -67,14 +71,16 @@ static ssize_t store_pc0count(struct sys_device *dev, const char *buf, | |||
67 | return count; | 71 | return count; |
68 | } | 72 | } |
69 | 73 | ||
70 | static ssize_t show_pc1event(struct sys_device *dev, char *buf) | 74 | static ssize_t show_pc1event(struct sys_device *dev, |
75 | struct sysdev_attribute *attr, char *buf) | ||
71 | { | 76 | { |
72 | unsigned long pccr; | 77 | unsigned long pccr; |
73 | 78 | ||
74 | pccr = sysreg_read(PCCR); | 79 | pccr = sysreg_read(PCCR); |
75 | return sprintf(buf, "0x%lx\n", (pccr >> 18) & 0x3f); | 80 | return sprintf(buf, "0x%lx\n", (pccr >> 18) & 0x3f); |
76 | } | 81 | } |
77 | static ssize_t store_pc1event(struct sys_device *dev, const char *buf, | 82 | static ssize_t store_pc1event(struct sys_device *dev, |
83 | struct sysdev_attribute *attr, const char *buf, | ||
78 | size_t count) | 84 | size_t count) |
79 | { | 85 | { |
80 | unsigned long val; | 86 | unsigned long val; |
@@ -87,14 +93,16 @@ static ssize_t store_pc1event(struct sys_device *dev, const char *buf, | |||
87 | sysreg_write(PCCR, val); | 93 | sysreg_write(PCCR, val); |
88 | return count; | 94 | return count; |
89 | } | 95 | } |
90 | static ssize_t show_pc1count(struct sys_device *dev, char *buf) | 96 | static ssize_t show_pc1count(struct sys_device *dev, |
97 | struct sysdev_attribute *attr, char *buf) | ||
91 | { | 98 | { |
92 | unsigned long pcnt1; | 99 | unsigned long pcnt1; |
93 | 100 | ||
94 | pcnt1 = sysreg_read(PCNT1); | 101 | pcnt1 = sysreg_read(PCNT1); |
95 | return sprintf(buf, "%lu\n", pcnt1); | 102 | return sprintf(buf, "%lu\n", pcnt1); |
96 | } | 103 | } |
97 | static ssize_t store_pc1count(struct sys_device *dev, const char *buf, | 104 | static ssize_t store_pc1count(struct sys_device *dev, |
105 | struct sysdev_attribute *attr, const char *buf, | ||
98 | size_t count) | 106 | size_t count) |
99 | { | 107 | { |
100 | unsigned long val; | 108 | unsigned long val; |
@@ -108,14 +116,16 @@ static ssize_t store_pc1count(struct sys_device *dev, const char *buf, | |||
108 | return count; | 116 | return count; |
109 | } | 117 | } |
110 | 118 | ||
111 | static ssize_t show_pccycles(struct sys_device *dev, char *buf) | 119 | static ssize_t show_pccycles(struct sys_device *dev, |
120 | struct sysdev_attribute *attr, char *buf) | ||
112 | { | 121 | { |
113 | unsigned long pccnt; | 122 | unsigned long pccnt; |
114 | 123 | ||
115 | pccnt = sysreg_read(PCCNT); | 124 | pccnt = sysreg_read(PCCNT); |
116 | return sprintf(buf, "%lu\n", pccnt); | 125 | return sprintf(buf, "%lu\n", pccnt); |
117 | } | 126 | } |
118 | static ssize_t store_pccycles(struct sys_device *dev, const char *buf, | 127 | static ssize_t store_pccycles(struct sys_device *dev, |
128 | struct sysdev_attribute *attr, const char *buf, | ||
119 | size_t count) | 129 | size_t count) |
120 | { | 130 | { |
121 | unsigned long val; | 131 | unsigned long val; |
@@ -129,14 +139,16 @@ static ssize_t store_pccycles(struct sys_device *dev, const char *buf, | |||
129 | return count; | 139 | return count; |
130 | } | 140 | } |
131 | 141 | ||
132 | static ssize_t show_pcenable(struct sys_device *dev, char *buf) | 142 | static ssize_t show_pcenable(struct sys_device *dev, |
143 | struct sysdev_attribute *attr, char *buf) | ||
133 | { | 144 | { |
134 | unsigned long pccr; | 145 | unsigned long pccr; |
135 | 146 | ||
136 | pccr = sysreg_read(PCCR); | 147 | pccr = sysreg_read(PCCR); |
137 | return sprintf(buf, "%c\n", (pccr & 1)?'1':'0'); | 148 | return sprintf(buf, "%c\n", (pccr & 1)?'1':'0'); |
138 | } | 149 | } |
139 | static ssize_t store_pcenable(struct sys_device *dev, const char *buf, | 150 | static ssize_t store_pcenable(struct sys_device *dev, |
151 | struct sysdev_attribute *attr, const char *buf, | ||
140 | size_t count) | 152 | size_t count) |
141 | { | 153 | { |
142 | unsigned long pccr, val; | 154 | unsigned long pccr, val; |
diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig index b87634e75f20..b83b8ef84e91 100644 --- a/arch/blackfin/Kconfig +++ b/arch/blackfin/Kconfig | |||
@@ -873,8 +873,8 @@ config HOTPLUG | |||
873 | plugged into slots found on all modern laptop computers. Another | 873 | plugged into slots found on all modern laptop computers. Another |
874 | example, used on modern desktops as well as laptops, is USB. | 874 | example, used on modern desktops as well as laptops, is USB. |
875 | 875 | ||
876 | Enable HOTPLUG and KMOD, and build a modular kernel. Get agent | 876 | Enable HOTPLUG and build a modular kernel. Get agent software |
877 | software (at <http://linux-hotplug.sourceforge.net/>) and install it. | 877 | (from <http://linux-hotplug.sourceforge.net/>) and install it. |
878 | Then your kernel will automatically call out to a user mode "policy | 878 | Then your kernel will automatically call out to a user mode "policy |
879 | agent" (/sbin/hotplug) to load modules and set up software needed | 879 | agent" (/sbin/hotplug) to load modules and set up software needed |
880 | to use devices as you hotplug them. | 880 | to use devices as you hotplug them. |
diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig index 18bcc10903b4..451f2ffb137b 100644 --- a/arch/ia64/Kconfig +++ b/arch/ia64/Kconfig | |||
@@ -540,8 +540,8 @@ config KEXEC | |||
540 | strongly in flux, so no good recommendation can be made. | 540 | strongly in flux, so no good recommendation can be made. |
541 | 541 | ||
542 | config CRASH_DUMP | 542 | config CRASH_DUMP |
543 | bool "kernel crash dumps (EXPERIMENTAL)" | 543 | bool "kernel crash dumps" |
544 | depends on EXPERIMENTAL && IA64_MCA_RECOVERY && !IA64_HP_SIM && (!SMP || HOTPLUG_CPU) | 544 | depends on IA64_MCA_RECOVERY && !IA64_HP_SIM && (!SMP || HOTPLUG_CPU) |
545 | help | 545 | help |
546 | Generate crash dump after being started by kexec. | 546 | Generate crash dump after being started by kexec. |
547 | 547 | ||
diff --git a/arch/ia64/Makefile b/arch/ia64/Makefile index e67ee3f27698..905d25b13d5a 100644 --- a/arch/ia64/Makefile +++ b/arch/ia64/Makefile | |||
@@ -100,3 +100,9 @@ define archhelp | |||
100 | echo ' boot - Build vmlinux and bootloader for Ski simulator' | 100 | echo ' boot - Build vmlinux and bootloader for Ski simulator' |
101 | echo '* unwcheck - Check vmlinux for invalid unwind info' | 101 | echo '* unwcheck - Check vmlinux for invalid unwind info' |
102 | endef | 102 | endef |
103 | |||
104 | archprepare: make_nr_irqs_h FORCE | ||
105 | PHONY += make_nr_irqs_h FORCE | ||
106 | |||
107 | make_nr_irqs_h: FORCE | ||
108 | $(Q)$(MAKE) $(build)=arch/ia64/kernel include/asm-ia64/nr-irqs.h | ||
diff --git a/arch/ia64/kernel/Makefile b/arch/ia64/kernel/Makefile index 13fd10e8699e..87fea11aecb7 100644 --- a/arch/ia64/kernel/Makefile +++ b/arch/ia64/kernel/Makefile | |||
@@ -36,6 +36,8 @@ obj-$(CONFIG_PCI_MSI) += msi_ia64.o | |||
36 | mca_recovery-y += mca_drv.o mca_drv_asm.o | 36 | mca_recovery-y += mca_drv.o mca_drv_asm.o |
37 | obj-$(CONFIG_IA64_MC_ERR_INJECT)+= err_inject.o | 37 | obj-$(CONFIG_IA64_MC_ERR_INJECT)+= err_inject.o |
38 | 38 | ||
39 | obj-$(CONFIG_PARAVIRT) += paravirt.o paravirtentry.o | ||
40 | |||
39 | obj-$(CONFIG_IA64_ESI) += esi.o | 41 | obj-$(CONFIG_IA64_ESI) += esi.o |
40 | ifneq ($(CONFIG_IA64_ESI),) | 42 | ifneq ($(CONFIG_IA64_ESI),) |
41 | obj-y += esi_stub.o # must be in kernel proper | 43 | obj-y += esi_stub.o # must be in kernel proper |
@@ -70,3 +72,45 @@ $(obj)/gate-syms.o: $(obj)/gate.lds $(obj)/gate.o FORCE | |||
70 | # We must build gate.so before we can assemble it. | 72 | # We must build gate.so before we can assemble it. |
71 | # Note: kbuild does not track this dependency due to usage of .incbin | 73 | # Note: kbuild does not track this dependency due to usage of .incbin |
72 | $(obj)/gate-data.o: $(obj)/gate.so | 74 | $(obj)/gate-data.o: $(obj)/gate.so |
75 | |||
76 | # Calculate NR_IRQ = max(IA64_NATIVE_NR_IRQS, XEN_NR_IRQS, ...) based on config | ||
77 | define sed-y | ||
78 | "/^->/{s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; s:->::; p;}" | ||
79 | endef | ||
80 | quiet_cmd_nr_irqs = GEN $@ | ||
81 | define cmd_nr_irqs | ||
82 | (set -e; \ | ||
83 | echo "#ifndef __ASM_NR_IRQS_H__"; \ | ||
84 | echo "#define __ASM_NR_IRQS_H__"; \ | ||
85 | echo "/*"; \ | ||
86 | echo " * DO NOT MODIFY."; \ | ||
87 | echo " *"; \ | ||
88 | echo " * This file was generated by Kbuild"; \ | ||
89 | echo " *"; \ | ||
90 | echo " */"; \ | ||
91 | echo ""; \ | ||
92 | sed -ne $(sed-y) $<; \ | ||
93 | echo ""; \ | ||
94 | echo "#endif" ) > $@ | ||
95 | endef | ||
96 | |||
97 | # We use internal kbuild rules to avoid the "is up to date" message from make | ||
98 | arch/$(SRCARCH)/kernel/nr-irqs.s: $(srctree)/arch/$(SRCARCH)/kernel/nr-irqs.c \ | ||
99 | $(wildcard $(srctree)/include/asm-ia64/*/irq.h) | ||
100 | $(Q)mkdir -p $(dir $@) | ||
101 | $(call if_changed_dep,cc_s_c) | ||
102 | |||
103 | include/asm-ia64/nr-irqs.h: arch/$(SRCARCH)/kernel/nr-irqs.s | ||
104 | $(Q)mkdir -p $(dir $@) | ||
105 | $(call cmd,nr_irqs) | ||
106 | |||
107 | clean-files += $(objtree)/include/asm-ia64/nr-irqs.h | ||
108 | |||
109 | # | ||
110 | # native ivt.S and entry.S | ||
111 | # | ||
112 | ASM_PARAVIRT_OBJS = ivt.o entry.o | ||
113 | define paravirtualized_native | ||
114 | AFLAGS_$(1) += -D__IA64_ASM_PARAVIRTUALIZED_NATIVE | ||
115 | endef | ||
116 | $(foreach obj,$(ASM_PARAVIRT_OBJS),$(eval $(call paravirtualized_native,$(obj)))) | ||
diff --git a/arch/ia64/kernel/acpi.c b/arch/ia64/kernel/acpi.c index 43687cc60dfb..5d1eb7ee2bf6 100644 --- a/arch/ia64/kernel/acpi.c +++ b/arch/ia64/kernel/acpi.c | |||
@@ -774,7 +774,7 @@ int acpi_gsi_to_irq(u32 gsi, unsigned int *irq) | |||
774 | */ | 774 | */ |
775 | #ifdef CONFIG_ACPI_HOTPLUG_CPU | 775 | #ifdef CONFIG_ACPI_HOTPLUG_CPU |
776 | static | 776 | static |
777 | int acpi_map_cpu2node(acpi_handle handle, int cpu, long physid) | 777 | int acpi_map_cpu2node(acpi_handle handle, int cpu, int physid) |
778 | { | 778 | { |
779 | #ifdef CONFIG_ACPI_NUMA | 779 | #ifdef CONFIG_ACPI_NUMA |
780 | int pxm_id; | 780 | int pxm_id; |
@@ -854,8 +854,7 @@ int acpi_map_lsapic(acpi_handle handle, int *pcpu) | |||
854 | union acpi_object *obj; | 854 | union acpi_object *obj; |
855 | struct acpi_madt_local_sapic *lsapic; | 855 | struct acpi_madt_local_sapic *lsapic; |
856 | cpumask_t tmp_map; | 856 | cpumask_t tmp_map; |
857 | long physid; | 857 | int cpu, physid; |
858 | int cpu; | ||
859 | 858 | ||
860 | if (ACPI_FAILURE(acpi_evaluate_object(handle, "_MAT", NULL, &buffer))) | 859 | if (ACPI_FAILURE(acpi_evaluate_object(handle, "_MAT", NULL, &buffer))) |
861 | return -EINVAL; | 860 | return -EINVAL; |
diff --git a/arch/ia64/kernel/cpufreq/acpi-cpufreq.c b/arch/ia64/kernel/cpufreq/acpi-cpufreq.c index b8498ea62068..7b435451b3dc 100644 --- a/arch/ia64/kernel/cpufreq/acpi-cpufreq.c +++ b/arch/ia64/kernel/cpufreq/acpi-cpufreq.c | |||
@@ -51,7 +51,7 @@ processor_set_pstate ( | |||
51 | retval = ia64_pal_set_pstate((u64)value); | 51 | retval = ia64_pal_set_pstate((u64)value); |
52 | 52 | ||
53 | if (retval) { | 53 | if (retval) { |
54 | dprintk("Failed to set freq to 0x%x, with error 0x%x\n", | 54 | dprintk("Failed to set freq to 0x%x, with error 0x%lx\n", |
55 | value, retval); | 55 | value, retval); |
56 | return -ENODEV; | 56 | return -ENODEV; |
57 | } | 57 | } |
@@ -74,7 +74,7 @@ processor_get_pstate ( | |||
74 | 74 | ||
75 | if (retval) | 75 | if (retval) |
76 | dprintk("Failed to get current freq with " | 76 | dprintk("Failed to get current freq with " |
77 | "error 0x%x, idx 0x%x\n", retval, *value); | 77 | "error 0x%lx, idx 0x%x\n", retval, *value); |
78 | 78 | ||
79 | return (int)retval; | 79 | return (int)retval; |
80 | } | 80 | } |
diff --git a/arch/ia64/kernel/entry.S b/arch/ia64/kernel/entry.S index ca2bb95726de..56ab156c48ae 100644 --- a/arch/ia64/kernel/entry.S +++ b/arch/ia64/kernel/entry.S | |||
@@ -23,6 +23,11 @@ | |||
23 | * 11/07/2000 | 23 | * 11/07/2000 |
24 | */ | 24 | */ |
25 | /* | 25 | /* |
26 | * Copyright (c) 2008 Isaku Yamahata <yamahata at valinux co jp> | ||
27 | * VA Linux Systems Japan K.K. | ||
28 | * pv_ops. | ||
29 | */ | ||
30 | /* | ||
26 | * Global (preserved) predicate usage on syscall entry/exit path: | 31 | * Global (preserved) predicate usage on syscall entry/exit path: |
27 | * | 32 | * |
28 | * pKStk: See entry.h. | 33 | * pKStk: See entry.h. |
@@ -45,6 +50,7 @@ | |||
45 | 50 | ||
46 | #include "minstate.h" | 51 | #include "minstate.h" |
47 | 52 | ||
53 | #ifdef __IA64_ASM_PARAVIRTUALIZED_NATIVE | ||
48 | /* | 54 | /* |
49 | * execve() is special because in case of success, we need to | 55 | * execve() is special because in case of success, we need to |
50 | * setup a null register window frame. | 56 | * setup a null register window frame. |
@@ -173,6 +179,7 @@ GLOBAL_ENTRY(sys_clone) | |||
173 | mov rp=loc0 | 179 | mov rp=loc0 |
174 | br.ret.sptk.many rp | 180 | br.ret.sptk.many rp |
175 | END(sys_clone) | 181 | END(sys_clone) |
182 | #endif /* __IA64_ASM_PARAVIRTUALIZED_NATIVE */ | ||
176 | 183 | ||
177 | /* | 184 | /* |
178 | * prev_task <- ia64_switch_to(struct task_struct *next) | 185 | * prev_task <- ia64_switch_to(struct task_struct *next) |
@@ -180,7 +187,7 @@ END(sys_clone) | |||
180 | * called. The code starting at .map relies on this. The rest of the code | 187 | * called. The code starting at .map relies on this. The rest of the code |
181 | * doesn't care about the interrupt masking status. | 188 | * doesn't care about the interrupt masking status. |
182 | */ | 189 | */ |
183 | GLOBAL_ENTRY(ia64_switch_to) | 190 | GLOBAL_ENTRY(__paravirt_switch_to) |
184 | .prologue | 191 | .prologue |
185 | alloc r16=ar.pfs,1,0,0,0 | 192 | alloc r16=ar.pfs,1,0,0,0 |
186 | DO_SAVE_SWITCH_STACK | 193 | DO_SAVE_SWITCH_STACK |
@@ -204,7 +211,7 @@ GLOBAL_ENTRY(ia64_switch_to) | |||
204 | ;; | 211 | ;; |
205 | .done: | 212 | .done: |
206 | ld8 sp=[r21] // load kernel stack pointer of new task | 213 | ld8 sp=[r21] // load kernel stack pointer of new task |
207 | mov IA64_KR(CURRENT)=in0 // update "current" application register | 214 | MOV_TO_KR(CURRENT, in0, r8, r9) // update "current" application register |
208 | mov r8=r13 // return pointer to previously running task | 215 | mov r8=r13 // return pointer to previously running task |
209 | mov r13=in0 // set "current" pointer | 216 | mov r13=in0 // set "current" pointer |
210 | ;; | 217 | ;; |
@@ -216,26 +223,25 @@ GLOBAL_ENTRY(ia64_switch_to) | |||
216 | br.ret.sptk.many rp // boogie on out in new context | 223 | br.ret.sptk.many rp // boogie on out in new context |
217 | 224 | ||
218 | .map: | 225 | .map: |
219 | rsm psr.ic // interrupts (psr.i) are already disabled here | 226 | RSM_PSR_IC(r25) // interrupts (psr.i) are already disabled here |
220 | movl r25=PAGE_KERNEL | 227 | movl r25=PAGE_KERNEL |
221 | ;; | 228 | ;; |
222 | srlz.d | 229 | srlz.d |
223 | or r23=r25,r20 // construct PA | page properties | 230 | or r23=r25,r20 // construct PA | page properties |
224 | mov r25=IA64_GRANULE_SHIFT<<2 | 231 | mov r25=IA64_GRANULE_SHIFT<<2 |
225 | ;; | 232 | ;; |
226 | mov cr.itir=r25 | 233 | MOV_TO_ITIR(p0, r25, r8) |
227 | mov cr.ifa=in0 // VA of next task... | 234 | MOV_TO_IFA(in0, r8) // VA of next task... |
228 | ;; | 235 | ;; |
229 | mov r25=IA64_TR_CURRENT_STACK | 236 | mov r25=IA64_TR_CURRENT_STACK |
230 | mov IA64_KR(CURRENT_STACK)=r26 // remember last page we mapped... | 237 | MOV_TO_KR(CURRENT_STACK, r26, r8, r9) // remember last page we mapped... |
231 | ;; | 238 | ;; |
232 | itr.d dtr[r25]=r23 // wire in new mapping... | 239 | itr.d dtr[r25]=r23 // wire in new mapping... |
233 | ssm psr.ic // reenable the psr.ic bit | 240 | SSM_PSR_IC_AND_SRLZ_D(r8, r9) // reenable the psr.ic bit |
234 | ;; | ||
235 | srlz.d | ||
236 | br.cond.sptk .done | 241 | br.cond.sptk .done |
237 | END(ia64_switch_to) | 242 | END(__paravirt_switch_to) |
238 | 243 | ||
244 | #ifdef __IA64_ASM_PARAVIRTUALIZED_NATIVE | ||
239 | /* | 245 | /* |
240 | * Note that interrupts are enabled during save_switch_stack and load_switch_stack. This | 246 | * Note that interrupts are enabled during save_switch_stack and load_switch_stack. This |
241 | * means that we may get an interrupt with "sp" pointing to the new kernel stack while | 247 | * means that we may get an interrupt with "sp" pointing to the new kernel stack while |
@@ -375,7 +381,7 @@ END(save_switch_stack) | |||
375 | * - b7 holds address to return to | 381 | * - b7 holds address to return to |
376 | * - must not touch r8-r11 | 382 | * - must not touch r8-r11 |
377 | */ | 383 | */ |
378 | ENTRY(load_switch_stack) | 384 | GLOBAL_ENTRY(load_switch_stack) |
379 | .prologue | 385 | .prologue |
380 | .altrp b7 | 386 | .altrp b7 |
381 | 387 | ||
@@ -571,7 +577,7 @@ GLOBAL_ENTRY(ia64_trace_syscall) | |||
571 | .ret3: | 577 | .ret3: |
572 | (pUStk) cmp.eq.unc p6,p0=r0,r0 // p6 <- pUStk | 578 | (pUStk) cmp.eq.unc p6,p0=r0,r0 // p6 <- pUStk |
573 | (pUStk) rsm psr.i // disable interrupts | 579 | (pUStk) rsm psr.i // disable interrupts |
574 | br.cond.sptk .work_pending_syscall_end | 580 | br.cond.sptk ia64_work_pending_syscall_end |
575 | 581 | ||
576 | strace_error: | 582 | strace_error: |
577 | ld8 r3=[r2] // load pt_regs.r8 | 583 | ld8 r3=[r2] // load pt_regs.r8 |
@@ -636,8 +642,17 @@ GLOBAL_ENTRY(ia64_ret_from_syscall) | |||
636 | adds r2=PT(R8)+16,sp // r2 = &pt_regs.r8 | 642 | adds r2=PT(R8)+16,sp // r2 = &pt_regs.r8 |
637 | mov r10=r0 // clear error indication in r10 | 643 | mov r10=r0 // clear error indication in r10 |
638 | (p7) br.cond.spnt handle_syscall_error // handle potential syscall failure | 644 | (p7) br.cond.spnt handle_syscall_error // handle potential syscall failure |
645 | #ifdef CONFIG_PARAVIRT | ||
646 | ;; | ||
647 | br.cond.sptk.few ia64_leave_syscall | ||
648 | ;; | ||
649 | #endif /* CONFIG_PARAVIRT */ | ||
639 | END(ia64_ret_from_syscall) | 650 | END(ia64_ret_from_syscall) |
651 | #ifndef CONFIG_PARAVIRT | ||
640 | // fall through | 652 | // fall through |
653 | #endif | ||
654 | #endif /* __IA64_ASM_PARAVIRTUALIZED_NATIVE */ | ||
655 | |||
641 | /* | 656 | /* |
642 | * ia64_leave_syscall(): Same as ia64_leave_kernel, except that it doesn't | 657 | * ia64_leave_syscall(): Same as ia64_leave_kernel, except that it doesn't |
643 | * need to switch to bank 0 and doesn't restore the scratch registers. | 658 | * need to switch to bank 0 and doesn't restore the scratch registers. |
@@ -682,7 +697,7 @@ END(ia64_ret_from_syscall) | |||
682 | * ar.csd: cleared | 697 | * ar.csd: cleared |
683 | * ar.ssd: cleared | 698 | * ar.ssd: cleared |
684 | */ | 699 | */ |
685 | ENTRY(ia64_leave_syscall) | 700 | GLOBAL_ENTRY(__paravirt_leave_syscall) |
686 | PT_REGS_UNWIND_INFO(0) | 701 | PT_REGS_UNWIND_INFO(0) |
687 | /* | 702 | /* |
688 | * work.need_resched etc. mustn't get changed by this CPU before it returns to | 703 | * work.need_resched etc. mustn't get changed by this CPU before it returns to |
@@ -692,11 +707,11 @@ ENTRY(ia64_leave_syscall) | |||
692 | * extra work. We always check for extra work when returning to user-level. | 707 | * extra work. We always check for extra work when returning to user-level. |
693 | * With CONFIG_PREEMPT, we also check for extra work when the preempt_count | 708 | * With CONFIG_PREEMPT, we also check for extra work when the preempt_count |
694 | * is 0. After extra work processing has been completed, execution | 709 | * is 0. After extra work processing has been completed, execution |
695 | * resumes at .work_processed_syscall with p6 set to 1 if the extra-work-check | 710 | * resumes at ia64_work_processed_syscall with p6 set to 1 if the extra-work-check |
696 | * needs to be redone. | 711 | * needs to be redone. |
697 | */ | 712 | */ |
698 | #ifdef CONFIG_PREEMPT | 713 | #ifdef CONFIG_PREEMPT |
699 | rsm psr.i // disable interrupts | 714 | RSM_PSR_I(p0, r2, r18) // disable interrupts |
700 | cmp.eq pLvSys,p0=r0,r0 // pLvSys=1: leave from syscall | 715 | cmp.eq pLvSys,p0=r0,r0 // pLvSys=1: leave from syscall |
701 | (pKStk) adds r20=TI_PRE_COUNT+IA64_TASK_SIZE,r13 | 716 | (pKStk) adds r20=TI_PRE_COUNT+IA64_TASK_SIZE,r13 |
702 | ;; | 717 | ;; |
@@ -706,11 +721,12 @@ ENTRY(ia64_leave_syscall) | |||
706 | ;; | 721 | ;; |
707 | cmp.eq p6,p0=r21,r0 // p6 <- pUStk || (preempt_count == 0) | 722 | cmp.eq p6,p0=r21,r0 // p6 <- pUStk || (preempt_count == 0) |
708 | #else /* !CONFIG_PREEMPT */ | 723 | #else /* !CONFIG_PREEMPT */ |
709 | (pUStk) rsm psr.i | 724 | RSM_PSR_I(pUStk, r2, r18) |
710 | cmp.eq pLvSys,p0=r0,r0 // pLvSys=1: leave from syscall | 725 | cmp.eq pLvSys,p0=r0,r0 // pLvSys=1: leave from syscall |
711 | (pUStk) cmp.eq.unc p6,p0=r0,r0 // p6 <- pUStk | 726 | (pUStk) cmp.eq.unc p6,p0=r0,r0 // p6 <- pUStk |
712 | #endif | 727 | #endif |
713 | .work_processed_syscall: | 728 | .global __paravirt_work_processed_syscall; |
729 | __paravirt_work_processed_syscall: | ||
714 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING | 730 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING |
715 | adds r2=PT(LOADRS)+16,r12 | 731 | adds r2=PT(LOADRS)+16,r12 |
716 | (pUStk) mov.m r22=ar.itc // fetch time at leave | 732 | (pUStk) mov.m r22=ar.itc // fetch time at leave |
@@ -744,7 +760,7 @@ ENTRY(ia64_leave_syscall) | |||
744 | (pNonSys) break 0 // bug check: we shouldn't be here if pNonSys is TRUE! | 760 | (pNonSys) break 0 // bug check: we shouldn't be here if pNonSys is TRUE! |
745 | ;; | 761 | ;; |
746 | invala // M0|1 invalidate ALAT | 762 | invala // M0|1 invalidate ALAT |
747 | rsm psr.i | psr.ic // M2 turn off interrupts and interruption collection | 763 | RSM_PSR_I_IC(r28, r29, r30) // M2 turn off interrupts and interruption collection |
748 | cmp.eq p9,p0=r0,r0 // A set p9 to indicate that we should restore cr.ifs | 764 | cmp.eq p9,p0=r0,r0 // A set p9 to indicate that we should restore cr.ifs |
749 | 765 | ||
750 | ld8 r29=[r2],16 // M0|1 load cr.ipsr | 766 | ld8 r29=[r2],16 // M0|1 load cr.ipsr |
@@ -765,7 +781,7 @@ ENTRY(ia64_leave_syscall) | |||
765 | ;; | 781 | ;; |
766 | #endif | 782 | #endif |
767 | ld8 r26=[r2],PT(B0)-PT(AR_PFS) // M0|1 load ar.pfs | 783 | ld8 r26=[r2],PT(B0)-PT(AR_PFS) // M0|1 load ar.pfs |
768 | (pKStk) mov r22=psr // M2 read PSR now that interrupts are disabled | 784 | MOV_FROM_PSR(pKStk, r22, r21) // M2 read PSR now that interrupts are disabled |
769 | nop 0 | 785 | nop 0 |
770 | ;; | 786 | ;; |
771 | ld8 r21=[r2],PT(AR_RNAT)-PT(B0) // M0|1 load b0 | 787 | ld8 r21=[r2],PT(AR_RNAT)-PT(B0) // M0|1 load b0 |
@@ -798,7 +814,7 @@ ENTRY(ia64_leave_syscall) | |||
798 | 814 | ||
799 | srlz.d // M0 ensure interruption collection is off (for cover) | 815 | srlz.d // M0 ensure interruption collection is off (for cover) |
800 | shr.u r18=r19,16 // I0|1 get byte size of existing "dirty" partition | 816 | shr.u r18=r19,16 // I0|1 get byte size of existing "dirty" partition |
801 | cover // B add current frame into dirty partition & set cr.ifs | 817 | COVER // B add current frame into dirty partition & set cr.ifs |
802 | ;; | 818 | ;; |
803 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING | 819 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING |
804 | mov r19=ar.bsp // M2 get new backing store pointer | 820 | mov r19=ar.bsp // M2 get new backing store pointer |
@@ -823,8 +839,9 @@ ENTRY(ia64_leave_syscall) | |||
823 | mov.m ar.ssd=r0 // M2 clear ar.ssd | 839 | mov.m ar.ssd=r0 // M2 clear ar.ssd |
824 | mov f11=f0 // F clear f11 | 840 | mov f11=f0 // F clear f11 |
825 | br.cond.sptk.many rbs_switch // B | 841 | br.cond.sptk.many rbs_switch // B |
826 | END(ia64_leave_syscall) | 842 | END(__paravirt_leave_syscall) |
827 | 843 | ||
844 | #ifdef __IA64_ASM_PARAVIRTUALIZED_NATIVE | ||
828 | #ifdef CONFIG_IA32_SUPPORT | 845 | #ifdef CONFIG_IA32_SUPPORT |
829 | GLOBAL_ENTRY(ia64_ret_from_ia32_execve) | 846 | GLOBAL_ENTRY(ia64_ret_from_ia32_execve) |
830 | PT_REGS_UNWIND_INFO(0) | 847 | PT_REGS_UNWIND_INFO(0) |
@@ -835,10 +852,20 @@ GLOBAL_ENTRY(ia64_ret_from_ia32_execve) | |||
835 | st8.spill [r2]=r8 // store return value in slot for r8 and set unat bit | 852 | st8.spill [r2]=r8 // store return value in slot for r8 and set unat bit |
836 | .mem.offset 8,0 | 853 | .mem.offset 8,0 |
837 | st8.spill [r3]=r0 // clear error indication in slot for r10 and set unat bit | 854 | st8.spill [r3]=r0 // clear error indication in slot for r10 and set unat bit |
855 | #ifdef CONFIG_PARAVIRT | ||
856 | ;; | ||
857 | // don't fall through, ia64_leave_kernel may be #define'd | ||
858 | br.cond.sptk.few ia64_leave_kernel | ||
859 | ;; | ||
860 | #endif /* CONFIG_PARAVIRT */ | ||
838 | END(ia64_ret_from_ia32_execve) | 861 | END(ia64_ret_from_ia32_execve) |
862 | #ifndef CONFIG_PARAVIRT | ||
839 | // fall through | 863 | // fall through |
864 | #endif | ||
840 | #endif /* CONFIG_IA32_SUPPORT */ | 865 | #endif /* CONFIG_IA32_SUPPORT */ |
841 | GLOBAL_ENTRY(ia64_leave_kernel) | 866 | #endif /* __IA64_ASM_PARAVIRTUALIZED_NATIVE */ |
867 | |||
868 | GLOBAL_ENTRY(__paravirt_leave_kernel) | ||
842 | PT_REGS_UNWIND_INFO(0) | 869 | PT_REGS_UNWIND_INFO(0) |
843 | /* | 870 | /* |
844 | * work.need_resched etc. mustn't get changed by this CPU before it returns to | 871 | * work.need_resched etc. mustn't get changed by this CPU before it returns to |
@@ -852,7 +879,7 @@ GLOBAL_ENTRY(ia64_leave_kernel) | |||
852 | * needs to be redone. | 879 | * needs to be redone. |
853 | */ | 880 | */ |
854 | #ifdef CONFIG_PREEMPT | 881 | #ifdef CONFIG_PREEMPT |
855 | rsm psr.i // disable interrupts | 882 | RSM_PSR_I(p0, r17, r31) // disable interrupts |
856 | cmp.eq p0,pLvSys=r0,r0 // pLvSys=0: leave from kernel | 883 | cmp.eq p0,pLvSys=r0,r0 // pLvSys=0: leave from kernel |
857 | (pKStk) adds r20=TI_PRE_COUNT+IA64_TASK_SIZE,r13 | 884 | (pKStk) adds r20=TI_PRE_COUNT+IA64_TASK_SIZE,r13 |
858 | ;; | 885 | ;; |
@@ -862,7 +889,7 @@ GLOBAL_ENTRY(ia64_leave_kernel) | |||
862 | ;; | 889 | ;; |
863 | cmp.eq p6,p0=r21,r0 // p6 <- pUStk || (preempt_count == 0) | 890 | cmp.eq p6,p0=r21,r0 // p6 <- pUStk || (preempt_count == 0) |
864 | #else | 891 | #else |
865 | (pUStk) rsm psr.i | 892 | RSM_PSR_I(pUStk, r17, r31) |
866 | cmp.eq p0,pLvSys=r0,r0 // pLvSys=0: leave from kernel | 893 | cmp.eq p0,pLvSys=r0,r0 // pLvSys=0: leave from kernel |
867 | (pUStk) cmp.eq.unc p6,p0=r0,r0 // p6 <- pUStk | 894 | (pUStk) cmp.eq.unc p6,p0=r0,r0 // p6 <- pUStk |
868 | #endif | 895 | #endif |
@@ -910,7 +937,7 @@ GLOBAL_ENTRY(ia64_leave_kernel) | |||
910 | mov ar.csd=r30 | 937 | mov ar.csd=r30 |
911 | mov ar.ssd=r31 | 938 | mov ar.ssd=r31 |
912 | ;; | 939 | ;; |
913 | rsm psr.i | psr.ic // initiate turning off of interrupt and interruption collection | 940 | RSM_PSR_I_IC(r23, r22, r25) // initiate turning off of interrupt and interruption collection |
914 | invala // invalidate ALAT | 941 | invala // invalidate ALAT |
915 | ;; | 942 | ;; |
916 | ld8.fill r22=[r2],24 | 943 | ld8.fill r22=[r2],24 |
@@ -942,7 +969,7 @@ GLOBAL_ENTRY(ia64_leave_kernel) | |||
942 | mov ar.ccv=r15 | 969 | mov ar.ccv=r15 |
943 | ;; | 970 | ;; |
944 | ldf.fill f11=[r2] | 971 | ldf.fill f11=[r2] |
945 | bsw.0 // switch back to bank 0 (no stop bit required beforehand...) | 972 | BSW_0(r2, r3, r15) // switch back to bank 0 (no stop bit required beforehand...) |
946 | ;; | 973 | ;; |
947 | (pUStk) mov r18=IA64_KR(CURRENT)// M2 (12 cycle read latency) | 974 | (pUStk) mov r18=IA64_KR(CURRENT)// M2 (12 cycle read latency) |
948 | adds r16=PT(CR_IPSR)+16,r12 | 975 | adds r16=PT(CR_IPSR)+16,r12 |
@@ -950,12 +977,12 @@ GLOBAL_ENTRY(ia64_leave_kernel) | |||
950 | 977 | ||
951 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING | 978 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING |
952 | .pred.rel.mutex pUStk,pKStk | 979 | .pred.rel.mutex pUStk,pKStk |
953 | (pKStk) mov r22=psr // M2 read PSR now that interrupts are disabled | 980 | MOV_FROM_PSR(pKStk, r22, r29) // M2 read PSR now that interrupts are disabled |
954 | (pUStk) mov.m r22=ar.itc // M fetch time at leave | 981 | (pUStk) mov.m r22=ar.itc // M fetch time at leave |
955 | nop.i 0 | 982 | nop.i 0 |
956 | ;; | 983 | ;; |
957 | #else | 984 | #else |
958 | (pKStk) mov r22=psr // M2 read PSR now that interrupts are disabled | 985 | MOV_FROM_PSR(pKStk, r22, r29) // M2 read PSR now that interrupts are disabled |
959 | nop.i 0 | 986 | nop.i 0 |
960 | nop.i 0 | 987 | nop.i 0 |
961 | ;; | 988 | ;; |
@@ -1027,7 +1054,7 @@ GLOBAL_ENTRY(ia64_leave_kernel) | |||
1027 | * NOTE: alloc, loadrs, and cover can't be predicated. | 1054 | * NOTE: alloc, loadrs, and cover can't be predicated. |
1028 | */ | 1055 | */ |
1029 | (pNonSys) br.cond.dpnt dont_preserve_current_frame | 1056 | (pNonSys) br.cond.dpnt dont_preserve_current_frame |
1030 | cover // add current frame into dirty partition and set cr.ifs | 1057 | COVER // add current frame into dirty partition and set cr.ifs |
1031 | ;; | 1058 | ;; |
1032 | mov r19=ar.bsp // get new backing store pointer | 1059 | mov r19=ar.bsp // get new backing store pointer |
1033 | rbs_switch: | 1060 | rbs_switch: |
@@ -1130,16 +1157,16 @@ skip_rbs_switch: | |||
1130 | (pKStk) dep r29=r22,r29,21,1 // I0 update ipsr.pp with psr.pp | 1157 | (pKStk) dep r29=r22,r29,21,1 // I0 update ipsr.pp with psr.pp |
1131 | (pLvSys)mov r16=r0 // A clear r16 for leave_syscall, no-op otherwise | 1158 | (pLvSys)mov r16=r0 // A clear r16 for leave_syscall, no-op otherwise |
1132 | ;; | 1159 | ;; |
1133 | mov cr.ipsr=r29 // M2 | 1160 | MOV_TO_IPSR(p0, r29, r25) // M2 |
1134 | mov ar.pfs=r26 // I0 | 1161 | mov ar.pfs=r26 // I0 |
1135 | (pLvSys)mov r17=r0 // A clear r17 for leave_syscall, no-op otherwise | 1162 | (pLvSys)mov r17=r0 // A clear r17 for leave_syscall, no-op otherwise |
1136 | 1163 | ||
1137 | (p9) mov cr.ifs=r30 // M2 | 1164 | MOV_TO_IFS(p9, r30, r25)// M2 |
1138 | mov b0=r21 // I0 | 1165 | mov b0=r21 // I0 |
1139 | (pLvSys)mov r18=r0 // A clear r18 for leave_syscall, no-op otherwise | 1166 | (pLvSys)mov r18=r0 // A clear r18 for leave_syscall, no-op otherwise |
1140 | 1167 | ||
1141 | mov ar.fpsr=r20 // M2 | 1168 | mov ar.fpsr=r20 // M2 |
1142 | mov cr.iip=r28 // M2 | 1169 | MOV_TO_IIP(r28, r25) // M2 |
1143 | nop 0 | 1170 | nop 0 |
1144 | ;; | 1171 | ;; |
1145 | (pUStk) mov ar.rnat=r24 // M2 must happen with RSE in lazy mode | 1172 | (pUStk) mov ar.rnat=r24 // M2 must happen with RSE in lazy mode |
@@ -1148,7 +1175,7 @@ skip_rbs_switch: | |||
1148 | 1175 | ||
1149 | mov ar.rsc=r27 // M2 | 1176 | mov ar.rsc=r27 // M2 |
1150 | mov pr=r31,-1 // I0 | 1177 | mov pr=r31,-1 // I0 |
1151 | rfi // B | 1178 | RFI // B |
1152 | 1179 | ||
1153 | /* | 1180 | /* |
1154 | * On entry: | 1181 | * On entry: |
@@ -1174,35 +1201,36 @@ skip_rbs_switch: | |||
1174 | ;; | 1201 | ;; |
1175 | (pKStk) st4 [r20]=r21 | 1202 | (pKStk) st4 [r20]=r21 |
1176 | #endif | 1203 | #endif |
1177 | ssm psr.i // enable interrupts | 1204 | SSM_PSR_I(p0, p6, r2) // enable interrupts |
1178 | br.call.spnt.many rp=schedule | 1205 | br.call.spnt.many rp=schedule |
1179 | .ret9: cmp.eq p6,p0=r0,r0 // p6 <- 1 (re-check) | 1206 | .ret9: cmp.eq p6,p0=r0,r0 // p6 <- 1 (re-check) |
1180 | rsm psr.i // disable interrupts | 1207 | RSM_PSR_I(p0, r2, r20) // disable interrupts |
1181 | ;; | 1208 | ;; |
1182 | #ifdef CONFIG_PREEMPT | 1209 | #ifdef CONFIG_PREEMPT |
1183 | (pKStk) adds r20=TI_PRE_COUNT+IA64_TASK_SIZE,r13 | 1210 | (pKStk) adds r20=TI_PRE_COUNT+IA64_TASK_SIZE,r13 |
1184 | ;; | 1211 | ;; |
1185 | (pKStk) st4 [r20]=r0 // preempt_count() <- 0 | 1212 | (pKStk) st4 [r20]=r0 // preempt_count() <- 0 |
1186 | #endif | 1213 | #endif |
1187 | (pLvSys)br.cond.sptk.few .work_pending_syscall_end | 1214 | (pLvSys)br.cond.sptk.few __paravirt_pending_syscall_end |
1188 | br.cond.sptk.many .work_processed_kernel | 1215 | br.cond.sptk.many .work_processed_kernel |
1189 | 1216 | ||
1190 | .notify: | 1217 | .notify: |
1191 | (pUStk) br.call.spnt.many rp=notify_resume_user | 1218 | (pUStk) br.call.spnt.many rp=notify_resume_user |
1192 | .ret10: cmp.ne p6,p0=r0,r0 // p6 <- 0 (don't re-check) | 1219 | .ret10: cmp.ne p6,p0=r0,r0 // p6 <- 0 (don't re-check) |
1193 | (pLvSys)br.cond.sptk.few .work_pending_syscall_end | 1220 | (pLvSys)br.cond.sptk.few __paravirt_pending_syscall_end |
1194 | br.cond.sptk.many .work_processed_kernel | 1221 | br.cond.sptk.many .work_processed_kernel |
1195 | 1222 | ||
1196 | .work_pending_syscall_end: | 1223 | .global __paravirt_pending_syscall_end; |
1224 | __paravirt_pending_syscall_end: | ||
1197 | adds r2=PT(R8)+16,r12 | 1225 | adds r2=PT(R8)+16,r12 |
1198 | adds r3=PT(R10)+16,r12 | 1226 | adds r3=PT(R10)+16,r12 |
1199 | ;; | 1227 | ;; |
1200 | ld8 r8=[r2] | 1228 | ld8 r8=[r2] |
1201 | ld8 r10=[r3] | 1229 | ld8 r10=[r3] |
1202 | br.cond.sptk.many .work_processed_syscall | 1230 | br.cond.sptk.many __paravirt_work_processed_syscall_target |
1203 | 1231 | END(__paravirt_leave_kernel) | |
1204 | END(ia64_leave_kernel) | ||
1205 | 1232 | ||
1233 | #ifdef __IA64_ASM_PARAVIRTUALIZED_NATIVE | ||
1206 | ENTRY(handle_syscall_error) | 1234 | ENTRY(handle_syscall_error) |
1207 | /* | 1235 | /* |
1208 | * Some system calls (e.g., ptrace, mmap) can return arbitrary values which could | 1236 | * Some system calls (e.g., ptrace, mmap) can return arbitrary values which could |
@@ -1244,7 +1272,7 @@ END(ia64_invoke_schedule_tail) | |||
1244 | * We declare 8 input registers so the system call args get preserved, | 1272 | * We declare 8 input registers so the system call args get preserved, |
1245 | * in case we need to restart a system call. | 1273 | * in case we need to restart a system call. |
1246 | */ | 1274 | */ |
1247 | ENTRY(notify_resume_user) | 1275 | GLOBAL_ENTRY(notify_resume_user) |
1248 | .prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(8) | 1276 | .prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(8) |
1249 | alloc loc1=ar.pfs,8,2,3,0 // preserve all eight input regs in case of syscall restart! | 1277 | alloc loc1=ar.pfs,8,2,3,0 // preserve all eight input regs in case of syscall restart! |
1250 | mov r9=ar.unat | 1278 | mov r9=ar.unat |
@@ -1306,7 +1334,7 @@ ENTRY(sys_rt_sigreturn) | |||
1306 | adds sp=16,sp | 1334 | adds sp=16,sp |
1307 | ;; | 1335 | ;; |
1308 | ld8 r9=[sp] // load new ar.unat | 1336 | ld8 r9=[sp] // load new ar.unat |
1309 | mov.sptk b7=r8,ia64_leave_kernel | 1337 | mov.sptk b7=r8,ia64_native_leave_kernel |
1310 | ;; | 1338 | ;; |
1311 | mov ar.unat=r9 | 1339 | mov ar.unat=r9 |
1312 | br.many b7 | 1340 | br.many b7 |
@@ -1665,3 +1693,4 @@ sys_call_table: | |||
1665 | data8 sys_timerfd_gettime | 1693 | data8 sys_timerfd_gettime |
1666 | 1694 | ||
1667 | .org sys_call_table + 8*NR_syscalls // guard against failures to increase NR_syscalls | 1695 | .org sys_call_table + 8*NR_syscalls // guard against failures to increase NR_syscalls |
1696 | #endif /* __IA64_ASM_PARAVIRTUALIZED_NATIVE */ | ||
diff --git a/arch/ia64/kernel/err_inject.c b/arch/ia64/kernel/err_inject.c index b642648cc2ac..c539c689493b 100644 --- a/arch/ia64/kernel/err_inject.c +++ b/arch/ia64/kernel/err_inject.c | |||
@@ -55,7 +55,8 @@ static u64 resources[NR_CPUS]; | |||
55 | 55 | ||
56 | #define show(name) \ | 56 | #define show(name) \ |
57 | static ssize_t \ | 57 | static ssize_t \ |
58 | show_##name(struct sys_device *dev, char *buf) \ | 58 | show_##name(struct sys_device *dev, struct sysdev_attribute *attr, \ |
59 | char *buf) \ | ||
59 | { \ | 60 | { \ |
60 | u32 cpu=dev->id; \ | 61 | u32 cpu=dev->id; \ |
61 | return sprintf(buf, "%lx\n", name[cpu]); \ | 62 | return sprintf(buf, "%lx\n", name[cpu]); \ |
@@ -63,7 +64,8 @@ show_##name(struct sys_device *dev, char *buf) \ | |||
63 | 64 | ||
64 | #define store(name) \ | 65 | #define store(name) \ |
65 | static ssize_t \ | 66 | static ssize_t \ |
66 | store_##name(struct sys_device *dev, const char *buf, size_t size) \ | 67 | store_##name(struct sys_device *dev, struct sysdev_attribute *attr, \ |
68 | const char *buf, size_t size) \ | ||
67 | { \ | 69 | { \ |
68 | unsigned int cpu=dev->id; \ | 70 | unsigned int cpu=dev->id; \ |
69 | name[cpu] = simple_strtoull(buf, NULL, 16); \ | 71 | name[cpu] = simple_strtoull(buf, NULL, 16); \ |
@@ -76,7 +78,8 @@ show(call_start) | |||
76 | * processor. The cpu number in driver is only used for storing data. | 78 | * processor. The cpu number in driver is only used for storing data. |
77 | */ | 79 | */ |
78 | static ssize_t | 80 | static ssize_t |
79 | store_call_start(struct sys_device *dev, const char *buf, size_t size) | 81 | store_call_start(struct sys_device *dev, struct sysdev_attribute *attr, |
82 | const char *buf, size_t size) | ||
80 | { | 83 | { |
81 | unsigned int cpu=dev->id; | 84 | unsigned int cpu=dev->id; |
82 | unsigned long call_start = simple_strtoull(buf, NULL, 16); | 85 | unsigned long call_start = simple_strtoull(buf, NULL, 16); |
@@ -124,14 +127,16 @@ show(err_type_info) | |||
124 | store(err_type_info) | 127 | store(err_type_info) |
125 | 128 | ||
126 | static ssize_t | 129 | static ssize_t |
127 | show_virtual_to_phys(struct sys_device *dev, char *buf) | 130 | show_virtual_to_phys(struct sys_device *dev, struct sysdev_attribute *attr, |
131 | char *buf) | ||
128 | { | 132 | { |
129 | unsigned int cpu=dev->id; | 133 | unsigned int cpu=dev->id; |
130 | return sprintf(buf, "%lx\n", phys_addr[cpu]); | 134 | return sprintf(buf, "%lx\n", phys_addr[cpu]); |
131 | } | 135 | } |
132 | 136 | ||
133 | static ssize_t | 137 | static ssize_t |
134 | store_virtual_to_phys(struct sys_device *dev, const char *buf, size_t size) | 138 | store_virtual_to_phys(struct sys_device *dev, struct sysdev_attribute *attr, |
139 | const char *buf, size_t size) | ||
135 | { | 140 | { |
136 | unsigned int cpu=dev->id; | 141 | unsigned int cpu=dev->id; |
137 | u64 virt_addr=simple_strtoull(buf, NULL, 16); | 142 | u64 virt_addr=simple_strtoull(buf, NULL, 16); |
@@ -154,7 +159,8 @@ show(err_struct_info) | |||
154 | store(err_struct_info) | 159 | store(err_struct_info) |
155 | 160 | ||
156 | static ssize_t | 161 | static ssize_t |
157 | show_err_data_buffer(struct sys_device *dev, char *buf) | 162 | show_err_data_buffer(struct sys_device *dev, |
163 | struct sysdev_attribute *attr, char *buf) | ||
158 | { | 164 | { |
159 | unsigned int cpu=dev->id; | 165 | unsigned int cpu=dev->id; |
160 | 166 | ||
@@ -165,7 +171,9 @@ show_err_data_buffer(struct sys_device *dev, char *buf) | |||
165 | } | 171 | } |
166 | 172 | ||
167 | static ssize_t | 173 | static ssize_t |
168 | store_err_data_buffer(struct sys_device *dev, const char *buf, size_t size) | 174 | store_err_data_buffer(struct sys_device *dev, |
175 | struct sysdev_attribute *attr, | ||
176 | const char *buf, size_t size) | ||
169 | { | 177 | { |
170 | unsigned int cpu=dev->id; | 178 | unsigned int cpu=dev->id; |
171 | int ret; | 179 | int ret; |
diff --git a/arch/ia64/kernel/head.S b/arch/ia64/kernel/head.S index ddeab4e36fd5..db540e58c783 100644 --- a/arch/ia64/kernel/head.S +++ b/arch/ia64/kernel/head.S | |||
@@ -26,11 +26,14 @@ | |||
26 | #include <asm/mmu_context.h> | 26 | #include <asm/mmu_context.h> |
27 | #include <asm/asm-offsets.h> | 27 | #include <asm/asm-offsets.h> |
28 | #include <asm/pal.h> | 28 | #include <asm/pal.h> |
29 | #include <asm/paravirt.h> | ||
29 | #include <asm/pgtable.h> | 30 | #include <asm/pgtable.h> |
30 | #include <asm/processor.h> | 31 | #include <asm/processor.h> |
31 | #include <asm/ptrace.h> | 32 | #include <asm/ptrace.h> |
32 | #include <asm/system.h> | 33 | #include <asm/system.h> |
33 | #include <asm/mca_asm.h> | 34 | #include <asm/mca_asm.h> |
35 | #include <linux/init.h> | ||
36 | #include <linux/linkage.h> | ||
34 | 37 | ||
35 | #ifdef CONFIG_HOTPLUG_CPU | 38 | #ifdef CONFIG_HOTPLUG_CPU |
36 | #define SAL_PSR_BITS_TO_SET \ | 39 | #define SAL_PSR_BITS_TO_SET \ |
@@ -367,6 +370,44 @@ start_ap: | |||
367 | ;; | 370 | ;; |
368 | (isBP) st8 [r2]=r28 // save the address of the boot param area passed by the bootloader | 371 | (isBP) st8 [r2]=r28 // save the address of the boot param area passed by the bootloader |
369 | 372 | ||
373 | #ifdef CONFIG_PARAVIRT | ||
374 | |||
375 | movl r14=hypervisor_setup_hooks | ||
376 | movl r15=hypervisor_type | ||
377 | mov r16=num_hypervisor_hooks | ||
378 | ;; | ||
379 | ld8 r2=[r15] | ||
380 | ;; | ||
381 | cmp.ltu p7,p0=r2,r16 // array size check | ||
382 | shladd r8=r2,3,r14 | ||
383 | ;; | ||
384 | (p7) ld8 r9=[r8] | ||
385 | ;; | ||
386 | (p7) mov b1=r9 | ||
387 | (p7) cmp.ne.unc p7,p0=r9,r0 // no actual branch to NULL | ||
388 | ;; | ||
389 | (p7) br.call.sptk.many rp=b1 | ||
390 | |||
391 | __INITDATA | ||
392 | |||
393 | default_setup_hook = 0 // Currently nothing needs to be done. | ||
394 | |||
395 | .weak xen_setup_hook | ||
396 | |||
397 | .global hypervisor_type | ||
398 | hypervisor_type: | ||
399 | data8 PARAVIRT_HYPERVISOR_TYPE_DEFAULT | ||
400 | |||
401 | // must have the same order with PARAVIRT_HYPERVISOR_TYPE_xxx | ||
402 | |||
403 | hypervisor_setup_hooks: | ||
404 | data8 default_setup_hook | ||
405 | data8 xen_setup_hook | ||
406 | num_hypervisor_hooks = (. - hypervisor_setup_hooks) / 8 | ||
407 | .previous | ||
408 | |||
409 | #endif | ||
410 | |||
370 | #ifdef CONFIG_SMP | 411 | #ifdef CONFIG_SMP |
371 | (isAP) br.call.sptk.many rp=start_secondary | 412 | (isAP) br.call.sptk.many rp=start_secondary |
372 | .ret0: | 413 | .ret0: |
diff --git a/arch/ia64/kernel/iosapic.c b/arch/ia64/kernel/iosapic.c index 39752cdef6ff..3bc2fa64f87f 100644 --- a/arch/ia64/kernel/iosapic.c +++ b/arch/ia64/kernel/iosapic.c | |||
@@ -585,6 +585,15 @@ static inline int irq_is_shared (int irq) | |||
585 | return (iosapic_intr_info[irq].count > 1); | 585 | return (iosapic_intr_info[irq].count > 1); |
586 | } | 586 | } |
587 | 587 | ||
588 | struct irq_chip* | ||
589 | ia64_native_iosapic_get_irq_chip(unsigned long trigger) | ||
590 | { | ||
591 | if (trigger == IOSAPIC_EDGE) | ||
592 | return &irq_type_iosapic_edge; | ||
593 | else | ||
594 | return &irq_type_iosapic_level; | ||
595 | } | ||
596 | |||
588 | static int | 597 | static int |
589 | register_intr (unsigned int gsi, int irq, unsigned char delivery, | 598 | register_intr (unsigned int gsi, int irq, unsigned char delivery, |
590 | unsigned long polarity, unsigned long trigger) | 599 | unsigned long polarity, unsigned long trigger) |
@@ -635,13 +644,10 @@ register_intr (unsigned int gsi, int irq, unsigned char delivery, | |||
635 | iosapic_intr_info[irq].dmode = delivery; | 644 | iosapic_intr_info[irq].dmode = delivery; |
636 | iosapic_intr_info[irq].trigger = trigger; | 645 | iosapic_intr_info[irq].trigger = trigger; |
637 | 646 | ||
638 | if (trigger == IOSAPIC_EDGE) | 647 | irq_type = iosapic_get_irq_chip(trigger); |
639 | irq_type = &irq_type_iosapic_edge; | ||
640 | else | ||
641 | irq_type = &irq_type_iosapic_level; | ||
642 | 648 | ||
643 | idesc = irq_desc + irq; | 649 | idesc = irq_desc + irq; |
644 | if (idesc->chip != irq_type) { | 650 | if (irq_type != NULL && idesc->chip != irq_type) { |
645 | if (idesc->chip != &no_irq_type) | 651 | if (idesc->chip != &no_irq_type) |
646 | printk(KERN_WARNING | 652 | printk(KERN_WARNING |
647 | "%s: changing vector %d from %s to %s\n", | 653 | "%s: changing vector %d from %s to %s\n", |
@@ -974,6 +980,22 @@ iosapic_override_isa_irq (unsigned int isa_irq, unsigned int gsi, | |||
974 | } | 980 | } |
975 | 981 | ||
976 | void __init | 982 | void __init |
983 | ia64_native_iosapic_pcat_compat_init(void) | ||
984 | { | ||
985 | if (pcat_compat) { | ||
986 | /* | ||
987 | * Disable the compatibility mode interrupts (8259 style), | ||
988 | * needs IN/OUT support enabled. | ||
989 | */ | ||
990 | printk(KERN_INFO | ||
991 | "%s: Disabling PC-AT compatible 8259 interrupts\n", | ||
992 | __func__); | ||
993 | outb(0xff, 0xA1); | ||
994 | outb(0xff, 0x21); | ||
995 | } | ||
996 | } | ||
997 | |||
998 | void __init | ||
977 | iosapic_system_init (int system_pcat_compat) | 999 | iosapic_system_init (int system_pcat_compat) |
978 | { | 1000 | { |
979 | int irq; | 1001 | int irq; |
@@ -987,17 +1009,8 @@ iosapic_system_init (int system_pcat_compat) | |||
987 | } | 1009 | } |
988 | 1010 | ||
989 | pcat_compat = system_pcat_compat; | 1011 | pcat_compat = system_pcat_compat; |
990 | if (pcat_compat) { | 1012 | if (pcat_compat) |
991 | /* | 1013 | iosapic_pcat_compat_init(); |
992 | * Disable the compatibility mode interrupts (8259 style), | ||
993 | * needs IN/OUT support enabled. | ||
994 | */ | ||
995 | printk(KERN_INFO | ||
996 | "%s: Disabling PC-AT compatible 8259 interrupts\n", | ||
997 | __func__); | ||
998 | outb(0xff, 0xA1); | ||
999 | outb(0xff, 0x21); | ||
1000 | } | ||
1001 | } | 1014 | } |
1002 | 1015 | ||
1003 | static inline int | 1016 | static inline int |
diff --git a/arch/ia64/kernel/irq_ia64.c b/arch/ia64/kernel/irq_ia64.c index 5538471e8d68..28d3d483db92 100644 --- a/arch/ia64/kernel/irq_ia64.c +++ b/arch/ia64/kernel/irq_ia64.c | |||
@@ -196,7 +196,7 @@ static void clear_irq_vector(int irq) | |||
196 | } | 196 | } |
197 | 197 | ||
198 | int | 198 | int |
199 | assign_irq_vector (int irq) | 199 | ia64_native_assign_irq_vector (int irq) |
200 | { | 200 | { |
201 | unsigned long flags; | 201 | unsigned long flags; |
202 | int vector, cpu; | 202 | int vector, cpu; |
@@ -222,7 +222,7 @@ assign_irq_vector (int irq) | |||
222 | } | 222 | } |
223 | 223 | ||
224 | void | 224 | void |
225 | free_irq_vector (int vector) | 225 | ia64_native_free_irq_vector (int vector) |
226 | { | 226 | { |
227 | if (vector < IA64_FIRST_DEVICE_VECTOR || | 227 | if (vector < IA64_FIRST_DEVICE_VECTOR || |
228 | vector > IA64_LAST_DEVICE_VECTOR) | 228 | vector > IA64_LAST_DEVICE_VECTOR) |
@@ -600,7 +600,6 @@ static irqreturn_t dummy_handler (int irq, void *dev_id) | |||
600 | { | 600 | { |
601 | BUG(); | 601 | BUG(); |
602 | } | 602 | } |
603 | extern irqreturn_t handle_IPI (int irq, void *dev_id); | ||
604 | 603 | ||
605 | static struct irqaction ipi_irqaction = { | 604 | static struct irqaction ipi_irqaction = { |
606 | .handler = handle_IPI, | 605 | .handler = handle_IPI, |
@@ -623,7 +622,7 @@ static struct irqaction tlb_irqaction = { | |||
623 | #endif | 622 | #endif |
624 | 623 | ||
625 | void | 624 | void |
626 | register_percpu_irq (ia64_vector vec, struct irqaction *action) | 625 | ia64_native_register_percpu_irq (ia64_vector vec, struct irqaction *action) |
627 | { | 626 | { |
628 | irq_desc_t *desc; | 627 | irq_desc_t *desc; |
629 | unsigned int irq; | 628 | unsigned int irq; |
@@ -638,13 +637,21 @@ register_percpu_irq (ia64_vector vec, struct irqaction *action) | |||
638 | } | 637 | } |
639 | 638 | ||
640 | void __init | 639 | void __init |
641 | init_IRQ (void) | 640 | ia64_native_register_ipi(void) |
642 | { | 641 | { |
643 | register_percpu_irq(IA64_SPURIOUS_INT_VECTOR, NULL); | ||
644 | #ifdef CONFIG_SMP | 642 | #ifdef CONFIG_SMP |
645 | register_percpu_irq(IA64_IPI_VECTOR, &ipi_irqaction); | 643 | register_percpu_irq(IA64_IPI_VECTOR, &ipi_irqaction); |
646 | register_percpu_irq(IA64_IPI_RESCHEDULE, &resched_irqaction); | 644 | register_percpu_irq(IA64_IPI_RESCHEDULE, &resched_irqaction); |
647 | register_percpu_irq(IA64_IPI_LOCAL_TLB_FLUSH, &tlb_irqaction); | 645 | register_percpu_irq(IA64_IPI_LOCAL_TLB_FLUSH, &tlb_irqaction); |
646 | #endif | ||
647 | } | ||
648 | |||
649 | void __init | ||
650 | init_IRQ (void) | ||
651 | { | ||
652 | ia64_register_ipi(); | ||
653 | register_percpu_irq(IA64_SPURIOUS_INT_VECTOR, NULL); | ||
654 | #ifdef CONFIG_SMP | ||
648 | #if defined(CONFIG_IA64_GENERIC) || defined(CONFIG_IA64_DIG) | 655 | #if defined(CONFIG_IA64_GENERIC) || defined(CONFIG_IA64_DIG) |
649 | if (vector_domain_type != VECTOR_DOMAIN_NONE) { | 656 | if (vector_domain_type != VECTOR_DOMAIN_NONE) { |
650 | BUG_ON(IA64_FIRST_DEVICE_VECTOR != IA64_IRQ_MOVE_VECTOR); | 657 | BUG_ON(IA64_FIRST_DEVICE_VECTOR != IA64_IRQ_MOVE_VECTOR); |
diff --git a/arch/ia64/kernel/ivt.S b/arch/ia64/kernel/ivt.S index 80b44ea052d7..c39627df3cde 100644 --- a/arch/ia64/kernel/ivt.S +++ b/arch/ia64/kernel/ivt.S | |||
@@ -12,6 +12,14 @@ | |||
12 | * | 12 | * |
13 | * 00/08/23 Asit Mallick <asit.k.mallick@intel.com> TLB handling for SMP | 13 | * 00/08/23 Asit Mallick <asit.k.mallick@intel.com> TLB handling for SMP |
14 | * 00/12/20 David Mosberger-Tang <davidm@hpl.hp.com> DTLB/ITLB handler now uses virtual PT. | 14 | * 00/12/20 David Mosberger-Tang <davidm@hpl.hp.com> DTLB/ITLB handler now uses virtual PT. |
15 | * | ||
16 | * Copyright (C) 2005 Hewlett-Packard Co | ||
17 | * Dan Magenheimer <dan.magenheimer@hp.com> | ||
18 | * Xen paravirtualization | ||
19 | * Copyright (c) 2008 Isaku Yamahata <yamahata at valinux co jp> | ||
20 | * VA Linux Systems Japan K.K. | ||
21 | * pv_ops. | ||
22 | * Yaozu (Eddie) Dong <eddie.dong@intel.com> | ||
15 | */ | 23 | */ |
16 | /* | 24 | /* |
17 | * This file defines the interruption vector table used by the CPU. | 25 | * This file defines the interruption vector table used by the CPU. |
@@ -102,13 +110,13 @@ ENTRY(vhpt_miss) | |||
102 | * - the faulting virtual address uses unimplemented address bits | 110 | * - the faulting virtual address uses unimplemented address bits |
103 | * - the faulting virtual address has no valid page table mapping | 111 | * - the faulting virtual address has no valid page table mapping |
104 | */ | 112 | */ |
105 | mov r16=cr.ifa // get address that caused the TLB miss | 113 | MOV_FROM_IFA(r16) // get address that caused the TLB miss |
106 | #ifdef CONFIG_HUGETLB_PAGE | 114 | #ifdef CONFIG_HUGETLB_PAGE |
107 | movl r18=PAGE_SHIFT | 115 | movl r18=PAGE_SHIFT |
108 | mov r25=cr.itir | 116 | MOV_FROM_ITIR(r25) |
109 | #endif | 117 | #endif |
110 | ;; | 118 | ;; |
111 | rsm psr.dt // use physical addressing for data | 119 | RSM_PSR_DT // use physical addressing for data |
112 | mov r31=pr // save the predicate registers | 120 | mov r31=pr // save the predicate registers |
113 | mov r19=IA64_KR(PT_BASE) // get page table base address | 121 | mov r19=IA64_KR(PT_BASE) // get page table base address |
114 | shl r21=r16,3 // shift bit 60 into sign bit | 122 | shl r21=r16,3 // shift bit 60 into sign bit |
@@ -168,21 +176,21 @@ ENTRY(vhpt_miss) | |||
168 | dep r21=r19,r20,3,(PAGE_SHIFT-3) // r21=pte_offset(pmd,addr) | 176 | dep r21=r19,r20,3,(PAGE_SHIFT-3) // r21=pte_offset(pmd,addr) |
169 | ;; | 177 | ;; |
170 | (p7) ld8 r18=[r21] // read *pte | 178 | (p7) ld8 r18=[r21] // read *pte |
171 | mov r19=cr.isr // cr.isr bit 32 tells us if this is an insn miss | 179 | MOV_FROM_ISR(r19) // cr.isr bit 32 tells us if this is an insn miss |
172 | ;; | 180 | ;; |
173 | (p7) tbit.z p6,p7=r18,_PAGE_P_BIT // page present bit cleared? | 181 | (p7) tbit.z p6,p7=r18,_PAGE_P_BIT // page present bit cleared? |
174 | mov r22=cr.iha // get the VHPT address that caused the TLB miss | 182 | MOV_FROM_IHA(r22) // get the VHPT address that caused the TLB miss |
175 | ;; // avoid RAW on p7 | 183 | ;; // avoid RAW on p7 |
176 | (p7) tbit.nz.unc p10,p11=r19,32 // is it an instruction TLB miss? | 184 | (p7) tbit.nz.unc p10,p11=r19,32 // is it an instruction TLB miss? |
177 | dep r23=0,r20,0,PAGE_SHIFT // clear low bits to get page address | 185 | dep r23=0,r20,0,PAGE_SHIFT // clear low bits to get page address |
178 | ;; | 186 | ;; |
179 | (p10) itc.i r18 // insert the instruction TLB entry | 187 | ITC_I_AND_D(p10, p11, r18, r24) // insert the instruction TLB entry and |
180 | (p11) itc.d r18 // insert the data TLB entry | 188 | // insert the data TLB entry |
181 | (p6) br.cond.spnt.many page_fault // handle bad address/page not present (page fault) | 189 | (p6) br.cond.spnt.many page_fault // handle bad address/page not present (page fault) |
182 | mov cr.ifa=r22 | 190 | MOV_TO_IFA(r22, r24) |
183 | 191 | ||
184 | #ifdef CONFIG_HUGETLB_PAGE | 192 | #ifdef CONFIG_HUGETLB_PAGE |
185 | (p8) mov cr.itir=r25 // change to default page-size for VHPT | 193 | MOV_TO_ITIR(p8, r25, r24) // change to default page-size for VHPT |
186 | #endif | 194 | #endif |
187 | 195 | ||
188 | /* | 196 | /* |
@@ -192,7 +200,7 @@ ENTRY(vhpt_miss) | |||
192 | */ | 200 | */ |
193 | adds r24=__DIRTY_BITS_NO_ED|_PAGE_PL_0|_PAGE_AR_RW,r23 | 201 | adds r24=__DIRTY_BITS_NO_ED|_PAGE_PL_0|_PAGE_AR_RW,r23 |
194 | ;; | 202 | ;; |
195 | (p7) itc.d r24 | 203 | ITC_D(p7, r24, r25) |
196 | ;; | 204 | ;; |
197 | #ifdef CONFIG_SMP | 205 | #ifdef CONFIG_SMP |
198 | /* | 206 | /* |
@@ -234,7 +242,7 @@ ENTRY(vhpt_miss) | |||
234 | #endif | 242 | #endif |
235 | 243 | ||
236 | mov pr=r31,-1 // restore predicate registers | 244 | mov pr=r31,-1 // restore predicate registers |
237 | rfi | 245 | RFI |
238 | END(vhpt_miss) | 246 | END(vhpt_miss) |
239 | 247 | ||
240 | .org ia64_ivt+0x400 | 248 | .org ia64_ivt+0x400 |
@@ -248,11 +256,11 @@ ENTRY(itlb_miss) | |||
248 | * mode, walk the page table, and then re-execute the PTE read and | 256 | * mode, walk the page table, and then re-execute the PTE read and |
249 | * go on normally after that. | 257 | * go on normally after that. |
250 | */ | 258 | */ |
251 | mov r16=cr.ifa // get virtual address | 259 | MOV_FROM_IFA(r16) // get virtual address |
252 | mov r29=b0 // save b0 | 260 | mov r29=b0 // save b0 |
253 | mov r31=pr // save predicates | 261 | mov r31=pr // save predicates |
254 | .itlb_fault: | 262 | .itlb_fault: |
255 | mov r17=cr.iha // get virtual address of PTE | 263 | MOV_FROM_IHA(r17) // get virtual address of PTE |
256 | movl r30=1f // load nested fault continuation point | 264 | movl r30=1f // load nested fault continuation point |
257 | ;; | 265 | ;; |
258 | 1: ld8 r18=[r17] // read *pte | 266 | 1: ld8 r18=[r17] // read *pte |
@@ -261,7 +269,7 @@ ENTRY(itlb_miss) | |||
261 | tbit.z p6,p0=r18,_PAGE_P_BIT // page present bit cleared? | 269 | tbit.z p6,p0=r18,_PAGE_P_BIT // page present bit cleared? |
262 | (p6) br.cond.spnt page_fault | 270 | (p6) br.cond.spnt page_fault |
263 | ;; | 271 | ;; |
264 | itc.i r18 | 272 | ITC_I(p0, r18, r19) |
265 | ;; | 273 | ;; |
266 | #ifdef CONFIG_SMP | 274 | #ifdef CONFIG_SMP |
267 | /* | 275 | /* |
@@ -278,7 +286,7 @@ ENTRY(itlb_miss) | |||
278 | (p7) ptc.l r16,r20 | 286 | (p7) ptc.l r16,r20 |
279 | #endif | 287 | #endif |
280 | mov pr=r31,-1 | 288 | mov pr=r31,-1 |
281 | rfi | 289 | RFI |
282 | END(itlb_miss) | 290 | END(itlb_miss) |
283 | 291 | ||
284 | .org ia64_ivt+0x0800 | 292 | .org ia64_ivt+0x0800 |
@@ -292,11 +300,11 @@ ENTRY(dtlb_miss) | |||
292 | * mode, walk the page table, and then re-execute the PTE read and | 300 | * mode, walk the page table, and then re-execute the PTE read and |
293 | * go on normally after that. | 301 | * go on normally after that. |
294 | */ | 302 | */ |
295 | mov r16=cr.ifa // get virtual address | 303 | MOV_FROM_IFA(r16) // get virtual address |
296 | mov r29=b0 // save b0 | 304 | mov r29=b0 // save b0 |
297 | mov r31=pr // save predicates | 305 | mov r31=pr // save predicates |
298 | dtlb_fault: | 306 | dtlb_fault: |
299 | mov r17=cr.iha // get virtual address of PTE | 307 | MOV_FROM_IHA(r17) // get virtual address of PTE |
300 | movl r30=1f // load nested fault continuation point | 308 | movl r30=1f // load nested fault continuation point |
301 | ;; | 309 | ;; |
302 | 1: ld8 r18=[r17] // read *pte | 310 | 1: ld8 r18=[r17] // read *pte |
@@ -305,7 +313,7 @@ dtlb_fault: | |||
305 | tbit.z p6,p0=r18,_PAGE_P_BIT // page present bit cleared? | 313 | tbit.z p6,p0=r18,_PAGE_P_BIT // page present bit cleared? |
306 | (p6) br.cond.spnt page_fault | 314 | (p6) br.cond.spnt page_fault |
307 | ;; | 315 | ;; |
308 | itc.d r18 | 316 | ITC_D(p0, r18, r19) |
309 | ;; | 317 | ;; |
310 | #ifdef CONFIG_SMP | 318 | #ifdef CONFIG_SMP |
311 | /* | 319 | /* |
@@ -322,7 +330,7 @@ dtlb_fault: | |||
322 | (p7) ptc.l r16,r20 | 330 | (p7) ptc.l r16,r20 |
323 | #endif | 331 | #endif |
324 | mov pr=r31,-1 | 332 | mov pr=r31,-1 |
325 | rfi | 333 | RFI |
326 | END(dtlb_miss) | 334 | END(dtlb_miss) |
327 | 335 | ||
328 | .org ia64_ivt+0x0c00 | 336 | .org ia64_ivt+0x0c00 |
@@ -330,9 +338,9 @@ END(dtlb_miss) | |||
330 | // 0x0c00 Entry 3 (size 64 bundles) Alt ITLB (19) | 338 | // 0x0c00 Entry 3 (size 64 bundles) Alt ITLB (19) |
331 | ENTRY(alt_itlb_miss) | 339 | ENTRY(alt_itlb_miss) |
332 | DBG_FAULT(3) | 340 | DBG_FAULT(3) |
333 | mov r16=cr.ifa // get address that caused the TLB miss | 341 | MOV_FROM_IFA(r16) // get address that caused the TLB miss |
334 | movl r17=PAGE_KERNEL | 342 | movl r17=PAGE_KERNEL |
335 | mov r21=cr.ipsr | 343 | MOV_FROM_IPSR(p0, r21) |
336 | movl r19=(((1 << IA64_MAX_PHYS_BITS) - 1) & ~0xfff) | 344 | movl r19=(((1 << IA64_MAX_PHYS_BITS) - 1) & ~0xfff) |
337 | mov r31=pr | 345 | mov r31=pr |
338 | ;; | 346 | ;; |
@@ -341,9 +349,9 @@ ENTRY(alt_itlb_miss) | |||
341 | ;; | 349 | ;; |
342 | cmp.gt p8,p0=6,r22 // user mode | 350 | cmp.gt p8,p0=6,r22 // user mode |
343 | ;; | 351 | ;; |
344 | (p8) thash r17=r16 | 352 | THASH(p8, r17, r16, r23) |
345 | ;; | 353 | ;; |
346 | (p8) mov cr.iha=r17 | 354 | MOV_TO_IHA(p8, r17, r23) |
347 | (p8) mov r29=b0 // save b0 | 355 | (p8) mov r29=b0 // save b0 |
348 | (p8) br.cond.dptk .itlb_fault | 356 | (p8) br.cond.dptk .itlb_fault |
349 | #endif | 357 | #endif |
@@ -358,9 +366,9 @@ ENTRY(alt_itlb_miss) | |||
358 | or r19=r19,r18 // set bit 4 (uncached) if the access was to region 6 | 366 | or r19=r19,r18 // set bit 4 (uncached) if the access was to region 6 |
359 | (p8) br.cond.spnt page_fault | 367 | (p8) br.cond.spnt page_fault |
360 | ;; | 368 | ;; |
361 | itc.i r19 // insert the TLB entry | 369 | ITC_I(p0, r19, r18) // insert the TLB entry |
362 | mov pr=r31,-1 | 370 | mov pr=r31,-1 |
363 | rfi | 371 | RFI |
364 | END(alt_itlb_miss) | 372 | END(alt_itlb_miss) |
365 | 373 | ||
366 | .org ia64_ivt+0x1000 | 374 | .org ia64_ivt+0x1000 |
@@ -368,11 +376,11 @@ END(alt_itlb_miss) | |||
368 | // 0x1000 Entry 4 (size 64 bundles) Alt DTLB (7,46) | 376 | // 0x1000 Entry 4 (size 64 bundles) Alt DTLB (7,46) |
369 | ENTRY(alt_dtlb_miss) | 377 | ENTRY(alt_dtlb_miss) |
370 | DBG_FAULT(4) | 378 | DBG_FAULT(4) |
371 | mov r16=cr.ifa // get address that caused the TLB miss | 379 | MOV_FROM_IFA(r16) // get address that caused the TLB miss |
372 | movl r17=PAGE_KERNEL | 380 | movl r17=PAGE_KERNEL |
373 | mov r20=cr.isr | 381 | MOV_FROM_ISR(r20) |
374 | movl r19=(((1 << IA64_MAX_PHYS_BITS) - 1) & ~0xfff) | 382 | movl r19=(((1 << IA64_MAX_PHYS_BITS) - 1) & ~0xfff) |
375 | mov r21=cr.ipsr | 383 | MOV_FROM_IPSR(p0, r21) |
376 | mov r31=pr | 384 | mov r31=pr |
377 | mov r24=PERCPU_ADDR | 385 | mov r24=PERCPU_ADDR |
378 | ;; | 386 | ;; |
@@ -381,9 +389,9 @@ ENTRY(alt_dtlb_miss) | |||
381 | ;; | 389 | ;; |
382 | cmp.gt p8,p0=6,r22 // access to region 0-5 | 390 | cmp.gt p8,p0=6,r22 // access to region 0-5 |
383 | ;; | 391 | ;; |
384 | (p8) thash r17=r16 | 392 | THASH(p8, r17, r16, r25) |
385 | ;; | 393 | ;; |
386 | (p8) mov cr.iha=r17 | 394 | MOV_TO_IHA(p8, r17, r25) |
387 | (p8) mov r29=b0 // save b0 | 395 | (p8) mov r29=b0 // save b0 |
388 | (p8) br.cond.dptk dtlb_fault | 396 | (p8) br.cond.dptk dtlb_fault |
389 | #endif | 397 | #endif |
@@ -402,7 +410,7 @@ ENTRY(alt_dtlb_miss) | |||
402 | tbit.nz p9,p0=r20,IA64_ISR_NA_BIT // is non-access bit on? | 410 | tbit.nz p9,p0=r20,IA64_ISR_NA_BIT // is non-access bit on? |
403 | ;; | 411 | ;; |
404 | (p10) sub r19=r19,r26 | 412 | (p10) sub r19=r19,r26 |
405 | (p10) mov cr.itir=r25 | 413 | MOV_TO_ITIR(p10, r25, r24) |
406 | cmp.ne p8,p0=r0,r23 | 414 | cmp.ne p8,p0=r0,r23 |
407 | (p9) cmp.eq.or.andcm p6,p7=IA64_ISR_CODE_LFETCH,r22 // check isr.code field | 415 | (p9) cmp.eq.or.andcm p6,p7=IA64_ISR_CODE_LFETCH,r22 // check isr.code field |
408 | (p12) dep r17=-1,r17,4,1 // set ma=UC for region 6 addr | 416 | (p12) dep r17=-1,r17,4,1 // set ma=UC for region 6 addr |
@@ -411,11 +419,11 @@ ENTRY(alt_dtlb_miss) | |||
411 | dep r21=-1,r21,IA64_PSR_ED_BIT,1 | 419 | dep r21=-1,r21,IA64_PSR_ED_BIT,1 |
412 | ;; | 420 | ;; |
413 | or r19=r19,r17 // insert PTE control bits into r19 | 421 | or r19=r19,r17 // insert PTE control bits into r19 |
414 | (p6) mov cr.ipsr=r21 | 422 | MOV_TO_IPSR(p6, r21, r24) |
415 | ;; | 423 | ;; |
416 | (p7) itc.d r19 // insert the TLB entry | 424 | ITC_D(p7, r19, r18) // insert the TLB entry |
417 | mov pr=r31,-1 | 425 | mov pr=r31,-1 |
418 | rfi | 426 | RFI |
419 | END(alt_dtlb_miss) | 427 | END(alt_dtlb_miss) |
420 | 428 | ||
421 | .org ia64_ivt+0x1400 | 429 | .org ia64_ivt+0x1400 |
@@ -444,10 +452,10 @@ ENTRY(nested_dtlb_miss) | |||
444 | * | 452 | * |
445 | * Clobbered: b0, r18, r19, r21, r22, psr.dt (cleared) | 453 | * Clobbered: b0, r18, r19, r21, r22, psr.dt (cleared) |
446 | */ | 454 | */ |
447 | rsm psr.dt // switch to using physical data addressing | 455 | RSM_PSR_DT // switch to using physical data addressing |
448 | mov r19=IA64_KR(PT_BASE) // get the page table base address | 456 | mov r19=IA64_KR(PT_BASE) // get the page table base address |
449 | shl r21=r16,3 // shift bit 60 into sign bit | 457 | shl r21=r16,3 // shift bit 60 into sign bit |
450 | mov r18=cr.itir | 458 | MOV_FROM_ITIR(r18) |
451 | ;; | 459 | ;; |
452 | shr.u r17=r16,61 // get the region number into r17 | 460 | shr.u r17=r16,61 // get the region number into r17 |
453 | extr.u r18=r18,2,6 // get the faulting page size | 461 | extr.u r18=r18,2,6 // get the faulting page size |
@@ -507,33 +515,6 @@ ENTRY(ikey_miss) | |||
507 | FAULT(6) | 515 | FAULT(6) |
508 | END(ikey_miss) | 516 | END(ikey_miss) |
509 | 517 | ||
510 | //----------------------------------------------------------------------------------- | ||
511 | // call do_page_fault (predicates are in r31, psr.dt may be off, r16 is faulting address) | ||
512 | ENTRY(page_fault) | ||
513 | ssm psr.dt | ||
514 | ;; | ||
515 | srlz.i | ||
516 | ;; | ||
517 | SAVE_MIN_WITH_COVER | ||
518 | alloc r15=ar.pfs,0,0,3,0 | ||
519 | mov out0=cr.ifa | ||
520 | mov out1=cr.isr | ||
521 | adds r3=8,r2 // set up second base pointer | ||
522 | ;; | ||
523 | ssm psr.ic | PSR_DEFAULT_BITS | ||
524 | ;; | ||
525 | srlz.i // guarantee that interruption collectin is on | ||
526 | ;; | ||
527 | (p15) ssm psr.i // restore psr.i | ||
528 | movl r14=ia64_leave_kernel | ||
529 | ;; | ||
530 | SAVE_REST | ||
531 | mov rp=r14 | ||
532 | ;; | ||
533 | adds out2=16,r12 // out2 = pointer to pt_regs | ||
534 | br.call.sptk.many b6=ia64_do_page_fault // ignore return address | ||
535 | END(page_fault) | ||
536 | |||
537 | .org ia64_ivt+0x1c00 | 518 | .org ia64_ivt+0x1c00 |
538 | ///////////////////////////////////////////////////////////////////////////////////////// | 519 | ///////////////////////////////////////////////////////////////////////////////////////// |
539 | // 0x1c00 Entry 7 (size 64 bundles) Data Key Miss (12,51) | 520 | // 0x1c00 Entry 7 (size 64 bundles) Data Key Miss (12,51) |
@@ -556,10 +537,10 @@ ENTRY(dirty_bit) | |||
556 | * page table TLB entry isn't present, we take a nested TLB miss hit where we look | 537 | * page table TLB entry isn't present, we take a nested TLB miss hit where we look |
557 | * up the physical address of the L3 PTE and then continue at label 1 below. | 538 | * up the physical address of the L3 PTE and then continue at label 1 below. |
558 | */ | 539 | */ |
559 | mov r16=cr.ifa // get the address that caused the fault | 540 | MOV_FROM_IFA(r16) // get the address that caused the fault |
560 | movl r30=1f // load continuation point in case of nested fault | 541 | movl r30=1f // load continuation point in case of nested fault |
561 | ;; | 542 | ;; |
562 | thash r17=r16 // compute virtual address of L3 PTE | 543 | THASH(p0, r17, r16, r18) // compute virtual address of L3 PTE |
563 | mov r29=b0 // save b0 in case of nested fault | 544 | mov r29=b0 // save b0 in case of nested fault |
564 | mov r31=pr // save pr | 545 | mov r31=pr // save pr |
565 | #ifdef CONFIG_SMP | 546 | #ifdef CONFIG_SMP |
@@ -576,7 +557,7 @@ ENTRY(dirty_bit) | |||
576 | ;; | 557 | ;; |
577 | (p6) cmp.eq p6,p7=r26,r18 // Only compare if page is present | 558 | (p6) cmp.eq p6,p7=r26,r18 // Only compare if page is present |
578 | ;; | 559 | ;; |
579 | (p6) itc.d r25 // install updated PTE | 560 | ITC_D(p6, r25, r18) // install updated PTE |
580 | ;; | 561 | ;; |
581 | /* | 562 | /* |
582 | * Tell the assemblers dependency-violation checker that the above "itc" instructions | 563 | * Tell the assemblers dependency-violation checker that the above "itc" instructions |
@@ -602,7 +583,7 @@ ENTRY(dirty_bit) | |||
602 | itc.d r18 // install updated PTE | 583 | itc.d r18 // install updated PTE |
603 | #endif | 584 | #endif |
604 | mov pr=r31,-1 // restore pr | 585 | mov pr=r31,-1 // restore pr |
605 | rfi | 586 | RFI |
606 | END(dirty_bit) | 587 | END(dirty_bit) |
607 | 588 | ||
608 | .org ia64_ivt+0x2400 | 589 | .org ia64_ivt+0x2400 |
@@ -611,22 +592,22 @@ END(dirty_bit) | |||
611 | ENTRY(iaccess_bit) | 592 | ENTRY(iaccess_bit) |
612 | DBG_FAULT(9) | 593 | DBG_FAULT(9) |
613 | // Like Entry 8, except for instruction access | 594 | // Like Entry 8, except for instruction access |
614 | mov r16=cr.ifa // get the address that caused the fault | 595 | MOV_FROM_IFA(r16) // get the address that caused the fault |
615 | movl r30=1f // load continuation point in case of nested fault | 596 | movl r30=1f // load continuation point in case of nested fault |
616 | mov r31=pr // save predicates | 597 | mov r31=pr // save predicates |
617 | #ifdef CONFIG_ITANIUM | 598 | #ifdef CONFIG_ITANIUM |
618 | /* | 599 | /* |
619 | * Erratum 10 (IFA may contain incorrect address) has "NoFix" status. | 600 | * Erratum 10 (IFA may contain incorrect address) has "NoFix" status. |
620 | */ | 601 | */ |
621 | mov r17=cr.ipsr | 602 | MOV_FROM_IPSR(p0, r17) |
622 | ;; | 603 | ;; |
623 | mov r18=cr.iip | 604 | MOV_FROM_IIP(r18) |
624 | tbit.z p6,p0=r17,IA64_PSR_IS_BIT // IA64 instruction set? | 605 | tbit.z p6,p0=r17,IA64_PSR_IS_BIT // IA64 instruction set? |
625 | ;; | 606 | ;; |
626 | (p6) mov r16=r18 // if so, use cr.iip instead of cr.ifa | 607 | (p6) mov r16=r18 // if so, use cr.iip instead of cr.ifa |
627 | #endif /* CONFIG_ITANIUM */ | 608 | #endif /* CONFIG_ITANIUM */ |
628 | ;; | 609 | ;; |
629 | thash r17=r16 // compute virtual address of L3 PTE | 610 | THASH(p0, r17, r16, r18) // compute virtual address of L3 PTE |
630 | mov r29=b0 // save b0 in case of nested fault) | 611 | mov r29=b0 // save b0 in case of nested fault) |
631 | #ifdef CONFIG_SMP | 612 | #ifdef CONFIG_SMP |
632 | mov r28=ar.ccv // save ar.ccv | 613 | mov r28=ar.ccv // save ar.ccv |
@@ -642,7 +623,7 @@ ENTRY(iaccess_bit) | |||
642 | ;; | 623 | ;; |
643 | (p6) cmp.eq p6,p7=r26,r18 // Only if page present | 624 | (p6) cmp.eq p6,p7=r26,r18 // Only if page present |
644 | ;; | 625 | ;; |
645 | (p6) itc.i r25 // install updated PTE | 626 | ITC_I(p6, r25, r26) // install updated PTE |
646 | ;; | 627 | ;; |
647 | /* | 628 | /* |
648 | * Tell the assemblers dependency-violation checker that the above "itc" instructions | 629 | * Tell the assemblers dependency-violation checker that the above "itc" instructions |
@@ -668,7 +649,7 @@ ENTRY(iaccess_bit) | |||
668 | itc.i r18 // install updated PTE | 649 | itc.i r18 // install updated PTE |
669 | #endif /* !CONFIG_SMP */ | 650 | #endif /* !CONFIG_SMP */ |
670 | mov pr=r31,-1 | 651 | mov pr=r31,-1 |
671 | rfi | 652 | RFI |
672 | END(iaccess_bit) | 653 | END(iaccess_bit) |
673 | 654 | ||
674 | .org ia64_ivt+0x2800 | 655 | .org ia64_ivt+0x2800 |
@@ -677,10 +658,10 @@ END(iaccess_bit) | |||
677 | ENTRY(daccess_bit) | 658 | ENTRY(daccess_bit) |
678 | DBG_FAULT(10) | 659 | DBG_FAULT(10) |
679 | // Like Entry 8, except for data access | 660 | // Like Entry 8, except for data access |
680 | mov r16=cr.ifa // get the address that caused the fault | 661 | MOV_FROM_IFA(r16) // get the address that caused the fault |
681 | movl r30=1f // load continuation point in case of nested fault | 662 | movl r30=1f // load continuation point in case of nested fault |
682 | ;; | 663 | ;; |
683 | thash r17=r16 // compute virtual address of L3 PTE | 664 | THASH(p0, r17, r16, r18) // compute virtual address of L3 PTE |
684 | mov r31=pr | 665 | mov r31=pr |
685 | mov r29=b0 // save b0 in case of nested fault) | 666 | mov r29=b0 // save b0 in case of nested fault) |
686 | #ifdef CONFIG_SMP | 667 | #ifdef CONFIG_SMP |
@@ -697,7 +678,7 @@ ENTRY(daccess_bit) | |||
697 | ;; | 678 | ;; |
698 | (p6) cmp.eq p6,p7=r26,r18 // Only if page is present | 679 | (p6) cmp.eq p6,p7=r26,r18 // Only if page is present |
699 | ;; | 680 | ;; |
700 | (p6) itc.d r25 // install updated PTE | 681 | ITC_D(p6, r25, r26) // install updated PTE |
701 | /* | 682 | /* |
702 | * Tell the assemblers dependency-violation checker that the above "itc" instructions | 683 | * Tell the assemblers dependency-violation checker that the above "itc" instructions |
703 | * cannot possibly affect the following loads: | 684 | * cannot possibly affect the following loads: |
@@ -721,7 +702,7 @@ ENTRY(daccess_bit) | |||
721 | #endif | 702 | #endif |
722 | mov b0=r29 // restore b0 | 703 | mov b0=r29 // restore b0 |
723 | mov pr=r31,-1 | 704 | mov pr=r31,-1 |
724 | rfi | 705 | RFI |
725 | END(daccess_bit) | 706 | END(daccess_bit) |
726 | 707 | ||
727 | .org ia64_ivt+0x2c00 | 708 | .org ia64_ivt+0x2c00 |
@@ -745,10 +726,10 @@ ENTRY(break_fault) | |||
745 | */ | 726 | */ |
746 | DBG_FAULT(11) | 727 | DBG_FAULT(11) |
747 | mov.m r16=IA64_KR(CURRENT) // M2 r16 <- current task (12 cyc) | 728 | mov.m r16=IA64_KR(CURRENT) // M2 r16 <- current task (12 cyc) |
748 | mov r29=cr.ipsr // M2 (12 cyc) | 729 | MOV_FROM_IPSR(p0, r29) // M2 (12 cyc) |
749 | mov r31=pr // I0 (2 cyc) | 730 | mov r31=pr // I0 (2 cyc) |
750 | 731 | ||
751 | mov r17=cr.iim // M2 (2 cyc) | 732 | MOV_FROM_IIM(r17) // M2 (2 cyc) |
752 | mov.m r27=ar.rsc // M2 (12 cyc) | 733 | mov.m r27=ar.rsc // M2 (12 cyc) |
753 | mov r18=__IA64_BREAK_SYSCALL // A | 734 | mov r18=__IA64_BREAK_SYSCALL // A |
754 | 735 | ||
@@ -767,7 +748,7 @@ ENTRY(break_fault) | |||
767 | nop.m 0 | 748 | nop.m 0 |
768 | movl r30=sys_call_table // X | 749 | movl r30=sys_call_table // X |
769 | 750 | ||
770 | mov r28=cr.iip // M2 (2 cyc) | 751 | MOV_FROM_IIP(r28) // M2 (2 cyc) |
771 | cmp.eq p0,p7=r18,r17 // I0 is this a system call? | 752 | cmp.eq p0,p7=r18,r17 // I0 is this a system call? |
772 | (p7) br.cond.spnt non_syscall // B no -> | 753 | (p7) br.cond.spnt non_syscall // B no -> |
773 | // | 754 | // |
@@ -864,18 +845,17 @@ ENTRY(break_fault) | |||
864 | #endif | 845 | #endif |
865 | mov ar.rsc=0x3 // M2 set eager mode, pl 0, LE, loadrs=0 | 846 | mov ar.rsc=0x3 // M2 set eager mode, pl 0, LE, loadrs=0 |
866 | nop 0 | 847 | nop 0 |
867 | bsw.1 // B (6 cyc) regs are saved, switch to bank 1 | 848 | BSW_1(r2, r14) // B (6 cyc) regs are saved, switch to bank 1 |
868 | ;; | 849 | ;; |
869 | 850 | ||
870 | ssm psr.ic | PSR_DEFAULT_BITS // M2 now it's safe to re-enable intr.-collection | 851 | SSM_PSR_IC_AND_DEFAULT_BITS_AND_SRLZ_I(r3, r16) // M2 now it's safe to re-enable intr.-collection |
852 | // M0 ensure interruption collection is on | ||
871 | movl r3=ia64_ret_from_syscall // X | 853 | movl r3=ia64_ret_from_syscall // X |
872 | ;; | 854 | ;; |
873 | |||
874 | srlz.i // M0 ensure interruption collection is on | ||
875 | mov rp=r3 // I0 set the real return addr | 855 | mov rp=r3 // I0 set the real return addr |
876 | (p10) br.cond.spnt.many ia64_ret_from_syscall // B return if bad call-frame or r15 is a NaT | 856 | (p10) br.cond.spnt.many ia64_ret_from_syscall // B return if bad call-frame or r15 is a NaT |
877 | 857 | ||
878 | (p15) ssm psr.i // M2 restore psr.i | 858 | SSM_PSR_I(p15, p15, r16) // M2 restore psr.i |
879 | (p14) br.call.sptk.many b6=b6 // B invoke syscall-handker (ignore return addr) | 859 | (p14) br.call.sptk.many b6=b6 // B invoke syscall-handker (ignore return addr) |
880 | br.cond.spnt.many ia64_trace_syscall // B do syscall-tracing thingamagic | 860 | br.cond.spnt.many ia64_trace_syscall // B do syscall-tracing thingamagic |
881 | // NOT REACHED | 861 | // NOT REACHED |
@@ -895,27 +875,8 @@ END(break_fault) | |||
895 | ///////////////////////////////////////////////////////////////////////////////////////// | 875 | ///////////////////////////////////////////////////////////////////////////////////////// |
896 | // 0x3000 Entry 12 (size 64 bundles) External Interrupt (4) | 876 | // 0x3000 Entry 12 (size 64 bundles) External Interrupt (4) |
897 | ENTRY(interrupt) | 877 | ENTRY(interrupt) |
898 | DBG_FAULT(12) | 878 | /* interrupt handler has become too big to fit this area. */ |
899 | mov r31=pr // prepare to save predicates | 879 | br.sptk.many __interrupt |
900 | ;; | ||
901 | SAVE_MIN_WITH_COVER // uses r31; defines r2 and r3 | ||
902 | ssm psr.ic | PSR_DEFAULT_BITS | ||
903 | ;; | ||
904 | adds r3=8,r2 // set up second base pointer for SAVE_REST | ||
905 | srlz.i // ensure everybody knows psr.ic is back on | ||
906 | ;; | ||
907 | SAVE_REST | ||
908 | ;; | ||
909 | MCA_RECOVER_RANGE(interrupt) | ||
910 | alloc r14=ar.pfs,0,0,2,0 // must be first in an insn group | ||
911 | mov out0=cr.ivr // pass cr.ivr as first arg | ||
912 | add out1=16,sp // pass pointer to pt_regs as second arg | ||
913 | ;; | ||
914 | srlz.d // make sure we see the effect of cr.ivr | ||
915 | movl r14=ia64_leave_kernel | ||
916 | ;; | ||
917 | mov rp=r14 | ||
918 | br.call.sptk.many b6=ia64_handle_irq | ||
919 | END(interrupt) | 880 | END(interrupt) |
920 | 881 | ||
921 | .org ia64_ivt+0x3400 | 882 | .org ia64_ivt+0x3400 |
@@ -978,6 +939,7 @@ END(interrupt) | |||
978 | * - ar.fpsr: set to kernel settings | 939 | * - ar.fpsr: set to kernel settings |
979 | * - b6: preserved (same as on entry) | 940 | * - b6: preserved (same as on entry) |
980 | */ | 941 | */ |
942 | #ifdef __IA64_ASM_PARAVIRTUALIZED_NATIVE | ||
981 | GLOBAL_ENTRY(ia64_syscall_setup) | 943 | GLOBAL_ENTRY(ia64_syscall_setup) |
982 | #if PT(B6) != 0 | 944 | #if PT(B6) != 0 |
983 | # error This code assumes that b6 is the first field in pt_regs. | 945 | # error This code assumes that b6 is the first field in pt_regs. |
@@ -1069,6 +1031,7 @@ GLOBAL_ENTRY(ia64_syscall_setup) | |||
1069 | (p10) mov r8=-EINVAL | 1031 | (p10) mov r8=-EINVAL |
1070 | br.ret.sptk.many b7 | 1032 | br.ret.sptk.many b7 |
1071 | END(ia64_syscall_setup) | 1033 | END(ia64_syscall_setup) |
1034 | #endif /* __IA64_ASM_PARAVIRTUALIZED_NATIVE */ | ||
1072 | 1035 | ||
1073 | .org ia64_ivt+0x3c00 | 1036 | .org ia64_ivt+0x3c00 |
1074 | ///////////////////////////////////////////////////////////////////////////////////////// | 1037 | ///////////////////////////////////////////////////////////////////////////////////////// |
@@ -1082,7 +1045,7 @@ END(ia64_syscall_setup) | |||
1082 | DBG_FAULT(16) | 1045 | DBG_FAULT(16) |
1083 | FAULT(16) | 1046 | FAULT(16) |
1084 | 1047 | ||
1085 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING | 1048 | #if defined(CONFIG_VIRT_CPU_ACCOUNTING) && defined(__IA64_ASM_PARAVIRTUALIZED_NATIVE) |
1086 | /* | 1049 | /* |
1087 | * There is no particular reason for this code to be here, other than | 1050 | * There is no particular reason for this code to be here, other than |
1088 | * that there happens to be space here that would go unused otherwise. | 1051 | * that there happens to be space here that would go unused otherwise. |
@@ -1092,7 +1055,7 @@ END(ia64_syscall_setup) | |||
1092 | * account_sys_enter is called from SAVE_MIN* macros if accounting is | 1055 | * account_sys_enter is called from SAVE_MIN* macros if accounting is |
1093 | * enabled and if the macro is entered from user mode. | 1056 | * enabled and if the macro is entered from user mode. |
1094 | */ | 1057 | */ |
1095 | ENTRY(account_sys_enter) | 1058 | GLOBAL_ENTRY(account_sys_enter) |
1096 | // mov.m r20=ar.itc is called in advance, and r13 is current | 1059 | // mov.m r20=ar.itc is called in advance, and r13 is current |
1097 | add r16=TI_AC_STAMP+IA64_TASK_SIZE,r13 | 1060 | add r16=TI_AC_STAMP+IA64_TASK_SIZE,r13 |
1098 | add r17=TI_AC_LEAVE+IA64_TASK_SIZE,r13 | 1061 | add r17=TI_AC_LEAVE+IA64_TASK_SIZE,r13 |
@@ -1123,110 +1086,18 @@ END(account_sys_enter) | |||
1123 | DBG_FAULT(17) | 1086 | DBG_FAULT(17) |
1124 | FAULT(17) | 1087 | FAULT(17) |
1125 | 1088 | ||
1126 | ENTRY(non_syscall) | ||
1127 | mov ar.rsc=r27 // restore ar.rsc before SAVE_MIN_WITH_COVER | ||
1128 | ;; | ||
1129 | SAVE_MIN_WITH_COVER | ||
1130 | |||
1131 | // There is no particular reason for this code to be here, other than that | ||
1132 | // there happens to be space here that would go unused otherwise. If this | ||
1133 | // fault ever gets "unreserved", simply moved the following code to a more | ||
1134 | // suitable spot... | ||
1135 | |||
1136 | alloc r14=ar.pfs,0,0,2,0 | ||
1137 | mov out0=cr.iim | ||
1138 | add out1=16,sp | ||
1139 | adds r3=8,r2 // set up second base pointer for SAVE_REST | ||
1140 | |||
1141 | ssm psr.ic | PSR_DEFAULT_BITS | ||
1142 | ;; | ||
1143 | srlz.i // guarantee that interruption collection is on | ||
1144 | ;; | ||
1145 | (p15) ssm psr.i // restore psr.i | ||
1146 | movl r15=ia64_leave_kernel | ||
1147 | ;; | ||
1148 | SAVE_REST | ||
1149 | mov rp=r15 | ||
1150 | ;; | ||
1151 | br.call.sptk.many b6=ia64_bad_break // avoid WAW on CFM and ignore return addr | ||
1152 | END(non_syscall) | ||
1153 | |||
1154 | .org ia64_ivt+0x4800 | 1089 | .org ia64_ivt+0x4800 |
1155 | ///////////////////////////////////////////////////////////////////////////////////////// | 1090 | ///////////////////////////////////////////////////////////////////////////////////////// |
1156 | // 0x4800 Entry 18 (size 64 bundles) Reserved | 1091 | // 0x4800 Entry 18 (size 64 bundles) Reserved |
1157 | DBG_FAULT(18) | 1092 | DBG_FAULT(18) |
1158 | FAULT(18) | 1093 | FAULT(18) |
1159 | 1094 | ||
1160 | /* | ||
1161 | * There is no particular reason for this code to be here, other than that | ||
1162 | * there happens to be space here that would go unused otherwise. If this | ||
1163 | * fault ever gets "unreserved", simply moved the following code to a more | ||
1164 | * suitable spot... | ||
1165 | */ | ||
1166 | |||
1167 | ENTRY(dispatch_unaligned_handler) | ||
1168 | SAVE_MIN_WITH_COVER | ||
1169 | ;; | ||
1170 | alloc r14=ar.pfs,0,0,2,0 // now it's safe (must be first in insn group!) | ||
1171 | mov out0=cr.ifa | ||
1172 | adds out1=16,sp | ||
1173 | |||
1174 | ssm psr.ic | PSR_DEFAULT_BITS | ||
1175 | ;; | ||
1176 | srlz.i // guarantee that interruption collection is on | ||
1177 | ;; | ||
1178 | (p15) ssm psr.i // restore psr.i | ||
1179 | adds r3=8,r2 // set up second base pointer | ||
1180 | ;; | ||
1181 | SAVE_REST | ||
1182 | movl r14=ia64_leave_kernel | ||
1183 | ;; | ||
1184 | mov rp=r14 | ||
1185 | br.sptk.many ia64_prepare_handle_unaligned | ||
1186 | END(dispatch_unaligned_handler) | ||
1187 | |||
1188 | .org ia64_ivt+0x4c00 | 1095 | .org ia64_ivt+0x4c00 |
1189 | ///////////////////////////////////////////////////////////////////////////////////////// | 1096 | ///////////////////////////////////////////////////////////////////////////////////////// |
1190 | // 0x4c00 Entry 19 (size 64 bundles) Reserved | 1097 | // 0x4c00 Entry 19 (size 64 bundles) Reserved |
1191 | DBG_FAULT(19) | 1098 | DBG_FAULT(19) |
1192 | FAULT(19) | 1099 | FAULT(19) |
1193 | 1100 | ||
1194 | /* | ||
1195 | * There is no particular reason for this code to be here, other than that | ||
1196 | * there happens to be space here that would go unused otherwise. If this | ||
1197 | * fault ever gets "unreserved", simply moved the following code to a more | ||
1198 | * suitable spot... | ||
1199 | */ | ||
1200 | |||
1201 | ENTRY(dispatch_to_fault_handler) | ||
1202 | /* | ||
1203 | * Input: | ||
1204 | * psr.ic: off | ||
1205 | * r19: fault vector number (e.g., 24 for General Exception) | ||
1206 | * r31: contains saved predicates (pr) | ||
1207 | */ | ||
1208 | SAVE_MIN_WITH_COVER_R19 | ||
1209 | alloc r14=ar.pfs,0,0,5,0 | ||
1210 | mov out0=r15 | ||
1211 | mov out1=cr.isr | ||
1212 | mov out2=cr.ifa | ||
1213 | mov out3=cr.iim | ||
1214 | mov out4=cr.itir | ||
1215 | ;; | ||
1216 | ssm psr.ic | PSR_DEFAULT_BITS | ||
1217 | ;; | ||
1218 | srlz.i // guarantee that interruption collection is on | ||
1219 | ;; | ||
1220 | (p15) ssm psr.i // restore psr.i | ||
1221 | adds r3=8,r2 // set up second base pointer for SAVE_REST | ||
1222 | ;; | ||
1223 | SAVE_REST | ||
1224 | movl r14=ia64_leave_kernel | ||
1225 | ;; | ||
1226 | mov rp=r14 | ||
1227 | br.call.sptk.many b6=ia64_fault | ||
1228 | END(dispatch_to_fault_handler) | ||
1229 | |||
1230 | // | 1101 | // |
1231 | // --- End of long entries, Beginning of short entries | 1102 | // --- End of long entries, Beginning of short entries |
1232 | // | 1103 | // |
@@ -1236,8 +1107,8 @@ END(dispatch_to_fault_handler) | |||
1236 | // 0x5000 Entry 20 (size 16 bundles) Page Not Present (10,22,49) | 1107 | // 0x5000 Entry 20 (size 16 bundles) Page Not Present (10,22,49) |
1237 | ENTRY(page_not_present) | 1108 | ENTRY(page_not_present) |
1238 | DBG_FAULT(20) | 1109 | DBG_FAULT(20) |
1239 | mov r16=cr.ifa | 1110 | MOV_FROM_IFA(r16) |
1240 | rsm psr.dt | 1111 | RSM_PSR_DT |
1241 | /* | 1112 | /* |
1242 | * The Linux page fault handler doesn't expect non-present pages to be in | 1113 | * The Linux page fault handler doesn't expect non-present pages to be in |
1243 | * the TLB. Flush the existing entry now, so we meet that expectation. | 1114 | * the TLB. Flush the existing entry now, so we meet that expectation. |
@@ -1256,8 +1127,8 @@ END(page_not_present) | |||
1256 | // 0x5100 Entry 21 (size 16 bundles) Key Permission (13,25,52) | 1127 | // 0x5100 Entry 21 (size 16 bundles) Key Permission (13,25,52) |
1257 | ENTRY(key_permission) | 1128 | ENTRY(key_permission) |
1258 | DBG_FAULT(21) | 1129 | DBG_FAULT(21) |
1259 | mov r16=cr.ifa | 1130 | MOV_FROM_IFA(r16) |
1260 | rsm psr.dt | 1131 | RSM_PSR_DT |
1261 | mov r31=pr | 1132 | mov r31=pr |
1262 | ;; | 1133 | ;; |
1263 | srlz.d | 1134 | srlz.d |
@@ -1269,8 +1140,8 @@ END(key_permission) | |||
1269 | // 0x5200 Entry 22 (size 16 bundles) Instruction Access Rights (26) | 1140 | // 0x5200 Entry 22 (size 16 bundles) Instruction Access Rights (26) |
1270 | ENTRY(iaccess_rights) | 1141 | ENTRY(iaccess_rights) |
1271 | DBG_FAULT(22) | 1142 | DBG_FAULT(22) |
1272 | mov r16=cr.ifa | 1143 | MOV_FROM_IFA(r16) |
1273 | rsm psr.dt | 1144 | RSM_PSR_DT |
1274 | mov r31=pr | 1145 | mov r31=pr |
1275 | ;; | 1146 | ;; |
1276 | srlz.d | 1147 | srlz.d |
@@ -1282,8 +1153,8 @@ END(iaccess_rights) | |||
1282 | // 0x5300 Entry 23 (size 16 bundles) Data Access Rights (14,53) | 1153 | // 0x5300 Entry 23 (size 16 bundles) Data Access Rights (14,53) |
1283 | ENTRY(daccess_rights) | 1154 | ENTRY(daccess_rights) |
1284 | DBG_FAULT(23) | 1155 | DBG_FAULT(23) |
1285 | mov r16=cr.ifa | 1156 | MOV_FROM_IFA(r16) |
1286 | rsm psr.dt | 1157 | RSM_PSR_DT |
1287 | mov r31=pr | 1158 | mov r31=pr |
1288 | ;; | 1159 | ;; |
1289 | srlz.d | 1160 | srlz.d |
@@ -1295,7 +1166,7 @@ END(daccess_rights) | |||
1295 | // 0x5400 Entry 24 (size 16 bundles) General Exception (5,32,34,36,38,39) | 1166 | // 0x5400 Entry 24 (size 16 bundles) General Exception (5,32,34,36,38,39) |
1296 | ENTRY(general_exception) | 1167 | ENTRY(general_exception) |
1297 | DBG_FAULT(24) | 1168 | DBG_FAULT(24) |
1298 | mov r16=cr.isr | 1169 | MOV_FROM_ISR(r16) |
1299 | mov r31=pr | 1170 | mov r31=pr |
1300 | ;; | 1171 | ;; |
1301 | cmp4.eq p6,p0=0,r16 | 1172 | cmp4.eq p6,p0=0,r16 |
@@ -1324,8 +1195,8 @@ END(disabled_fp_reg) | |||
1324 | ENTRY(nat_consumption) | 1195 | ENTRY(nat_consumption) |
1325 | DBG_FAULT(26) | 1196 | DBG_FAULT(26) |
1326 | 1197 | ||
1327 | mov r16=cr.ipsr | 1198 | MOV_FROM_IPSR(p0, r16) |
1328 | mov r17=cr.isr | 1199 | MOV_FROM_ISR(r17) |
1329 | mov r31=pr // save PR | 1200 | mov r31=pr // save PR |
1330 | ;; | 1201 | ;; |
1331 | and r18=0xf,r17 // r18 = cr.ipsr.code{3:0} | 1202 | and r18=0xf,r17 // r18 = cr.ipsr.code{3:0} |
@@ -1335,10 +1206,10 @@ ENTRY(nat_consumption) | |||
1335 | dep r16=-1,r16,IA64_PSR_ED_BIT,1 | 1206 | dep r16=-1,r16,IA64_PSR_ED_BIT,1 |
1336 | (p6) br.cond.spnt 1f // branch if (cr.ispr.na == 0 || cr.ipsr.code{3:0} != LFETCH) | 1207 | (p6) br.cond.spnt 1f // branch if (cr.ispr.na == 0 || cr.ipsr.code{3:0} != LFETCH) |
1337 | ;; | 1208 | ;; |
1338 | mov cr.ipsr=r16 // set cr.ipsr.na | 1209 | MOV_TO_IPSR(p0, r16, r18) |
1339 | mov pr=r31,-1 | 1210 | mov pr=r31,-1 |
1340 | ;; | 1211 | ;; |
1341 | rfi | 1212 | RFI |
1342 | 1213 | ||
1343 | 1: mov pr=r31,-1 | 1214 | 1: mov pr=r31,-1 |
1344 | ;; | 1215 | ;; |
@@ -1360,26 +1231,26 @@ ENTRY(speculation_vector) | |||
1360 | * | 1231 | * |
1361 | * cr.imm contains zero_ext(imm21) | 1232 | * cr.imm contains zero_ext(imm21) |
1362 | */ | 1233 | */ |
1363 | mov r18=cr.iim | 1234 | MOV_FROM_IIM(r18) |
1364 | ;; | 1235 | ;; |
1365 | mov r17=cr.iip | 1236 | MOV_FROM_IIP(r17) |
1366 | shl r18=r18,43 // put sign bit in position (43=64-21) | 1237 | shl r18=r18,43 // put sign bit in position (43=64-21) |
1367 | ;; | 1238 | ;; |
1368 | 1239 | ||
1369 | mov r16=cr.ipsr | 1240 | MOV_FROM_IPSR(p0, r16) |
1370 | shr r18=r18,39 // sign extend (39=43-4) | 1241 | shr r18=r18,39 // sign extend (39=43-4) |
1371 | ;; | 1242 | ;; |
1372 | 1243 | ||
1373 | add r17=r17,r18 // now add the offset | 1244 | add r17=r17,r18 // now add the offset |
1374 | ;; | 1245 | ;; |
1375 | mov cr.iip=r17 | 1246 | MOV_FROM_IIP(r17) |
1376 | dep r16=0,r16,41,2 // clear EI | 1247 | dep r16=0,r16,41,2 // clear EI |
1377 | ;; | 1248 | ;; |
1378 | 1249 | ||
1379 | mov cr.ipsr=r16 | 1250 | MOV_FROM_IPSR(p0, r16) |
1380 | ;; | 1251 | ;; |
1381 | 1252 | ||
1382 | rfi // and go back | 1253 | RFI |
1383 | END(speculation_vector) | 1254 | END(speculation_vector) |
1384 | 1255 | ||
1385 | .org ia64_ivt+0x5800 | 1256 | .org ia64_ivt+0x5800 |
@@ -1517,11 +1388,11 @@ ENTRY(ia32_intercept) | |||
1517 | DBG_FAULT(46) | 1388 | DBG_FAULT(46) |
1518 | #ifdef CONFIG_IA32_SUPPORT | 1389 | #ifdef CONFIG_IA32_SUPPORT |
1519 | mov r31=pr | 1390 | mov r31=pr |
1520 | mov r16=cr.isr | 1391 | MOV_FROM_ISR(r16) |
1521 | ;; | 1392 | ;; |
1522 | extr.u r17=r16,16,8 // get ISR.code | 1393 | extr.u r17=r16,16,8 // get ISR.code |
1523 | mov r18=ar.eflag | 1394 | mov r18=ar.eflag |
1524 | mov r19=cr.iim // old eflag value | 1395 | MOV_FROM_IIM(r19) // old eflag value |
1525 | ;; | 1396 | ;; |
1526 | cmp.ne p6,p0=2,r17 | 1397 | cmp.ne p6,p0=2,r17 |
1527 | (p6) br.cond.spnt 1f // not a system flag fault | 1398 | (p6) br.cond.spnt 1f // not a system flag fault |
@@ -1533,7 +1404,7 @@ ENTRY(ia32_intercept) | |||
1533 | (p6) br.cond.spnt 1f // eflags.ac bit didn't change | 1404 | (p6) br.cond.spnt 1f // eflags.ac bit didn't change |
1534 | ;; | 1405 | ;; |
1535 | mov pr=r31,-1 // restore predicate registers | 1406 | mov pr=r31,-1 // restore predicate registers |
1536 | rfi | 1407 | RFI |
1537 | 1408 | ||
1538 | 1: | 1409 | 1: |
1539 | #endif // CONFIG_IA32_SUPPORT | 1410 | #endif // CONFIG_IA32_SUPPORT |
@@ -1673,6 +1544,137 @@ END(ia32_interrupt) | |||
1673 | DBG_FAULT(67) | 1544 | DBG_FAULT(67) |
1674 | FAULT(67) | 1545 | FAULT(67) |
1675 | 1546 | ||
1547 | //----------------------------------------------------------------------------------- | ||
1548 | // call do_page_fault (predicates are in r31, psr.dt may be off, r16 is faulting address) | ||
1549 | ENTRY(page_fault) | ||
1550 | SSM_PSR_DT_AND_SRLZ_I | ||
1551 | ;; | ||
1552 | SAVE_MIN_WITH_COVER | ||
1553 | alloc r15=ar.pfs,0,0,3,0 | ||
1554 | MOV_FROM_IFA(out0) | ||
1555 | MOV_FROM_ISR(out1) | ||
1556 | SSM_PSR_IC_AND_DEFAULT_BITS_AND_SRLZ_I(r14, r3) | ||
1557 | adds r3=8,r2 // set up second base pointer | ||
1558 | SSM_PSR_I(p15, p15, r14) // restore psr.i | ||
1559 | movl r14=ia64_leave_kernel | ||
1560 | ;; | ||
1561 | SAVE_REST | ||
1562 | mov rp=r14 | ||
1563 | ;; | ||
1564 | adds out2=16,r12 // out2 = pointer to pt_regs | ||
1565 | br.call.sptk.many b6=ia64_do_page_fault // ignore return address | ||
1566 | END(page_fault) | ||
1567 | |||
1568 | ENTRY(non_syscall) | ||
1569 | mov ar.rsc=r27 // restore ar.rsc before SAVE_MIN_WITH_COVER | ||
1570 | ;; | ||
1571 | SAVE_MIN_WITH_COVER | ||
1572 | |||
1573 | // There is no particular reason for this code to be here, other than that | ||
1574 | // there happens to be space here that would go unused otherwise. If this | ||
1575 | // fault ever gets "unreserved", simply moved the following code to a more | ||
1576 | // suitable spot... | ||
1577 | |||
1578 | alloc r14=ar.pfs,0,0,2,0 | ||
1579 | MOV_FROM_IIM(out0) | ||
1580 | add out1=16,sp | ||
1581 | adds r3=8,r2 // set up second base pointer for SAVE_REST | ||
1582 | |||
1583 | SSM_PSR_IC_AND_DEFAULT_BITS_AND_SRLZ_I(r15, r24) | ||
1584 | // guarantee that interruption collection is on | ||
1585 | SSM_PSR_I(p15, p15, r15) // restore psr.i | ||
1586 | movl r15=ia64_leave_kernel | ||
1587 | ;; | ||
1588 | SAVE_REST | ||
1589 | mov rp=r15 | ||
1590 | ;; | ||
1591 | br.call.sptk.many b6=ia64_bad_break // avoid WAW on CFM and ignore return addr | ||
1592 | END(non_syscall) | ||
1593 | |||
1594 | ENTRY(__interrupt) | ||
1595 | DBG_FAULT(12) | ||
1596 | mov r31=pr // prepare to save predicates | ||
1597 | ;; | ||
1598 | SAVE_MIN_WITH_COVER // uses r31; defines r2 and r3 | ||
1599 | SSM_PSR_IC_AND_DEFAULT_BITS_AND_SRLZ_I(r3, r14) | ||
1600 | // ensure everybody knows psr.ic is back on | ||
1601 | adds r3=8,r2 // set up second base pointer for SAVE_REST | ||
1602 | ;; | ||
1603 | SAVE_REST | ||
1604 | ;; | ||
1605 | MCA_RECOVER_RANGE(interrupt) | ||
1606 | alloc r14=ar.pfs,0,0,2,0 // must be first in an insn group | ||
1607 | MOV_FROM_IVR(out0, r8) // pass cr.ivr as first arg | ||
1608 | add out1=16,sp // pass pointer to pt_regs as second arg | ||
1609 | ;; | ||
1610 | srlz.d // make sure we see the effect of cr.ivr | ||
1611 | movl r14=ia64_leave_kernel | ||
1612 | ;; | ||
1613 | mov rp=r14 | ||
1614 | br.call.sptk.many b6=ia64_handle_irq | ||
1615 | END(__interrupt) | ||
1616 | |||
1617 | /* | ||
1618 | * There is no particular reason for this code to be here, other than that | ||
1619 | * there happens to be space here that would go unused otherwise. If this | ||
1620 | * fault ever gets "unreserved", simply moved the following code to a more | ||
1621 | * suitable spot... | ||
1622 | */ | ||
1623 | |||
1624 | ENTRY(dispatch_unaligned_handler) | ||
1625 | SAVE_MIN_WITH_COVER | ||
1626 | ;; | ||
1627 | alloc r14=ar.pfs,0,0,2,0 // now it's safe (must be first in insn group!) | ||
1628 | MOV_FROM_IFA(out0) | ||
1629 | adds out1=16,sp | ||
1630 | |||
1631 | SSM_PSR_IC_AND_DEFAULT_BITS_AND_SRLZ_I(r3, r24) | ||
1632 | // guarantee that interruption collection is on | ||
1633 | SSM_PSR_I(p15, p15, r3) // restore psr.i | ||
1634 | adds r3=8,r2 // set up second base pointer | ||
1635 | ;; | ||
1636 | SAVE_REST | ||
1637 | movl r14=ia64_leave_kernel | ||
1638 | ;; | ||
1639 | mov rp=r14 | ||
1640 | br.sptk.many ia64_prepare_handle_unaligned | ||
1641 | END(dispatch_unaligned_handler) | ||
1642 | |||
1643 | /* | ||
1644 | * There is no particular reason for this code to be here, other than that | ||
1645 | * there happens to be space here that would go unused otherwise. If this | ||
1646 | * fault ever gets "unreserved", simply moved the following code to a more | ||
1647 | * suitable spot... | ||
1648 | */ | ||
1649 | |||
1650 | ENTRY(dispatch_to_fault_handler) | ||
1651 | /* | ||
1652 | * Input: | ||
1653 | * psr.ic: off | ||
1654 | * r19: fault vector number (e.g., 24 for General Exception) | ||
1655 | * r31: contains saved predicates (pr) | ||
1656 | */ | ||
1657 | SAVE_MIN_WITH_COVER_R19 | ||
1658 | alloc r14=ar.pfs,0,0,5,0 | ||
1659 | MOV_FROM_ISR(out1) | ||
1660 | MOV_FROM_IFA(out2) | ||
1661 | MOV_FROM_IIM(out3) | ||
1662 | MOV_FROM_ITIR(out4) | ||
1663 | ;; | ||
1664 | SSM_PSR_IC_AND_DEFAULT_BITS_AND_SRLZ_I(r3, out0) | ||
1665 | // guarantee that interruption collection is on | ||
1666 | mov out0=r15 | ||
1667 | ;; | ||
1668 | SSM_PSR_I(p15, p15, r3) // restore psr.i | ||
1669 | adds r3=8,r2 // set up second base pointer for SAVE_REST | ||
1670 | ;; | ||
1671 | SAVE_REST | ||
1672 | movl r14=ia64_leave_kernel | ||
1673 | ;; | ||
1674 | mov rp=r14 | ||
1675 | br.call.sptk.many b6=ia64_fault | ||
1676 | END(dispatch_to_fault_handler) | ||
1677 | |||
1676 | /* | 1678 | /* |
1677 | * Squatting in this space ... | 1679 | * Squatting in this space ... |
1678 | * | 1680 | * |
@@ -1686,11 +1688,10 @@ ENTRY(dispatch_illegal_op_fault) | |||
1686 | .prologue | 1688 | .prologue |
1687 | .body | 1689 | .body |
1688 | SAVE_MIN_WITH_COVER | 1690 | SAVE_MIN_WITH_COVER |
1689 | ssm psr.ic | PSR_DEFAULT_BITS | 1691 | SSM_PSR_IC_AND_DEFAULT_BITS_AND_SRLZ_I(r3, r24) |
1690 | ;; | 1692 | // guarantee that interruption collection is on |
1691 | srlz.i // guarantee that interruption collection is on | ||
1692 | ;; | 1693 | ;; |
1693 | (p15) ssm psr.i // restore psr.i | 1694 | SSM_PSR_I(p15, p15, r3) // restore psr.i |
1694 | adds r3=8,r2 // set up second base pointer for SAVE_REST | 1695 | adds r3=8,r2 // set up second base pointer for SAVE_REST |
1695 | ;; | 1696 | ;; |
1696 | alloc r14=ar.pfs,0,0,1,0 // must be first in insn group | 1697 | alloc r14=ar.pfs,0,0,1,0 // must be first in insn group |
@@ -1729,12 +1730,11 @@ END(dispatch_illegal_op_fault) | |||
1729 | ENTRY(dispatch_to_ia32_handler) | 1730 | ENTRY(dispatch_to_ia32_handler) |
1730 | SAVE_MIN | 1731 | SAVE_MIN |
1731 | ;; | 1732 | ;; |
1732 | mov r14=cr.isr | 1733 | MOV_FROM_ISR(r14) |
1733 | ssm psr.ic | PSR_DEFAULT_BITS | 1734 | SSM_PSR_IC_AND_DEFAULT_BITS_AND_SRLZ_I(r3, r24) |
1734 | ;; | 1735 | // guarantee that interruption collection is on |
1735 | srlz.i // guarantee that interruption collection is on | ||
1736 | ;; | 1736 | ;; |
1737 | (p15) ssm psr.i | 1737 | SSM_PSR_I(p15, p15, r3) |
1738 | adds r3=8,r2 // Base pointer for SAVE_REST | 1738 | adds r3=8,r2 // Base pointer for SAVE_REST |
1739 | ;; | 1739 | ;; |
1740 | SAVE_REST | 1740 | SAVE_REST |
diff --git a/arch/ia64/kernel/minstate.h b/arch/ia64/kernel/minstate.h index 74b6d670aaef..292e214a3b84 100644 --- a/arch/ia64/kernel/minstate.h +++ b/arch/ia64/kernel/minstate.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #include <asm/cache.h> | 2 | #include <asm/cache.h> |
3 | 3 | ||
4 | #include "entry.h" | 4 | #include "entry.h" |
5 | #include "paravirt_inst.h" | ||
5 | 6 | ||
6 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING | 7 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING |
7 | /* read ar.itc in advance, and use it before leaving bank 0 */ | 8 | /* read ar.itc in advance, and use it before leaving bank 0 */ |
@@ -43,16 +44,16 @@ | |||
43 | * Note that psr.ic is NOT turned on by this macro. This is so that | 44 | * Note that psr.ic is NOT turned on by this macro. This is so that |
44 | * we can pass interruption state as arguments to a handler. | 45 | * we can pass interruption state as arguments to a handler. |
45 | */ | 46 | */ |
46 | #define DO_SAVE_MIN(COVER,SAVE_IFS,EXTRA,WORKAROUND) \ | 47 | #define IA64_NATIVE_DO_SAVE_MIN(__COVER,SAVE_IFS,EXTRA,WORKAROUND) \ |
47 | mov r16=IA64_KR(CURRENT); /* M */ \ | 48 | mov r16=IA64_KR(CURRENT); /* M */ \ |
48 | mov r27=ar.rsc; /* M */ \ | 49 | mov r27=ar.rsc; /* M */ \ |
49 | mov r20=r1; /* A */ \ | 50 | mov r20=r1; /* A */ \ |
50 | mov r25=ar.unat; /* M */ \ | 51 | mov r25=ar.unat; /* M */ \ |
51 | mov r29=cr.ipsr; /* M */ \ | 52 | MOV_FROM_IPSR(p0,r29); /* M */ \ |
52 | mov r26=ar.pfs; /* I */ \ | 53 | mov r26=ar.pfs; /* I */ \ |
53 | mov r28=cr.iip; /* M */ \ | 54 | MOV_FROM_IIP(r28); /* M */ \ |
54 | mov r21=ar.fpsr; /* M */ \ | 55 | mov r21=ar.fpsr; /* M */ \ |
55 | COVER; /* B;; (or nothing) */ \ | 56 | __COVER; /* B;; (or nothing) */ \ |
56 | ;; \ | 57 | ;; \ |
57 | adds r16=IA64_TASK_THREAD_ON_USTACK_OFFSET,r16; \ | 58 | adds r16=IA64_TASK_THREAD_ON_USTACK_OFFSET,r16; \ |
58 | ;; \ | 59 | ;; \ |
@@ -244,6 +245,6 @@ | |||
244 | 1: \ | 245 | 1: \ |
245 | .pred.rel "mutex", pKStk, pUStk | 246 | .pred.rel "mutex", pKStk, pUStk |
246 | 247 | ||
247 | #define SAVE_MIN_WITH_COVER DO_SAVE_MIN(cover, mov r30=cr.ifs, , RSE_WORKAROUND) | 248 | #define SAVE_MIN_WITH_COVER DO_SAVE_MIN(COVER, mov r30=cr.ifs, , RSE_WORKAROUND) |
248 | #define SAVE_MIN_WITH_COVER_R19 DO_SAVE_MIN(cover, mov r30=cr.ifs, mov r15=r19, RSE_WORKAROUND) | 249 | #define SAVE_MIN_WITH_COVER_R19 DO_SAVE_MIN(COVER, mov r30=cr.ifs, mov r15=r19, RSE_WORKAROUND) |
249 | #define SAVE_MIN DO_SAVE_MIN( , mov r30=r0, , ) | 250 | #define SAVE_MIN DO_SAVE_MIN( , mov r30=r0, , ) |
diff --git a/arch/ia64/kernel/module.c b/arch/ia64/kernel/module.c index e83e2ea3b3e0..29aad349e0c4 100644 --- a/arch/ia64/kernel/module.c +++ b/arch/ia64/kernel/module.c | |||
@@ -321,7 +321,8 @@ module_alloc (unsigned long size) | |||
321 | void | 321 | void |
322 | module_free (struct module *mod, void *module_region) | 322 | module_free (struct module *mod, void *module_region) |
323 | { | 323 | { |
324 | if (mod->arch.init_unw_table && module_region == mod->module_init) { | 324 | if (mod && mod->arch.init_unw_table && |
325 | module_region == mod->module_init) { | ||
325 | unw_remove_unwind_table(mod->arch.init_unw_table); | 326 | unw_remove_unwind_table(mod->arch.init_unw_table); |
326 | mod->arch.init_unw_table = NULL; | 327 | mod->arch.init_unw_table = NULL; |
327 | } | 328 | } |
diff --git a/arch/ia64/kernel/nr-irqs.c b/arch/ia64/kernel/nr-irqs.c new file mode 100644 index 000000000000..1ae049181e83 --- /dev/null +++ b/arch/ia64/kernel/nr-irqs.c | |||
@@ -0,0 +1,24 @@ | |||
1 | /* | ||
2 | * calculate | ||
3 | * NR_IRQS = max(IA64_NATIVE_NR_IRQS, XEN_NR_IRQS, FOO_NR_IRQS...) | ||
4 | * depending on config. | ||
5 | * This must be calculated before processing asm-offset.c. | ||
6 | */ | ||
7 | |||
8 | #define ASM_OFFSETS_C 1 | ||
9 | |||
10 | #include <linux/kbuild.h> | ||
11 | #include <linux/threads.h> | ||
12 | #include <asm-ia64/native/irq.h> | ||
13 | |||
14 | void foo(void) | ||
15 | { | ||
16 | union paravirt_nr_irqs_max { | ||
17 | char ia64_native_nr_irqs[IA64_NATIVE_NR_IRQS]; | ||
18 | #ifdef CONFIG_XEN | ||
19 | char xen_nr_irqs[XEN_NR_IRQS]; | ||
20 | #endif | ||
21 | }; | ||
22 | |||
23 | DEFINE(NR_IRQS, sizeof (union paravirt_nr_irqs_max)); | ||
24 | } | ||
diff --git a/arch/ia64/kernel/paravirt.c b/arch/ia64/kernel/paravirt.c new file mode 100644 index 000000000000..afaf5b9a2cf0 --- /dev/null +++ b/arch/ia64/kernel/paravirt.c | |||
@@ -0,0 +1,369 @@ | |||
1 | /****************************************************************************** | ||
2 | * arch/ia64/kernel/paravirt.c | ||
3 | * | ||
4 | * Copyright (c) 2008 Isaku Yamahata <yamahata at valinux co jp> | ||
5 | * VA Linux Systems Japan K.K. | ||
6 | * Yaozu (Eddie) Dong <eddie.dong@intel.com> | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License as published by | ||
10 | * the Free Software Foundation; either version 2 of the License, or | ||
11 | * (at your option) any later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program; if not, write to the Free Software | ||
20 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
21 | * | ||
22 | */ | ||
23 | |||
24 | #include <linux/init.h> | ||
25 | |||
26 | #include <linux/compiler.h> | ||
27 | #include <linux/io.h> | ||
28 | #include <linux/irq.h> | ||
29 | #include <linux/module.h> | ||
30 | #include <linux/types.h> | ||
31 | |||
32 | #include <asm/iosapic.h> | ||
33 | #include <asm/paravirt.h> | ||
34 | |||
35 | /*************************************************************************** | ||
36 | * general info | ||
37 | */ | ||
38 | struct pv_info pv_info = { | ||
39 | .kernel_rpl = 0, | ||
40 | .paravirt_enabled = 0, | ||
41 | .name = "bare hardware" | ||
42 | }; | ||
43 | |||
44 | /*************************************************************************** | ||
45 | * pv_init_ops | ||
46 | * initialization hooks. | ||
47 | */ | ||
48 | |||
49 | struct pv_init_ops pv_init_ops; | ||
50 | |||
51 | /*************************************************************************** | ||
52 | * pv_cpu_ops | ||
53 | * intrinsics hooks. | ||
54 | */ | ||
55 | |||
56 | /* ia64_native_xxx are macros so that we have to make them real functions */ | ||
57 | |||
58 | #define DEFINE_VOID_FUNC1(name) \ | ||
59 | static void \ | ||
60 | ia64_native_ ## name ## _func(unsigned long arg) \ | ||
61 | { \ | ||
62 | ia64_native_ ## name(arg); \ | ||
63 | } \ | ||
64 | |||
65 | #define DEFINE_VOID_FUNC2(name) \ | ||
66 | static void \ | ||
67 | ia64_native_ ## name ## _func(unsigned long arg0, \ | ||
68 | unsigned long arg1) \ | ||
69 | { \ | ||
70 | ia64_native_ ## name(arg0, arg1); \ | ||
71 | } \ | ||
72 | |||
73 | #define DEFINE_FUNC0(name) \ | ||
74 | static unsigned long \ | ||
75 | ia64_native_ ## name ## _func(void) \ | ||
76 | { \ | ||
77 | return ia64_native_ ## name(); \ | ||
78 | } | ||
79 | |||
80 | #define DEFINE_FUNC1(name, type) \ | ||
81 | static unsigned long \ | ||
82 | ia64_native_ ## name ## _func(type arg) \ | ||
83 | { \ | ||
84 | return ia64_native_ ## name(arg); \ | ||
85 | } \ | ||
86 | |||
87 | DEFINE_VOID_FUNC1(fc); | ||
88 | DEFINE_VOID_FUNC1(intrin_local_irq_restore); | ||
89 | |||
90 | DEFINE_VOID_FUNC2(ptcga); | ||
91 | DEFINE_VOID_FUNC2(set_rr); | ||
92 | |||
93 | DEFINE_FUNC0(get_psr_i); | ||
94 | |||
95 | DEFINE_FUNC1(thash, unsigned long); | ||
96 | DEFINE_FUNC1(get_cpuid, int); | ||
97 | DEFINE_FUNC1(get_pmd, int); | ||
98 | DEFINE_FUNC1(get_rr, unsigned long); | ||
99 | |||
100 | static void | ||
101 | ia64_native_ssm_i_func(void) | ||
102 | { | ||
103 | ia64_native_ssm(IA64_PSR_I); | ||
104 | } | ||
105 | |||
106 | static void | ||
107 | ia64_native_rsm_i_func(void) | ||
108 | { | ||
109 | ia64_native_rsm(IA64_PSR_I); | ||
110 | } | ||
111 | |||
112 | static void | ||
113 | ia64_native_set_rr0_to_rr4_func(unsigned long val0, unsigned long val1, | ||
114 | unsigned long val2, unsigned long val3, | ||
115 | unsigned long val4) | ||
116 | { | ||
117 | ia64_native_set_rr0_to_rr4(val0, val1, val2, val3, val4); | ||
118 | } | ||
119 | |||
120 | #define CASE_GET_REG(id) \ | ||
121 | case _IA64_REG_ ## id: \ | ||
122 | res = ia64_native_getreg(_IA64_REG_ ## id); \ | ||
123 | break; | ||
124 | #define CASE_GET_AR(id) CASE_GET_REG(AR_ ## id) | ||
125 | #define CASE_GET_CR(id) CASE_GET_REG(CR_ ## id) | ||
126 | |||
127 | unsigned long | ||
128 | ia64_native_getreg_func(int regnum) | ||
129 | { | ||
130 | unsigned long res = -1; | ||
131 | switch (regnum) { | ||
132 | CASE_GET_REG(GP); | ||
133 | CASE_GET_REG(IP); | ||
134 | CASE_GET_REG(PSR); | ||
135 | CASE_GET_REG(TP); | ||
136 | CASE_GET_REG(SP); | ||
137 | |||
138 | CASE_GET_AR(KR0); | ||
139 | CASE_GET_AR(KR1); | ||
140 | CASE_GET_AR(KR2); | ||
141 | CASE_GET_AR(KR3); | ||
142 | CASE_GET_AR(KR4); | ||
143 | CASE_GET_AR(KR5); | ||
144 | CASE_GET_AR(KR6); | ||
145 | CASE_GET_AR(KR7); | ||
146 | CASE_GET_AR(RSC); | ||
147 | CASE_GET_AR(BSP); | ||
148 | CASE_GET_AR(BSPSTORE); | ||
149 | CASE_GET_AR(RNAT); | ||
150 | CASE_GET_AR(FCR); | ||
151 | CASE_GET_AR(EFLAG); | ||
152 | CASE_GET_AR(CSD); | ||
153 | CASE_GET_AR(SSD); | ||
154 | CASE_GET_AR(CFLAG); | ||
155 | CASE_GET_AR(FSR); | ||
156 | CASE_GET_AR(FIR); | ||
157 | CASE_GET_AR(FDR); | ||
158 | CASE_GET_AR(CCV); | ||
159 | CASE_GET_AR(UNAT); | ||
160 | CASE_GET_AR(FPSR); | ||
161 | CASE_GET_AR(ITC); | ||
162 | CASE_GET_AR(PFS); | ||
163 | CASE_GET_AR(LC); | ||
164 | CASE_GET_AR(EC); | ||
165 | |||
166 | CASE_GET_CR(DCR); | ||
167 | CASE_GET_CR(ITM); | ||
168 | CASE_GET_CR(IVA); | ||
169 | CASE_GET_CR(PTA); | ||
170 | CASE_GET_CR(IPSR); | ||
171 | CASE_GET_CR(ISR); | ||
172 | CASE_GET_CR(IIP); | ||
173 | CASE_GET_CR(IFA); | ||
174 | CASE_GET_CR(ITIR); | ||
175 | CASE_GET_CR(IIPA); | ||
176 | CASE_GET_CR(IFS); | ||
177 | CASE_GET_CR(IIM); | ||
178 | CASE_GET_CR(IHA); | ||
179 | CASE_GET_CR(LID); | ||
180 | CASE_GET_CR(IVR); | ||
181 | CASE_GET_CR(TPR); | ||
182 | CASE_GET_CR(EOI); | ||
183 | CASE_GET_CR(IRR0); | ||
184 | CASE_GET_CR(IRR1); | ||
185 | CASE_GET_CR(IRR2); | ||
186 | CASE_GET_CR(IRR3); | ||
187 | CASE_GET_CR(ITV); | ||
188 | CASE_GET_CR(PMV); | ||
189 | CASE_GET_CR(CMCV); | ||
190 | CASE_GET_CR(LRR0); | ||
191 | CASE_GET_CR(LRR1); | ||
192 | |||
193 | default: | ||
194 | printk(KERN_CRIT "wrong_getreg %d\n", regnum); | ||
195 | break; | ||
196 | } | ||
197 | return res; | ||
198 | } | ||
199 | |||
200 | #define CASE_SET_REG(id) \ | ||
201 | case _IA64_REG_ ## id: \ | ||
202 | ia64_native_setreg(_IA64_REG_ ## id, val); \ | ||
203 | break; | ||
204 | #define CASE_SET_AR(id) CASE_SET_REG(AR_ ## id) | ||
205 | #define CASE_SET_CR(id) CASE_SET_REG(CR_ ## id) | ||
206 | |||
207 | void | ||
208 | ia64_native_setreg_func(int regnum, unsigned long val) | ||
209 | { | ||
210 | switch (regnum) { | ||
211 | case _IA64_REG_PSR_L: | ||
212 | ia64_native_setreg(_IA64_REG_PSR_L, val); | ||
213 | ia64_dv_serialize_data(); | ||
214 | break; | ||
215 | CASE_SET_REG(SP); | ||
216 | CASE_SET_REG(GP); | ||
217 | |||
218 | CASE_SET_AR(KR0); | ||
219 | CASE_SET_AR(KR1); | ||
220 | CASE_SET_AR(KR2); | ||
221 | CASE_SET_AR(KR3); | ||
222 | CASE_SET_AR(KR4); | ||
223 | CASE_SET_AR(KR5); | ||
224 | CASE_SET_AR(KR6); | ||
225 | CASE_SET_AR(KR7); | ||
226 | CASE_SET_AR(RSC); | ||
227 | CASE_SET_AR(BSP); | ||
228 | CASE_SET_AR(BSPSTORE); | ||
229 | CASE_SET_AR(RNAT); | ||
230 | CASE_SET_AR(FCR); | ||
231 | CASE_SET_AR(EFLAG); | ||
232 | CASE_SET_AR(CSD); | ||
233 | CASE_SET_AR(SSD); | ||
234 | CASE_SET_AR(CFLAG); | ||
235 | CASE_SET_AR(FSR); | ||
236 | CASE_SET_AR(FIR); | ||
237 | CASE_SET_AR(FDR); | ||
238 | CASE_SET_AR(CCV); | ||
239 | CASE_SET_AR(UNAT); | ||
240 | CASE_SET_AR(FPSR); | ||
241 | CASE_SET_AR(ITC); | ||
242 | CASE_SET_AR(PFS); | ||
243 | CASE_SET_AR(LC); | ||
244 | CASE_SET_AR(EC); | ||
245 | |||
246 | CASE_SET_CR(DCR); | ||
247 | CASE_SET_CR(ITM); | ||
248 | CASE_SET_CR(IVA); | ||
249 | CASE_SET_CR(PTA); | ||
250 | CASE_SET_CR(IPSR); | ||
251 | CASE_SET_CR(ISR); | ||
252 | CASE_SET_CR(IIP); | ||
253 | CASE_SET_CR(IFA); | ||
254 | CASE_SET_CR(ITIR); | ||
255 | CASE_SET_CR(IIPA); | ||
256 | CASE_SET_CR(IFS); | ||
257 | CASE_SET_CR(IIM); | ||
258 | CASE_SET_CR(IHA); | ||
259 | CASE_SET_CR(LID); | ||
260 | CASE_SET_CR(IVR); | ||
261 | CASE_SET_CR(TPR); | ||
262 | CASE_SET_CR(EOI); | ||
263 | CASE_SET_CR(IRR0); | ||
264 | CASE_SET_CR(IRR1); | ||
265 | CASE_SET_CR(IRR2); | ||
266 | CASE_SET_CR(IRR3); | ||
267 | CASE_SET_CR(ITV); | ||
268 | CASE_SET_CR(PMV); | ||
269 | CASE_SET_CR(CMCV); | ||
270 | CASE_SET_CR(LRR0); | ||
271 | CASE_SET_CR(LRR1); | ||
272 | default: | ||
273 | printk(KERN_CRIT "wrong setreg %d\n", regnum); | ||
274 | break; | ||
275 | } | ||
276 | } | ||
277 | |||
278 | struct pv_cpu_ops pv_cpu_ops = { | ||
279 | .fc = ia64_native_fc_func, | ||
280 | .thash = ia64_native_thash_func, | ||
281 | .get_cpuid = ia64_native_get_cpuid_func, | ||
282 | .get_pmd = ia64_native_get_pmd_func, | ||
283 | .ptcga = ia64_native_ptcga_func, | ||
284 | .get_rr = ia64_native_get_rr_func, | ||
285 | .set_rr = ia64_native_set_rr_func, | ||
286 | .set_rr0_to_rr4 = ia64_native_set_rr0_to_rr4_func, | ||
287 | .ssm_i = ia64_native_ssm_i_func, | ||
288 | .getreg = ia64_native_getreg_func, | ||
289 | .setreg = ia64_native_setreg_func, | ||
290 | .rsm_i = ia64_native_rsm_i_func, | ||
291 | .get_psr_i = ia64_native_get_psr_i_func, | ||
292 | .intrin_local_irq_restore | ||
293 | = ia64_native_intrin_local_irq_restore_func, | ||
294 | }; | ||
295 | EXPORT_SYMBOL(pv_cpu_ops); | ||
296 | |||
297 | /****************************************************************************** | ||
298 | * replacement of hand written assembly codes. | ||
299 | */ | ||
300 | |||
301 | void | ||
302 | paravirt_cpu_asm_init(const struct pv_cpu_asm_switch *cpu_asm_switch) | ||
303 | { | ||
304 | extern unsigned long paravirt_switch_to_targ; | ||
305 | extern unsigned long paravirt_leave_syscall_targ; | ||
306 | extern unsigned long paravirt_work_processed_syscall_targ; | ||
307 | extern unsigned long paravirt_leave_kernel_targ; | ||
308 | |||
309 | paravirt_switch_to_targ = cpu_asm_switch->switch_to; | ||
310 | paravirt_leave_syscall_targ = cpu_asm_switch->leave_syscall; | ||
311 | paravirt_work_processed_syscall_targ = | ||
312 | cpu_asm_switch->work_processed_syscall; | ||
313 | paravirt_leave_kernel_targ = cpu_asm_switch->leave_kernel; | ||
314 | } | ||
315 | |||
316 | /*************************************************************************** | ||
317 | * pv_iosapic_ops | ||
318 | * iosapic read/write hooks. | ||
319 | */ | ||
320 | |||
321 | static unsigned int | ||
322 | ia64_native_iosapic_read(char __iomem *iosapic, unsigned int reg) | ||
323 | { | ||
324 | return __ia64_native_iosapic_read(iosapic, reg); | ||
325 | } | ||
326 | |||
327 | static void | ||
328 | ia64_native_iosapic_write(char __iomem *iosapic, unsigned int reg, u32 val) | ||
329 | { | ||
330 | __ia64_native_iosapic_write(iosapic, reg, val); | ||
331 | } | ||
332 | |||
333 | struct pv_iosapic_ops pv_iosapic_ops = { | ||
334 | .pcat_compat_init = ia64_native_iosapic_pcat_compat_init, | ||
335 | .get_irq_chip = ia64_native_iosapic_get_irq_chip, | ||
336 | |||
337 | .__read = ia64_native_iosapic_read, | ||
338 | .__write = ia64_native_iosapic_write, | ||
339 | }; | ||
340 | |||
341 | /*************************************************************************** | ||
342 | * pv_irq_ops | ||
343 | * irq operations | ||
344 | */ | ||
345 | |||
346 | struct pv_irq_ops pv_irq_ops = { | ||
347 | .register_ipi = ia64_native_register_ipi, | ||
348 | |||
349 | .assign_irq_vector = ia64_native_assign_irq_vector, | ||
350 | .free_irq_vector = ia64_native_free_irq_vector, | ||
351 | .register_percpu_irq = ia64_native_register_percpu_irq, | ||
352 | |||
353 | .resend_irq = ia64_native_resend_irq, | ||
354 | }; | ||
355 | |||
356 | /*************************************************************************** | ||
357 | * pv_time_ops | ||
358 | * time operations | ||
359 | */ | ||
360 | |||
361 | static int | ||
362 | ia64_native_do_steal_accounting(unsigned long *new_itm) | ||
363 | { | ||
364 | return 0; | ||
365 | } | ||
366 | |||
367 | struct pv_time_ops pv_time_ops = { | ||
368 | .do_steal_accounting = ia64_native_do_steal_accounting, | ||
369 | }; | ||
diff --git a/arch/ia64/kernel/paravirt_inst.h b/arch/ia64/kernel/paravirt_inst.h new file mode 100644 index 000000000000..5cad6fb2ed19 --- /dev/null +++ b/arch/ia64/kernel/paravirt_inst.h | |||
@@ -0,0 +1,29 @@ | |||
1 | /****************************************************************************** | ||
2 | * linux/arch/ia64/xen/paravirt_inst.h | ||
3 | * | ||
4 | * Copyright (c) 2008 Isaku Yamahata <yamahata at valinux co jp> | ||
5 | * VA Linux Systems Japan K.K. | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | * GNU General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to the Free Software | ||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
20 | * | ||
21 | */ | ||
22 | |||
23 | #ifdef __IA64_ASM_PARAVIRTUALIZED_XEN | ||
24 | #include <asm/xen/inst.h> | ||
25 | #include <asm/xen/minstate.h> | ||
26 | #else | ||
27 | #include <asm/native/inst.h> | ||
28 | #endif | ||
29 | |||
diff --git a/arch/ia64/kernel/paravirtentry.S b/arch/ia64/kernel/paravirtentry.S new file mode 100644 index 000000000000..2f42fcb9776a --- /dev/null +++ b/arch/ia64/kernel/paravirtentry.S | |||
@@ -0,0 +1,60 @@ | |||
1 | /****************************************************************************** | ||
2 | * linux/arch/ia64/xen/paravirtentry.S | ||
3 | * | ||
4 | * Copyright (c) 2008 Isaku Yamahata <yamahata at valinux co jp> | ||
5 | * VA Linux Systems Japan K.K. | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | * GNU General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to the Free Software | ||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
20 | * | ||
21 | */ | ||
22 | |||
23 | #include <asm/asmmacro.h> | ||
24 | #include <asm/asm-offsets.h> | ||
25 | #include "entry.h" | ||
26 | |||
27 | #define DATA8(sym, init_value) \ | ||
28 | .pushsection .data.read_mostly ; \ | ||
29 | .align 8 ; \ | ||
30 | .global sym ; \ | ||
31 | sym: ; \ | ||
32 | data8 init_value ; \ | ||
33 | .popsection | ||
34 | |||
35 | #define BRANCH(targ, reg, breg) \ | ||
36 | movl reg=targ ; \ | ||
37 | ;; \ | ||
38 | ld8 reg=[reg] ; \ | ||
39 | ;; \ | ||
40 | mov breg=reg ; \ | ||
41 | br.cond.sptk.many breg | ||
42 | |||
43 | #define BRANCH_PROC(sym, reg, breg) \ | ||
44 | DATA8(paravirt_ ## sym ## _targ, ia64_native_ ## sym) ; \ | ||
45 | GLOBAL_ENTRY(paravirt_ ## sym) ; \ | ||
46 | BRANCH(paravirt_ ## sym ## _targ, reg, breg) ; \ | ||
47 | END(paravirt_ ## sym) | ||
48 | |||
49 | #define BRANCH_PROC_UNWINFO(sym, reg, breg) \ | ||
50 | DATA8(paravirt_ ## sym ## _targ, ia64_native_ ## sym) ; \ | ||
51 | GLOBAL_ENTRY(paravirt_ ## sym) ; \ | ||
52 | PT_REGS_UNWIND_INFO(0) ; \ | ||
53 | BRANCH(paravirt_ ## sym ## _targ, reg, breg) ; \ | ||
54 | END(paravirt_ ## sym) | ||
55 | |||
56 | |||
57 | BRANCH_PROC(switch_to, r22, b7) | ||
58 | BRANCH_PROC_UNWINFO(leave_syscall, r22, b7) | ||
59 | BRANCH_PROC(work_processed_syscall, r2, b7) | ||
60 | BRANCH_PROC_UNWINFO(leave_kernel, r22, b7) | ||
diff --git a/arch/ia64/kernel/setup.c b/arch/ia64/kernel/setup.c index 632cda8f2e76..e5c2de9b29a5 100644 --- a/arch/ia64/kernel/setup.c +++ b/arch/ia64/kernel/setup.c | |||
@@ -51,6 +51,7 @@ | |||
51 | #include <asm/mca.h> | 51 | #include <asm/mca.h> |
52 | #include <asm/meminit.h> | 52 | #include <asm/meminit.h> |
53 | #include <asm/page.h> | 53 | #include <asm/page.h> |
54 | #include <asm/paravirt.h> | ||
54 | #include <asm/patch.h> | 55 | #include <asm/patch.h> |
55 | #include <asm/pgtable.h> | 56 | #include <asm/pgtable.h> |
56 | #include <asm/processor.h> | 57 | #include <asm/processor.h> |
@@ -341,6 +342,8 @@ reserve_memory (void) | |||
341 | rsvd_region[n].end = (unsigned long) ia64_imva(_end); | 342 | rsvd_region[n].end = (unsigned long) ia64_imva(_end); |
342 | n++; | 343 | n++; |
343 | 344 | ||
345 | n += paravirt_reserve_memory(&rsvd_region[n]); | ||
346 | |||
344 | #ifdef CONFIG_BLK_DEV_INITRD | 347 | #ifdef CONFIG_BLK_DEV_INITRD |
345 | if (ia64_boot_param->initrd_start) { | 348 | if (ia64_boot_param->initrd_start) { |
346 | rsvd_region[n].start = (unsigned long)__va(ia64_boot_param->initrd_start); | 349 | rsvd_region[n].start = (unsigned long)__va(ia64_boot_param->initrd_start); |
@@ -519,6 +522,8 @@ setup_arch (char **cmdline_p) | |||
519 | { | 522 | { |
520 | unw_init(); | 523 | unw_init(); |
521 | 524 | ||
525 | paravirt_arch_setup_early(); | ||
526 | |||
522 | ia64_patch_vtop((u64) __start___vtop_patchlist, (u64) __end___vtop_patchlist); | 527 | ia64_patch_vtop((u64) __start___vtop_patchlist, (u64) __end___vtop_patchlist); |
523 | 528 | ||
524 | *cmdline_p = __va(ia64_boot_param->command_line); | 529 | *cmdline_p = __va(ia64_boot_param->command_line); |
@@ -583,6 +588,9 @@ setup_arch (char **cmdline_p) | |||
583 | acpi_boot_init(); | 588 | acpi_boot_init(); |
584 | #endif | 589 | #endif |
585 | 590 | ||
591 | paravirt_banner(); | ||
592 | paravirt_arch_setup_console(cmdline_p); | ||
593 | |||
586 | #ifdef CONFIG_VT | 594 | #ifdef CONFIG_VT |
587 | if (!conswitchp) { | 595 | if (!conswitchp) { |
588 | # if defined(CONFIG_DUMMY_CONSOLE) | 596 | # if defined(CONFIG_DUMMY_CONSOLE) |
@@ -602,6 +610,8 @@ setup_arch (char **cmdline_p) | |||
602 | #endif | 610 | #endif |
603 | 611 | ||
604 | /* enable IA-64 Machine Check Abort Handling unless disabled */ | 612 | /* enable IA-64 Machine Check Abort Handling unless disabled */ |
613 | if (paravirt_arch_setup_nomca()) | ||
614 | nomca = 1; | ||
605 | if (!nomca) | 615 | if (!nomca) |
606 | ia64_mca_init(); | 616 | ia64_mca_init(); |
607 | 617 | ||
diff --git a/arch/ia64/kernel/smpboot.c b/arch/ia64/kernel/smpboot.c index 9d1d429c6c59..03f1a9908afc 100644 --- a/arch/ia64/kernel/smpboot.c +++ b/arch/ia64/kernel/smpboot.c | |||
@@ -50,6 +50,7 @@ | |||
50 | #include <asm/machvec.h> | 50 | #include <asm/machvec.h> |
51 | #include <asm/mca.h> | 51 | #include <asm/mca.h> |
52 | #include <asm/page.h> | 52 | #include <asm/page.h> |
53 | #include <asm/paravirt.h> | ||
53 | #include <asm/pgalloc.h> | 54 | #include <asm/pgalloc.h> |
54 | #include <asm/pgtable.h> | 55 | #include <asm/pgtable.h> |
55 | #include <asm/processor.h> | 56 | #include <asm/processor.h> |
@@ -642,6 +643,7 @@ void __devinit smp_prepare_boot_cpu(void) | |||
642 | cpu_set(smp_processor_id(), cpu_online_map); | 643 | cpu_set(smp_processor_id(), cpu_online_map); |
643 | cpu_set(smp_processor_id(), cpu_callin_map); | 644 | cpu_set(smp_processor_id(), cpu_callin_map); |
644 | per_cpu(cpu_state, smp_processor_id()) = CPU_ONLINE; | 645 | per_cpu(cpu_state, smp_processor_id()) = CPU_ONLINE; |
646 | paravirt_post_smp_prepare_boot_cpu(); | ||
645 | } | 647 | } |
646 | 648 | ||
647 | #ifdef CONFIG_HOTPLUG_CPU | 649 | #ifdef CONFIG_HOTPLUG_CPU |
diff --git a/arch/ia64/kernel/time.c b/arch/ia64/kernel/time.c index aad1b7b1fff9..65c10a42c88f 100644 --- a/arch/ia64/kernel/time.c +++ b/arch/ia64/kernel/time.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <asm/machvec.h> | 24 | #include <asm/machvec.h> |
25 | #include <asm/delay.h> | 25 | #include <asm/delay.h> |
26 | #include <asm/hw_irq.h> | 26 | #include <asm/hw_irq.h> |
27 | #include <asm/paravirt.h> | ||
27 | #include <asm/ptrace.h> | 28 | #include <asm/ptrace.h> |
28 | #include <asm/sal.h> | 29 | #include <asm/sal.h> |
29 | #include <asm/sections.h> | 30 | #include <asm/sections.h> |
@@ -48,6 +49,15 @@ EXPORT_SYMBOL(last_cli_ip); | |||
48 | 49 | ||
49 | #endif | 50 | #endif |
50 | 51 | ||
52 | #ifdef CONFIG_PARAVIRT | ||
53 | static void | ||
54 | paravirt_clocksource_resume(void) | ||
55 | { | ||
56 | if (pv_time_ops.clocksource_resume) | ||
57 | pv_time_ops.clocksource_resume(); | ||
58 | } | ||
59 | #endif | ||
60 | |||
51 | static struct clocksource clocksource_itc = { | 61 | static struct clocksource clocksource_itc = { |
52 | .name = "itc", | 62 | .name = "itc", |
53 | .rating = 350, | 63 | .rating = 350, |
@@ -56,6 +66,9 @@ static struct clocksource clocksource_itc = { | |||
56 | .mult = 0, /*to be calculated*/ | 66 | .mult = 0, /*to be calculated*/ |
57 | .shift = 16, | 67 | .shift = 16, |
58 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | 68 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, |
69 | #ifdef CONFIG_PARAVIRT | ||
70 | .resume = paravirt_clocksource_resume, | ||
71 | #endif | ||
59 | }; | 72 | }; |
60 | static struct clocksource *itc_clocksource; | 73 | static struct clocksource *itc_clocksource; |
61 | 74 | ||
@@ -157,6 +170,9 @@ timer_interrupt (int irq, void *dev_id) | |||
157 | 170 | ||
158 | profile_tick(CPU_PROFILING); | 171 | profile_tick(CPU_PROFILING); |
159 | 172 | ||
173 | if (paravirt_do_steal_accounting(&new_itm)) | ||
174 | goto skip_process_time_accounting; | ||
175 | |||
160 | while (1) { | 176 | while (1) { |
161 | update_process_times(user_mode(get_irq_regs())); | 177 | update_process_times(user_mode(get_irq_regs())); |
162 | 178 | ||
@@ -186,6 +202,8 @@ timer_interrupt (int irq, void *dev_id) | |||
186 | local_irq_disable(); | 202 | local_irq_disable(); |
187 | } | 203 | } |
188 | 204 | ||
205 | skip_process_time_accounting: | ||
206 | |||
189 | do { | 207 | do { |
190 | /* | 208 | /* |
191 | * If we're too close to the next clock tick for | 209 | * If we're too close to the next clock tick for |
@@ -335,6 +353,11 @@ ia64_init_itm (void) | |||
335 | */ | 353 | */ |
336 | clocksource_itc.rating = 50; | 354 | clocksource_itc.rating = 50; |
337 | 355 | ||
356 | paravirt_init_missing_ticks_accounting(smp_processor_id()); | ||
357 | |||
358 | /* avoid softlock up message when cpu is unplug and plugged again. */ | ||
359 | touch_softlockup_watchdog(); | ||
360 | |||
338 | /* Setup the CPU local timer tick */ | 361 | /* Setup the CPU local timer tick */ |
339 | ia64_cpu_local_tick(); | 362 | ia64_cpu_local_tick(); |
340 | 363 | ||
diff --git a/arch/ia64/kernel/vmlinux.lds.S b/arch/ia64/kernel/vmlinux.lds.S index 5929ab10a289..5a77206c2492 100644 --- a/arch/ia64/kernel/vmlinux.lds.S +++ b/arch/ia64/kernel/vmlinux.lds.S | |||
@@ -4,7 +4,6 @@ | |||
4 | #include <asm/system.h> | 4 | #include <asm/system.h> |
5 | #include <asm/pgtable.h> | 5 | #include <asm/pgtable.h> |
6 | 6 | ||
7 | #define LOAD_OFFSET (KERNEL_START - KERNEL_TR_PAGE_SIZE) | ||
8 | #include <asm-generic/vmlinux.lds.h> | 7 | #include <asm-generic/vmlinux.lds.h> |
9 | 8 | ||
10 | #define IVT_TEXT \ | 9 | #define IVT_TEXT \ |
diff --git a/arch/mips/kernel/rtlx.c b/arch/mips/kernel/rtlx.c index b55641961232..dfd868b68364 100644 --- a/arch/mips/kernel/rtlx.c +++ b/arch/mips/kernel/rtlx.c | |||
@@ -522,8 +522,8 @@ static int __init rtlx_module_init(void) | |||
522 | atomic_set(&channel_wqs[i].in_open, 0); | 522 | atomic_set(&channel_wqs[i].in_open, 0); |
523 | mutex_init(&channel_wqs[i].mutex); | 523 | mutex_init(&channel_wqs[i].mutex); |
524 | 524 | ||
525 | dev = device_create(mt_class, NULL, MKDEV(major, i), | 525 | dev = device_create_drvdata(mt_class, NULL, MKDEV(major, i), |
526 | "%s%d", module_name, i); | 526 | NULL, "%s%d", module_name, i); |
527 | if (IS_ERR(dev)) { | 527 | if (IS_ERR(dev)) { |
528 | err = PTR_ERR(dev); | 528 | err = PTR_ERR(dev); |
529 | goto out_chrdev; | 529 | goto out_chrdev; |
diff --git a/arch/mips/sibyte/common/sb_tbprof.c b/arch/mips/sibyte/common/sb_tbprof.c index 28b012ab8dcb..66e3e3fb311f 100644 --- a/arch/mips/sibyte/common/sb_tbprof.c +++ b/arch/mips/sibyte/common/sb_tbprof.c | |||
@@ -576,7 +576,8 @@ static int __init sbprof_tb_init(void) | |||
576 | 576 | ||
577 | tb_class = tbc; | 577 | tb_class = tbc; |
578 | 578 | ||
579 | dev = device_create(tbc, NULL, MKDEV(SBPROF_TB_MAJOR, 0), "tb"); | 579 | dev = device_create_drvdata(tbc, NULL, MKDEV(SBPROF_TB_MAJOR, 0), |
580 | NULL, "tb"); | ||
580 | if (IS_ERR(dev)) { | 581 | if (IS_ERR(dev)) { |
581 | err = PTR_ERR(dev); | 582 | err = PTR_ERR(dev); |
582 | goto out_class; | 583 | goto out_class; |
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig index de88972c5896..4c22242b396f 100644 --- a/arch/powerpc/Kconfig +++ b/arch/powerpc/Kconfig | |||
@@ -199,7 +199,7 @@ config ARCH_HIBERNATION_POSSIBLE | |||
199 | 199 | ||
200 | config ARCH_SUSPEND_POSSIBLE | 200 | config ARCH_SUSPEND_POSSIBLE |
201 | def_bool y | 201 | def_bool y |
202 | depends on ADB_PMU || PPC_EFIKA || PPC_LITE5200 | 202 | depends on ADB_PMU || PPC_EFIKA || PPC_LITE5200 || PPC_83xx |
203 | 203 | ||
204 | config PPC_DCR_NATIVE | 204 | config PPC_DCR_NATIVE |
205 | bool | 205 | bool |
@@ -568,11 +568,15 @@ config FSL_GTM | |||
568 | config MCA | 568 | config MCA |
569 | bool | 569 | bool |
570 | 570 | ||
571 | # Platforms that what PCI turned unconditionally just do select PCI | ||
572 | # in their config node. Platforms that want to choose at config | ||
573 | # time should select PPC_PCI_CHOICE | ||
574 | config PPC_PCI_CHOICE | ||
575 | bool | ||
576 | |||
571 | config PCI | 577 | config PCI |
572 | bool "PCI support" if 40x || CPM2 || PPC_83xx || PPC_85xx || PPC_86xx \ | 578 | bool "PCI support" if PPC_PCI_CHOICE |
573 | || PPC_MPC52xx || (EMBEDDED && (PPC_PSERIES || PPC_ISERIES)) \ | 579 | default y if !40x && !CPM2 && !8xx && !PPC_83xx \ |
574 | || PPC_PS3 || 44x | ||
575 | default y if !40x && !CPM2 && !8xx && !PPC_MPC512x && !PPC_83xx \ | ||
576 | && !PPC_85xx && !PPC_86xx | 580 | && !PPC_85xx && !PPC_86xx |
577 | default PCI_PERMEDIA if !4xx && !CPM2 && !8xx | 581 | default PCI_PERMEDIA if !4xx && !CPM2 && !8xx |
578 | default PCI_QSPAN if !4xx && !CPM2 && 8xx | 582 | default PCI_QSPAN if !4xx && !CPM2 && 8xx |
diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile index 19f83c8f219d..14174aa24074 100644 --- a/arch/powerpc/boot/Makefile +++ b/arch/powerpc/boot/Makefile | |||
@@ -163,12 +163,12 @@ quiet_cmd_flex = FLEX $@ | |||
163 | cmd_flex = $(FLEX) -o$@ $<; cp $@ $@_shipped | 163 | cmd_flex = $(FLEX) -o$@ $<; cp $@ $@_shipped |
164 | 164 | ||
165 | $(obj)/dtc-src/dtc-parser.tab.c: $(src)/dtc-src/dtc-parser.y FORCE | 165 | $(obj)/dtc-src/dtc-parser.tab.c: $(src)/dtc-src/dtc-parser.y FORCE |
166 | $(call if_changed,bison) | 166 | $(call if_changed,bison) |
167 | 167 | ||
168 | $(obj)/dtc-src/dtc-parser.tab.h: $(obj)/dtc-src/dtc-parser.tab.c | 168 | $(obj)/dtc-src/dtc-parser.tab.h: $(obj)/dtc-src/dtc-parser.tab.c |
169 | 169 | ||
170 | $(obj)/dtc-src/dtc-lexer.lex.c: $(src)/dtc-src/dtc-lexer.l FORCE | 170 | $(obj)/dtc-src/dtc-lexer.lex.c: $(src)/dtc-src/dtc-lexer.l FORCE |
171 | $(call if_changed,flex) | 171 | $(call if_changed,flex) |
172 | endif | 172 | endif |
173 | 173 | ||
174 | ############# | 174 | ############# |
diff --git a/arch/powerpc/boot/dts/mpc7448hpc2.dts b/arch/powerpc/boot/dts/mpc7448hpc2.dts index 705c23c14f32..2544f3ecd6e9 100644 --- a/arch/powerpc/boot/dts/mpc7448hpc2.dts +++ b/arch/powerpc/boot/dts/mpc7448hpc2.dts | |||
@@ -18,6 +18,16 @@ | |||
18 | #address-cells = <1>; | 18 | #address-cells = <1>; |
19 | #size-cells = <1>; | 19 | #size-cells = <1>; |
20 | 20 | ||
21 | aliases { | ||
22 | ethernet0 = &enet0; | ||
23 | ethernet1 = &enet1; | ||
24 | |||
25 | serial0 = &serial0; | ||
26 | serial1 = &serial1; | ||
27 | |||
28 | pci0 = &pci0; | ||
29 | }; | ||
30 | |||
21 | cpus { | 31 | cpus { |
22 | #address-cells = <1>; | 32 | #address-cells = <1>; |
23 | #size-cells =<0>; | 33 | #size-cells =<0>; |
@@ -78,7 +88,7 @@ | |||
78 | 88 | ||
79 | }; | 89 | }; |
80 | 90 | ||
81 | ethernet@6200 { | 91 | enet0: ethernet@6200 { |
82 | linux,network-index = <0>; | 92 | linux,network-index = <0>; |
83 | #size-cells = <0>; | 93 | #size-cells = <0>; |
84 | device_type = "network"; | 94 | device_type = "network"; |
@@ -91,7 +101,7 @@ | |||
91 | phy-handle = <&phy8>; | 101 | phy-handle = <&phy8>; |
92 | }; | 102 | }; |
93 | 103 | ||
94 | ethernet@6600 { | 104 | enet1: ethernet@6600 { |
95 | linux,network-index = <1>; | 105 | linux,network-index = <1>; |
96 | #address-cells = <1>; | 106 | #address-cells = <1>; |
97 | #size-cells = <0>; | 107 | #size-cells = <0>; |
@@ -105,7 +115,7 @@ | |||
105 | phy-handle = <&phy9>; | 115 | phy-handle = <&phy9>; |
106 | }; | 116 | }; |
107 | 117 | ||
108 | serial@7808 { | 118 | serial0: serial@7808 { |
109 | device_type = "serial"; | 119 | device_type = "serial"; |
110 | compatible = "ns16550"; | 120 | compatible = "ns16550"; |
111 | reg = <0x7808 0x200>; | 121 | reg = <0x7808 0x200>; |
@@ -114,7 +124,7 @@ | |||
114 | interrupt-parent = <&mpic>; | 124 | interrupt-parent = <&mpic>; |
115 | }; | 125 | }; |
116 | 126 | ||
117 | serial@7c08 { | 127 | serial1: serial@7c08 { |
118 | device_type = "serial"; | 128 | device_type = "serial"; |
119 | compatible = "ns16550"; | 129 | compatible = "ns16550"; |
120 | reg = <0x7c08 0x200>; | 130 | reg = <0x7c08 0x200>; |
@@ -131,7 +141,7 @@ | |||
131 | compatible = "chrp,open-pic"; | 141 | compatible = "chrp,open-pic"; |
132 | device_type = "open-pic"; | 142 | device_type = "open-pic"; |
133 | }; | 143 | }; |
134 | pci@1000 { | 144 | pci0: pci@1000 { |
135 | compatible = "tsi108-pci"; | 145 | compatible = "tsi108-pci"; |
136 | device_type = "pci"; | 146 | device_type = "pci"; |
137 | #interrupt-cells = <1>; | 147 | #interrupt-cells = <1>; |
@@ -184,8 +194,4 @@ | |||
184 | }; | 194 | }; |
185 | }; | 195 | }; |
186 | }; | 196 | }; |
187 | chosen { | ||
188 | linux,stdout-path = "/tsi108@c0000000/serial@7808"; | ||
189 | }; | ||
190 | |||
191 | }; | 197 | }; |
diff --git a/arch/powerpc/boot/dts/mpc8313erdb.dts b/arch/powerpc/boot/dts/mpc8313erdb.dts index 3664fb584026..2a94ae0dc8b8 100644 --- a/arch/powerpc/boot/dts/mpc8313erdb.dts +++ b/arch/powerpc/boot/dts/mpc8313erdb.dts | |||
@@ -109,18 +109,38 @@ | |||
109 | reg = <0x200 0x100>; | 109 | reg = <0x200 0x100>; |
110 | }; | 110 | }; |
111 | 111 | ||
112 | i2c@3000 { | 112 | sleep-nexus { |
113 | #address-cells = <1>; | 113 | #address-cells = <1>; |
114 | #size-cells = <0>; | 114 | #size-cells = <1>; |
115 | cell-index = <0>; | 115 | compatible = "simple-bus"; |
116 | compatible = "fsl-i2c"; | 116 | sleep = <&pmc 0x03000000>; |
117 | reg = <0x3000 0x100>; | 117 | ranges; |
118 | interrupts = <14 0x8>; | 118 | |
119 | interrupt-parent = <&ipic>; | 119 | i2c@3000 { |
120 | dfsrr; | 120 | #address-cells = <1>; |
121 | rtc@68 { | 121 | #size-cells = <0>; |
122 | compatible = "dallas,ds1339"; | 122 | cell-index = <0>; |
123 | reg = <0x68>; | 123 | compatible = "fsl-i2c"; |
124 | reg = <0x3000 0x100>; | ||
125 | interrupts = <14 0x8>; | ||
126 | interrupt-parent = <&ipic>; | ||
127 | dfsrr; | ||
128 | rtc@68 { | ||
129 | compatible = "dallas,ds1339"; | ||
130 | reg = <0x68>; | ||
131 | }; | ||
132 | }; | ||
133 | |||
134 | crypto@30000 { | ||
135 | compatible = "fsl,sec2.2", "fsl,sec2.1", | ||
136 | "fsl,sec2.0"; | ||
137 | reg = <0x30000 0x10000>; | ||
138 | interrupts = <11 0x8>; | ||
139 | interrupt-parent = <&ipic>; | ||
140 | fsl,num-channels = <1>; | ||
141 | fsl,channel-fifo-len = <24>; | ||
142 | fsl,exec-units-mask = <0x4c>; | ||
143 | fsl,descriptor-types-mask = <0x0122003f>; | ||
124 | }; | 144 | }; |
125 | }; | 145 | }; |
126 | 146 | ||
@@ -188,37 +208,44 @@ | |||
188 | interrupt-parent = <&ipic>; | 208 | interrupt-parent = <&ipic>; |
189 | interrupts = <38 0x8>; | 209 | interrupts = <38 0x8>; |
190 | phy_type = "utmi_wide"; | 210 | phy_type = "utmi_wide"; |
211 | sleep = <&pmc 0x00300000>; | ||
191 | }; | 212 | }; |
192 | 213 | ||
193 | mdio@24520 { | 214 | enet0: ethernet@24000 { |
194 | #address-cells = <1>; | 215 | #address-cells = <1>; |
195 | #size-cells = <0>; | 216 | #size-cells = <1>; |
196 | compatible = "fsl,gianfar-mdio"; | 217 | sleep = <&pmc 0x20000000>; |
197 | reg = <0x24520 0x20>; | 218 | ranges; |
198 | phy1: ethernet-phy@1 { | ||
199 | interrupt-parent = <&ipic>; | ||
200 | interrupts = <19 0x8>; | ||
201 | reg = <0x1>; | ||
202 | device_type = "ethernet-phy"; | ||
203 | }; | ||
204 | phy4: ethernet-phy@4 { | ||
205 | interrupt-parent = <&ipic>; | ||
206 | interrupts = <20 0x8>; | ||
207 | reg = <0x4>; | ||
208 | device_type = "ethernet-phy"; | ||
209 | }; | ||
210 | }; | ||
211 | 219 | ||
212 | enet0: ethernet@24000 { | ||
213 | cell-index = <0>; | 220 | cell-index = <0>; |
214 | device_type = "network"; | 221 | device_type = "network"; |
215 | model = "eTSEC"; | 222 | model = "eTSEC"; |
216 | compatible = "gianfar"; | 223 | compatible = "gianfar", "simple-bus"; |
217 | reg = <0x24000 0x1000>; | 224 | reg = <0x24000 0x1000>; |
218 | local-mac-address = [ 00 00 00 00 00 00 ]; | 225 | local-mac-address = [ 00 00 00 00 00 00 ]; |
219 | interrupts = <37 0x8 36 0x8 35 0x8>; | 226 | interrupts = <37 0x8 36 0x8 35 0x8>; |
220 | interrupt-parent = <&ipic>; | 227 | interrupt-parent = <&ipic>; |
221 | phy-handle = < &phy1 >; | 228 | phy-handle = < &phy1 >; |
229 | fsl,magic-packet; | ||
230 | |||
231 | mdio@24520 { | ||
232 | #address-cells = <1>; | ||
233 | #size-cells = <0>; | ||
234 | compatible = "fsl,gianfar-mdio"; | ||
235 | reg = <0x24520 0x20>; | ||
236 | phy1: ethernet-phy@1 { | ||
237 | interrupt-parent = <&ipic>; | ||
238 | interrupts = <19 0x8>; | ||
239 | reg = <0x1>; | ||
240 | device_type = "ethernet-phy"; | ||
241 | }; | ||
242 | phy4: ethernet-phy@4 { | ||
243 | interrupt-parent = <&ipic>; | ||
244 | interrupts = <20 0x8>; | ||
245 | reg = <0x4>; | ||
246 | device_type = "ethernet-phy"; | ||
247 | }; | ||
248 | }; | ||
222 | }; | 249 | }; |
223 | 250 | ||
224 | enet1: ethernet@25000 { | 251 | enet1: ethernet@25000 { |
@@ -231,6 +258,8 @@ | |||
231 | interrupts = <34 0x8 33 0x8 32 0x8>; | 258 | interrupts = <34 0x8 33 0x8 32 0x8>; |
232 | interrupt-parent = <&ipic>; | 259 | interrupt-parent = <&ipic>; |
233 | phy-handle = < &phy4 >; | 260 | phy-handle = < &phy4 >; |
261 | sleep = <&pmc 0x10000000>; | ||
262 | fsl,magic-packet; | ||
234 | }; | 263 | }; |
235 | 264 | ||
236 | serial0: serial@4500 { | 265 | serial0: serial@4500 { |
@@ -253,17 +282,6 @@ | |||
253 | interrupt-parent = <&ipic>; | 282 | interrupt-parent = <&ipic>; |
254 | }; | 283 | }; |
255 | 284 | ||
256 | crypto@30000 { | ||
257 | compatible = "fsl,sec2.2", "fsl,sec2.1", "fsl,sec2.0"; | ||
258 | reg = <0x30000 0x10000>; | ||
259 | interrupts = <11 0x8>; | ||
260 | interrupt-parent = <&ipic>; | ||
261 | fsl,num-channels = <1>; | ||
262 | fsl,channel-fifo-len = <24>; | ||
263 | fsl,exec-units-mask = <0x4c>; | ||
264 | fsl,descriptor-types-mask = <0x0122003f>; | ||
265 | }; | ||
266 | |||
267 | /* IPIC | 285 | /* IPIC |
268 | * interrupts cell = <intr #, sense> | 286 | * interrupts cell = <intr #, sense> |
269 | * sense values match linux IORESOURCE_IRQ_* defines: | 287 | * sense values match linux IORESOURCE_IRQ_* defines: |
@@ -277,36 +295,119 @@ | |||
277 | reg = <0x700 0x100>; | 295 | reg = <0x700 0x100>; |
278 | device_type = "ipic"; | 296 | device_type = "ipic"; |
279 | }; | 297 | }; |
298 | |||
299 | pmc: power@b00 { | ||
300 | compatible = "fsl,mpc8313-pmc", "fsl,mpc8349-pmc"; | ||
301 | reg = <0xb00 0x100 0xa00 0x100>; | ||
302 | interrupts = <80 8>; | ||
303 | interrupt-parent = <&ipic>; | ||
304 | fsl,mpc8313-wakeup-timer = <>m1>; | ||
305 | |||
306 | /* Remove this (or change to "okay") if you have | ||
307 | * a REVA3 or later board, if you apply one of the | ||
308 | * workarounds listed in section 8.5 of the board | ||
309 | * manual, or if you are adapting this device tree | ||
310 | * to a different board. | ||
311 | */ | ||
312 | status = "fail"; | ||
313 | }; | ||
314 | |||
315 | gtm1: timer@500 { | ||
316 | compatible = "fsl,mpc8313-gtm", "fsl,gtm"; | ||
317 | reg = <0x500 0x100>; | ||
318 | interrupts = <90 8 78 8 84 8 72 8>; | ||
319 | interrupt-parent = <&ipic>; | ||
320 | }; | ||
321 | |||
322 | timer@600 { | ||
323 | compatible = "fsl,mpc8313-gtm", "fsl,gtm"; | ||
324 | reg = <0x600 0x100>; | ||
325 | interrupts = <91 8 79 8 85 8 73 8>; | ||
326 | interrupt-parent = <&ipic>; | ||
327 | }; | ||
280 | }; | 328 | }; |
281 | 329 | ||
282 | pci0: pci@e0008500 { | 330 | sleep-nexus { |
283 | cell-index = <1>; | 331 | #address-cells = <1>; |
284 | interrupt-map-mask = <0xf800 0x0 0x0 0x7>; | 332 | #size-cells = <1>; |
285 | interrupt-map = < | 333 | compatible = "simple-bus"; |
286 | 334 | sleep = <&pmc 0x00010000>; | |
287 | /* IDSEL 0x0E -mini PCI */ | 335 | ranges; |
288 | 0x7000 0x0 0x0 0x1 &ipic 18 0x8 | 336 | |
289 | 0x7000 0x0 0x0 0x2 &ipic 18 0x8 | 337 | pci0: pci@e0008500 { |
290 | 0x7000 0x0 0x0 0x3 &ipic 18 0x8 | 338 | cell-index = <1>; |
291 | 0x7000 0x0 0x0 0x4 &ipic 18 0x8 | 339 | interrupt-map-mask = <0xf800 0x0 0x0 0x7>; |
292 | 340 | interrupt-map = < | |
293 | /* IDSEL 0x0F - PCI slot */ | 341 | /* IDSEL 0x0E -mini PCI */ |
294 | 0x7800 0x0 0x0 0x1 &ipic 17 0x8 | 342 | 0x7000 0x0 0x0 0x1 &ipic 18 0x8 |
295 | 0x7800 0x0 0x0 0x2 &ipic 18 0x8 | 343 | 0x7000 0x0 0x0 0x2 &ipic 18 0x8 |
296 | 0x7800 0x0 0x0 0x3 &ipic 17 0x8 | 344 | 0x7000 0x0 0x0 0x3 &ipic 18 0x8 |
297 | 0x7800 0x0 0x0 0x4 &ipic 18 0x8>; | 345 | 0x7000 0x0 0x0 0x4 &ipic 18 0x8 |
298 | interrupt-parent = <&ipic>; | 346 | |
299 | interrupts = <66 0x8>; | 347 | /* IDSEL 0x0F - PCI slot */ |
300 | bus-range = <0x0 0x0>; | 348 | 0x7800 0x0 0x0 0x1 &ipic 17 0x8 |
301 | ranges = <0x02000000 0x0 0x90000000 0x90000000 0x0 0x10000000 | 349 | 0x7800 0x0 0x0 0x2 &ipic 18 0x8 |
302 | 0x42000000 0x0 0x80000000 0x80000000 0x0 0x10000000 | 350 | 0x7800 0x0 0x0 0x3 &ipic 17 0x8 |
303 | 0x01000000 0x0 0x00000000 0xe2000000 0x0 0x00100000>; | 351 | 0x7800 0x0 0x0 0x4 &ipic 18 0x8>; |
304 | clock-frequency = <66666666>; | 352 | interrupt-parent = <&ipic>; |
305 | #interrupt-cells = <1>; | 353 | interrupts = <66 0x8>; |
306 | #size-cells = <2>; | 354 | bus-range = <0x0 0x0>; |
307 | #address-cells = <3>; | 355 | ranges = <0x02000000 0x0 0x90000000 0x90000000 0x0 0x10000000 |
308 | reg = <0xe0008500 0x100>; | 356 | 0x42000000 0x0 0x80000000 0x80000000 0x0 0x10000000 |
309 | compatible = "fsl,mpc8349-pci"; | 357 | 0x01000000 0x0 0x00000000 0xe2000000 0x0 0x00100000>; |
310 | device_type = "pci"; | 358 | clock-frequency = <66666666>; |
359 | #interrupt-cells = <1>; | ||
360 | #size-cells = <2>; | ||
361 | #address-cells = <3>; | ||
362 | reg = <0xe0008500 0x100>; | ||
363 | compatible = "fsl,mpc8349-pci"; | ||
364 | device_type = "pci"; | ||
365 | }; | ||
366 | |||
367 | dma@82a8 { | ||
368 | #address-cells = <1>; | ||
369 | #size-cells = <1>; | ||
370 | compatible = "fsl,mpc8313-dma", "fsl,elo-dma"; | ||
371 | reg = <0xe00082a8 4>; | ||
372 | ranges = <0 0xe0008100 0x1a8>; | ||
373 | interrupt-parent = <&ipic>; | ||
374 | interrupts = <71 8>; | ||
375 | |||
376 | dma-channel@0 { | ||
377 | compatible = "fsl,mpc8313-dma-channel", | ||
378 | "fsl,elo-dma-channel"; | ||
379 | reg = <0 0x28>; | ||
380 | interrupt-parent = <&ipic>; | ||
381 | interrupts = <71 8>; | ||
382 | cell-index = <0>; | ||
383 | }; | ||
384 | |||
385 | dma-channel@80 { | ||
386 | compatible = "fsl,mpc8313-dma-channel", | ||
387 | "fsl,elo-dma-channel"; | ||
388 | reg = <0x80 0x28>; | ||
389 | interrupt-parent = <&ipic>; | ||
390 | interrupts = <71 8>; | ||
391 | cell-index = <1>; | ||
392 | }; | ||
393 | |||
394 | dma-channel@100 { | ||
395 | compatible = "fsl,mpc8313-dma-channel", | ||
396 | "fsl,elo-dma-channel"; | ||
397 | reg = <0x100 0x28>; | ||
398 | interrupt-parent = <&ipic>; | ||
399 | interrupts = <71 8>; | ||
400 | cell-index = <2>; | ||
401 | }; | ||
402 | |||
403 | dma-channel@180 { | ||
404 | compatible = "fsl,mpc8313-dma-channel", | ||
405 | "fsl,elo-dma-channel"; | ||
406 | reg = <0x180 0x28>; | ||
407 | interrupt-parent = <&ipic>; | ||
408 | interrupts = <71 8>; | ||
409 | cell-index = <3>; | ||
410 | }; | ||
411 | }; | ||
311 | }; | 412 | }; |
312 | }; | 413 | }; |
diff --git a/arch/powerpc/boot/dts/mpc8610_hpcd.dts b/arch/powerpc/boot/dts/mpc8610_hpcd.dts index 981941e5d7a5..666185f59459 100644 --- a/arch/powerpc/boot/dts/mpc8610_hpcd.dts +++ b/arch/powerpc/boot/dts/mpc8610_hpcd.dts | |||
@@ -388,6 +388,20 @@ | |||
388 | 0x01000000 0x0 0x00000000 | 388 | 0x01000000 0x0 0x00000000 |
389 | 0x01000000 0x0 0x00000000 | 389 | 0x01000000 0x0 0x00000000 |
390 | 0x0 0x00100000>; | 390 | 0x0 0x00100000>; |
391 | |||
392 | isa@1e { | ||
393 | device_type = "isa"; | ||
394 | #size-cells = <1>; | ||
395 | #address-cells = <2>; | ||
396 | reg = <0xf000 0 0 0 0>; | ||
397 | ranges = <1 0 0x01000000 0 0 | ||
398 | 0x00001000>; | ||
399 | |||
400 | rtc@70 { | ||
401 | compatible = "pnpPNP,b00"; | ||
402 | reg = <1 0x70 2>; | ||
403 | }; | ||
404 | }; | ||
391 | }; | 405 | }; |
392 | }; | 406 | }; |
393 | }; | 407 | }; |
diff --git a/arch/powerpc/configs/85xx/mpc8544_ds_defconfig b/arch/powerpc/configs/85xx/mpc8544_ds_defconfig index 042a85ea7b72..a0583e5119f5 100644 --- a/arch/powerpc/configs/85xx/mpc8544_ds_defconfig +++ b/arch/powerpc/configs/85xx/mpc8544_ds_defconfig | |||
@@ -997,10 +997,12 @@ CONFIG_SND=y | |||
997 | CONFIG_SND_TIMER=y | 997 | CONFIG_SND_TIMER=y |
998 | CONFIG_SND_PCM=y | 998 | CONFIG_SND_PCM=y |
999 | # CONFIG_SND_SEQUENCER is not set | 999 | # CONFIG_SND_SEQUENCER is not set |
1000 | # CONFIG_SND_MIXER_OSS is not set | 1000 | CONFIG_SND_OSSEMUL=y |
1001 | # CONFIG_SND_PCM_OSS is not set | 1001 | CONFIG_SND_MIXER_OSS=y |
1002 | CONFIG_SND_PCM_OSS=y | ||
1003 | CONFIG_SND_PCM_OSS_PLUGINS=y | ||
1002 | # CONFIG_SND_DYNAMIC_MINORS is not set | 1004 | # CONFIG_SND_DYNAMIC_MINORS is not set |
1003 | CONFIG_SND_SUPPORT_OLD_API=y | 1005 | # CONFIG_SND_SUPPORT_OLD_API is not set |
1004 | CONFIG_SND_VERBOSE_PROCFS=y | 1006 | CONFIG_SND_VERBOSE_PROCFS=y |
1005 | # CONFIG_SND_VERBOSE_PRINTK is not set | 1007 | # CONFIG_SND_VERBOSE_PRINTK is not set |
1006 | # CONFIG_SND_DEBUG is not set | 1008 | # CONFIG_SND_DEBUG is not set |
diff --git a/arch/powerpc/configs/85xx/mpc8572_ds_defconfig b/arch/powerpc/configs/85xx/mpc8572_ds_defconfig index 03627cfebcb4..164fd9606ee6 100644 --- a/arch/powerpc/configs/85xx/mpc8572_ds_defconfig +++ b/arch/powerpc/configs/85xx/mpc8572_ds_defconfig | |||
@@ -997,10 +997,12 @@ CONFIG_SND=y | |||
997 | CONFIG_SND_TIMER=y | 997 | CONFIG_SND_TIMER=y |
998 | CONFIG_SND_PCM=y | 998 | CONFIG_SND_PCM=y |
999 | # CONFIG_SND_SEQUENCER is not set | 999 | # CONFIG_SND_SEQUENCER is not set |
1000 | # CONFIG_SND_MIXER_OSS is not set | 1000 | CONFIG_SND_OSSEMUL=y |
1001 | # CONFIG_SND_PCM_OSS is not set | 1001 | CONFIG_SND_MIXER_OSS=y |
1002 | CONFIG_SND_PCM_OSS=y | ||
1003 | CONFIG_SND_PCM_OSS_PLUGINS=y | ||
1002 | # CONFIG_SND_DYNAMIC_MINORS is not set | 1004 | # CONFIG_SND_DYNAMIC_MINORS is not set |
1003 | CONFIG_SND_SUPPORT_OLD_API=y | 1005 | # CONFIG_SND_SUPPORT_OLD_API is not set |
1004 | CONFIG_SND_VERBOSE_PROCFS=y | 1006 | CONFIG_SND_VERBOSE_PROCFS=y |
1005 | # CONFIG_SND_VERBOSE_PRINTK is not set | 1007 | # CONFIG_SND_VERBOSE_PRINTK is not set |
1006 | # CONFIG_SND_DEBUG is not set | 1008 | # CONFIG_SND_DEBUG is not set |
diff --git a/arch/powerpc/configs/mpc85xx_defconfig b/arch/powerpc/configs/mpc85xx_defconfig index 3efab71a603b..fa0170504b88 100644 --- a/arch/powerpc/configs/mpc85xx_defconfig +++ b/arch/powerpc/configs/mpc85xx_defconfig | |||
@@ -1005,10 +1005,12 @@ CONFIG_SND=y | |||
1005 | CONFIG_SND_TIMER=y | 1005 | CONFIG_SND_TIMER=y |
1006 | CONFIG_SND_PCM=y | 1006 | CONFIG_SND_PCM=y |
1007 | # CONFIG_SND_SEQUENCER is not set | 1007 | # CONFIG_SND_SEQUENCER is not set |
1008 | # CONFIG_SND_MIXER_OSS is not set | 1008 | CONFIG_SND_OSSEMUL=y |
1009 | # CONFIG_SND_PCM_OSS is not set | 1009 | CONFIG_SND_MIXER_OSS=y |
1010 | CONFIG_SND_PCM_OSS=y | ||
1011 | CONFIG_SND_PCM_OSS_PLUGINS=y | ||
1010 | # CONFIG_SND_DYNAMIC_MINORS is not set | 1012 | # CONFIG_SND_DYNAMIC_MINORS is not set |
1011 | CONFIG_SND_SUPPORT_OLD_API=y | 1013 | # CONFIG_SND_SUPPORT_OLD_API is not set |
1012 | CONFIG_SND_VERBOSE_PROCFS=y | 1014 | CONFIG_SND_VERBOSE_PROCFS=y |
1013 | # CONFIG_SND_VERBOSE_PRINTK is not set | 1015 | # CONFIG_SND_VERBOSE_PRINTK is not set |
1014 | # CONFIG_SND_DEBUG is not set | 1016 | # CONFIG_SND_DEBUG is not set |
diff --git a/arch/powerpc/configs/mpc8610_hpcd_defconfig b/arch/powerpc/configs/mpc8610_hpcd_defconfig index 5612d40d0463..cdf98ae3682b 100644 --- a/arch/powerpc/configs/mpc8610_hpcd_defconfig +++ b/arch/powerpc/configs/mpc8610_hpcd_defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.26-rc5 | 3 | # Linux kernel version: 2.6.26 |
4 | # Mon Jun 9 08:50:24 2008 | 4 | # Tue Jul 15 08:31:01 2008 |
5 | # | 5 | # |
6 | # CONFIG_PPC64 is not set | 6 | # CONFIG_PPC64 is not set |
7 | 7 | ||
@@ -51,6 +51,8 @@ CONFIG_PPC_UDBG_16550=y | |||
51 | CONFIG_AUDIT_ARCH=y | 51 | CONFIG_AUDIT_ARCH=y |
52 | CONFIG_GENERIC_BUG=y | 52 | CONFIG_GENERIC_BUG=y |
53 | CONFIG_DEFAULT_UIMAGE=y | 53 | CONFIG_DEFAULT_UIMAGE=y |
54 | CONFIG_HIBERNATE_32=y | ||
55 | CONFIG_ARCH_HIBERNATION_POSSIBLE=y | ||
54 | # CONFIG_PPC_DCR_NATIVE is not set | 56 | # CONFIG_PPC_DCR_NATIVE is not set |
55 | # CONFIG_PPC_DCR_MMIO is not set | 57 | # CONFIG_PPC_DCR_MMIO is not set |
56 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | 58 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" |
@@ -97,6 +99,7 @@ CONFIG_HOTPLUG=y | |||
97 | CONFIG_PRINTK=y | 99 | CONFIG_PRINTK=y |
98 | CONFIG_BUG=y | 100 | CONFIG_BUG=y |
99 | # CONFIG_ELF_CORE is not set | 101 | # CONFIG_ELF_CORE is not set |
102 | CONFIG_PCSPKR_PLATFORM=y | ||
100 | CONFIG_COMPAT_BRK=y | 103 | CONFIG_COMPAT_BRK=y |
101 | CONFIG_BASE_FULL=y | 104 | CONFIG_BASE_FULL=y |
102 | CONFIG_FUTEX=y | 105 | CONFIG_FUTEX=y |
@@ -117,7 +120,7 @@ CONFIG_HAVE_OPROFILE=y | |||
117 | # CONFIG_KPROBES is not set | 120 | # CONFIG_KPROBES is not set |
118 | CONFIG_HAVE_KPROBES=y | 121 | CONFIG_HAVE_KPROBES=y |
119 | CONFIG_HAVE_KRETPROBES=y | 122 | CONFIG_HAVE_KRETPROBES=y |
120 | # CONFIG_HAVE_DMA_ATTRS is not set | 123 | CONFIG_HAVE_DMA_ATTRS=y |
121 | CONFIG_PROC_PAGE_MONITOR=y | 124 | CONFIG_PROC_PAGE_MONITOR=y |
122 | CONFIG_SLABINFO=y | 125 | CONFIG_SLABINFO=y |
123 | CONFIG_RT_MUTEXES=y | 126 | CONFIG_RT_MUTEXES=y |
@@ -153,31 +156,43 @@ CONFIG_CLASSIC_RCU=y | |||
153 | # | 156 | # |
154 | # Platform support | 157 | # Platform support |
155 | # | 158 | # |
156 | # CONFIG_PPC_MULTIPLATFORM is not set | 159 | CONFIG_PPC_MULTIPLATFORM=y |
157 | # CONFIG_PPC_82xx is not set | 160 | CONFIG_CLASSIC32=y |
158 | # CONFIG_PPC_83xx is not set | 161 | CONFIG_PPC_CHRP=y |
159 | CONFIG_PPC_86xx=y | ||
160 | # CONFIG_PPC_MPC512x is not set | 162 | # CONFIG_PPC_MPC512x is not set |
161 | # CONFIG_PPC_MPC5121 is not set | 163 | # CONFIG_PPC_MPC5121 is not set |
164 | # CONFIG_MPC5121_ADS is not set | ||
165 | # CONFIG_PPC_MPC52xx is not set | ||
166 | CONFIG_PPC_PMAC=y | ||
162 | # CONFIG_PPC_CELL is not set | 167 | # CONFIG_PPC_CELL is not set |
163 | # CONFIG_PPC_CELL_NATIVE is not set | 168 | # CONFIG_PPC_CELL_NATIVE is not set |
169 | # CONFIG_PPC_82xx is not set | ||
164 | # CONFIG_PQ2ADS is not set | 170 | # CONFIG_PQ2ADS is not set |
171 | # CONFIG_PPC_83xx is not set | ||
172 | CONFIG_PPC_86xx=y | ||
165 | # CONFIG_MPC8641_HPCN is not set | 173 | # CONFIG_MPC8641_HPCN is not set |
166 | # CONFIG_SBC8641D is not set | 174 | # CONFIG_SBC8641D is not set |
167 | CONFIG_MPC8610_HPCD=y | 175 | CONFIG_MPC8610_HPCD=y |
168 | CONFIG_MPC8610=y | 176 | CONFIG_MPC8610=y |
177 | # CONFIG_EMBEDDED6xx is not set | ||
178 | CONFIG_PPC_NATIVE=y | ||
179 | # CONFIG_UDBG_RTAS_CONSOLE is not set | ||
169 | # CONFIG_IPIC is not set | 180 | # CONFIG_IPIC is not set |
170 | CONFIG_MPIC=y | 181 | CONFIG_MPIC=y |
171 | # CONFIG_MPIC_WEIRD is not set | 182 | # CONFIG_MPIC_WEIRD is not set |
172 | # CONFIG_PPC_I8259 is not set | 183 | CONFIG_PPC_I8259=y |
173 | # CONFIG_PPC_RTAS is not set | 184 | CONFIG_PPC_RTAS=y |
185 | # CONFIG_RTAS_ERROR_LOGGING is not set | ||
186 | CONFIG_RTAS_PROC=y | ||
174 | # CONFIG_MMIO_NVRAM is not set | 187 | # CONFIG_MMIO_NVRAM is not set |
175 | # CONFIG_PPC_MPC106 is not set | 188 | CONFIG_PPC_MPC106=y |
176 | # CONFIG_PPC_970_NAP is not set | 189 | # CONFIG_PPC_970_NAP is not set |
177 | # CONFIG_PPC_INDIRECT_IO is not set | 190 | # CONFIG_PPC_INDIRECT_IO is not set |
178 | # CONFIG_GENERIC_IOMAP is not set | 191 | # CONFIG_GENERIC_IOMAP is not set |
179 | # CONFIG_CPU_FREQ is not set | 192 | # CONFIG_CPU_FREQ is not set |
180 | # CONFIG_FSL_ULI1575 is not set | 193 | # CONFIG_PPC601_SYNC_FIX is not set |
194 | # CONFIG_TAU is not set | ||
195 | CONFIG_FSL_ULI1575=y | ||
181 | 196 | ||
182 | # | 197 | # |
183 | # Kernel options | 198 | # Kernel options |
@@ -202,6 +217,7 @@ CONFIG_BINFMT_ELF=y | |||
202 | CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y | 217 | CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y |
203 | CONFIG_ARCH_HAS_WALK_MEMORY=y | 218 | CONFIG_ARCH_HAS_WALK_MEMORY=y |
204 | CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y | 219 | CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y |
220 | # CONFIG_KEXEC is not set | ||
205 | CONFIG_ARCH_FLATMEM_ENABLE=y | 221 | CONFIG_ARCH_FLATMEM_ENABLE=y |
206 | CONFIG_ARCH_POPULATES_NODE_MAP=y | 222 | CONFIG_ARCH_POPULATES_NODE_MAP=y |
207 | CONFIG_SELECT_MEMORY_MODEL=y | 223 | CONFIG_SELECT_MEMORY_MODEL=y |
@@ -228,11 +244,13 @@ CONFIG_ISA_DMA_API=y | |||
228 | # | 244 | # |
229 | # Bus options | 245 | # Bus options |
230 | # | 246 | # |
247 | # CONFIG_ISA is not set | ||
231 | CONFIG_ZONE_DMA=y | 248 | CONFIG_ZONE_DMA=y |
232 | CONFIG_GENERIC_ISA_DMA=y | 249 | CONFIG_GENERIC_ISA_DMA=y |
233 | CONFIG_PPC_INDIRECT_PCI=y | 250 | CONFIG_PPC_INDIRECT_PCI=y |
234 | CONFIG_FSL_SOC=y | 251 | CONFIG_FSL_SOC=y |
235 | CONFIG_FSL_PCI=y | 252 | CONFIG_FSL_PCI=y |
253 | CONFIG_PPC_PCI_CHOICE=y | ||
236 | CONFIG_PCI=y | 254 | CONFIG_PCI=y |
237 | CONFIG_PCI_DOMAINS=y | 255 | CONFIG_PCI_DOMAINS=y |
238 | CONFIG_PCI_SYSCALL=y | 256 | CONFIG_PCI_SYSCALL=y |
@@ -469,6 +487,7 @@ CONFIG_OF_I2C=y | |||
469 | # CONFIG_PARPORT is not set | 487 | # CONFIG_PARPORT is not set |
470 | CONFIG_BLK_DEV=y | 488 | CONFIG_BLK_DEV=y |
471 | # CONFIG_BLK_DEV_FD is not set | 489 | # CONFIG_BLK_DEV_FD is not set |
490 | # CONFIG_MAC_FLOPPY is not set | ||
472 | # CONFIG_BLK_CPQ_DA is not set | 491 | # CONFIG_BLK_CPQ_DA is not set |
473 | # CONFIG_BLK_CPQ_CISS_DA is not set | 492 | # CONFIG_BLK_CPQ_CISS_DA is not set |
474 | # CONFIG_BLK_DEV_DAC960 is not set | 493 | # CONFIG_BLK_DEV_DAC960 is not set |
@@ -571,6 +590,8 @@ CONFIG_SCSI_LOWLEVEL=y | |||
571 | # CONFIG_SCSI_DC390T is not set | 590 | # CONFIG_SCSI_DC390T is not set |
572 | # CONFIG_SCSI_NSP32 is not set | 591 | # CONFIG_SCSI_NSP32 is not set |
573 | # CONFIG_SCSI_DEBUG is not set | 592 | # CONFIG_SCSI_DEBUG is not set |
593 | # CONFIG_SCSI_MESH is not set | ||
594 | # CONFIG_SCSI_MAC53C94 is not set | ||
574 | # CONFIG_SCSI_SRP is not set | 595 | # CONFIG_SCSI_SRP is not set |
575 | CONFIG_ATA=y | 596 | CONFIG_ATA=y |
576 | # CONFIG_ATA_NONSTANDARD is not set | 597 | # CONFIG_ATA_NONSTANDARD is not set |
@@ -639,6 +660,10 @@ CONFIG_PATA_ALI=y | |||
639 | # | 660 | # |
640 | # IEEE 1394 (FireWire) support | 661 | # IEEE 1394 (FireWire) support |
641 | # | 662 | # |
663 | |||
664 | # | ||
665 | # Enable only one of the two stacks, unless you know what you are doing | ||
666 | # | ||
642 | # CONFIG_FIREWIRE is not set | 667 | # CONFIG_FIREWIRE is not set |
643 | # CONFIG_IEEE1394 is not set | 668 | # CONFIG_IEEE1394 is not set |
644 | # CONFIG_I2O is not set | 669 | # CONFIG_I2O is not set |
@@ -655,6 +680,8 @@ CONFIG_DUMMY=y | |||
655 | # CONFIG_PHYLIB is not set | 680 | # CONFIG_PHYLIB is not set |
656 | CONFIG_NET_ETHERNET=y | 681 | CONFIG_NET_ETHERNET=y |
657 | # CONFIG_MII is not set | 682 | # CONFIG_MII is not set |
683 | # CONFIG_MACE is not set | ||
684 | # CONFIG_BMAC is not set | ||
658 | # CONFIG_HAPPYMEAL is not set | 685 | # CONFIG_HAPPYMEAL is not set |
659 | # CONFIG_SUNGEM is not set | 686 | # CONFIG_SUNGEM is not set |
660 | # CONFIG_CASSINI is not set | 687 | # CONFIG_CASSINI is not set |
@@ -762,14 +789,16 @@ CONFIG_SERIAL_8250_RSA=y | |||
762 | # CONFIG_SERIAL_UARTLITE is not set | 789 | # CONFIG_SERIAL_UARTLITE is not set |
763 | CONFIG_SERIAL_CORE=y | 790 | CONFIG_SERIAL_CORE=y |
764 | CONFIG_SERIAL_CORE_CONSOLE=y | 791 | CONFIG_SERIAL_CORE_CONSOLE=y |
792 | # CONFIG_SERIAL_PMACZILOG is not set | ||
765 | # CONFIG_SERIAL_JSM is not set | 793 | # CONFIG_SERIAL_JSM is not set |
766 | # CONFIG_SERIAL_OF_PLATFORM is not set | 794 | # CONFIG_SERIAL_OF_PLATFORM is not set |
767 | CONFIG_UNIX98_PTYS=y | 795 | CONFIG_UNIX98_PTYS=y |
768 | # CONFIG_LEGACY_PTYS is not set | 796 | # CONFIG_LEGACY_PTYS is not set |
797 | # CONFIG_BRIQ_PANEL is not set | ||
798 | # CONFIG_HVC_RTAS is not set | ||
769 | # CONFIG_IPMI_HANDLER is not set | 799 | # CONFIG_IPMI_HANDLER is not set |
770 | # CONFIG_HW_RANDOM is not set | 800 | # CONFIG_HW_RANDOM is not set |
771 | # CONFIG_NVRAM is not set | 801 | # CONFIG_NVRAM is not set |
772 | # CONFIG_GEN_RTC is not set | ||
773 | # CONFIG_R3964 is not set | 802 | # CONFIG_R3964 is not set |
774 | # CONFIG_APPLICOM is not set | 803 | # CONFIG_APPLICOM is not set |
775 | # CONFIG_RAW_DRIVER is not set | 804 | # CONFIG_RAW_DRIVER is not set |
@@ -787,9 +816,11 @@ CONFIG_I2C_BOARDINFO=y | |||
787 | # CONFIG_I2C_ALI15X3 is not set | 816 | # CONFIG_I2C_ALI15X3 is not set |
788 | # CONFIG_I2C_AMD756 is not set | 817 | # CONFIG_I2C_AMD756 is not set |
789 | # CONFIG_I2C_AMD8111 is not set | 818 | # CONFIG_I2C_AMD8111 is not set |
819 | # CONFIG_I2C_HYDRA is not set | ||
790 | # CONFIG_I2C_I801 is not set | 820 | # CONFIG_I2C_I801 is not set |
791 | # CONFIG_I2C_I810 is not set | 821 | # CONFIG_I2C_I810 is not set |
792 | # CONFIG_I2C_PIIX4 is not set | 822 | # CONFIG_I2C_PIIX4 is not set |
823 | CONFIG_I2C_POWERMAC=y | ||
793 | CONFIG_I2C_MPC=y | 824 | CONFIG_I2C_MPC=y |
794 | # CONFIG_I2C_NFORCE2 is not set | 825 | # CONFIG_I2C_NFORCE2 is not set |
795 | # CONFIG_I2C_OCORES is not set | 826 | # CONFIG_I2C_OCORES is not set |
@@ -826,6 +857,7 @@ CONFIG_I2C_MPC=y | |||
826 | # CONFIG_POWER_SUPPLY is not set | 857 | # CONFIG_POWER_SUPPLY is not set |
827 | # CONFIG_HWMON is not set | 858 | # CONFIG_HWMON is not set |
828 | # CONFIG_THERMAL is not set | 859 | # CONFIG_THERMAL is not set |
860 | # CONFIG_THERMAL_HWMON is not set | ||
829 | # CONFIG_WATCHDOG is not set | 861 | # CONFIG_WATCHDOG is not set |
830 | 862 | ||
831 | # | 863 | # |
@@ -888,6 +920,9 @@ CONFIG_FB_CFB_IMAGEBLIT=y | |||
888 | # CONFIG_FB_PM2 is not set | 920 | # CONFIG_FB_PM2 is not set |
889 | # CONFIG_FB_CYBER2000 is not set | 921 | # CONFIG_FB_CYBER2000 is not set |
890 | # CONFIG_FB_OF is not set | 922 | # CONFIG_FB_OF is not set |
923 | # CONFIG_FB_CONTROL is not set | ||
924 | # CONFIG_FB_PLATINUM is not set | ||
925 | # CONFIG_FB_VALKYRIE is not set | ||
891 | # CONFIG_FB_CT65550 is not set | 926 | # CONFIG_FB_CT65550 is not set |
892 | # CONFIG_FB_ASILIANT is not set | 927 | # CONFIG_FB_ASILIANT is not set |
893 | # CONFIG_FB_IMSTT is not set | 928 | # CONFIG_FB_IMSTT is not set |
@@ -1027,12 +1062,19 @@ CONFIG_SND_VERBOSE_PROCFS=y | |||
1027 | # | 1062 | # |
1028 | # ALSA PowerMac devices | 1063 | # ALSA PowerMac devices |
1029 | # | 1064 | # |
1065 | # CONFIG_SND_POWERMAC is not set | ||
1030 | 1066 | ||
1031 | # | 1067 | # |
1032 | # ALSA PowerPC devices | 1068 | # ALSA PowerPC devices |
1033 | # | 1069 | # |
1034 | 1070 | ||
1035 | # | 1071 | # |
1072 | # Apple Onboard Audio driver | ||
1073 | # | ||
1074 | # CONFIG_SND_AOA is not set | ||
1075 | # CONFIG_SND_AOA_SOUNDBUS is not set | ||
1076 | |||
1077 | # | ||
1036 | # System on Chip audio support | 1078 | # System on Chip audio support |
1037 | # | 1079 | # |
1038 | CONFIG_SND_SOC=y | 1080 | CONFIG_SND_SOC=y |
@@ -1075,7 +1117,57 @@ CONFIG_USB_ARCH_HAS_EHCI=y | |||
1075 | # CONFIG_ACCESSIBILITY is not set | 1117 | # CONFIG_ACCESSIBILITY is not set |
1076 | # CONFIG_INFINIBAND is not set | 1118 | # CONFIG_INFINIBAND is not set |
1077 | # CONFIG_EDAC is not set | 1119 | # CONFIG_EDAC is not set |
1078 | # CONFIG_RTC_CLASS is not set | 1120 | CONFIG_RTC_LIB=y |
1121 | CONFIG_RTC_CLASS=y | ||
1122 | CONFIG_RTC_HCTOSYS=y | ||
1123 | CONFIG_RTC_HCTOSYS_DEVICE="rtc0" | ||
1124 | # CONFIG_RTC_DEBUG is not set | ||
1125 | |||
1126 | # | ||
1127 | # RTC interfaces | ||
1128 | # | ||
1129 | CONFIG_RTC_INTF_SYSFS=y | ||
1130 | CONFIG_RTC_INTF_PROC=y | ||
1131 | CONFIG_RTC_INTF_DEV=y | ||
1132 | # CONFIG_RTC_INTF_DEV_UIE_EMUL is not set | ||
1133 | # CONFIG_RTC_DRV_TEST is not set | ||
1134 | |||
1135 | # | ||
1136 | # I2C RTC drivers | ||
1137 | # | ||
1138 | # CONFIG_RTC_DRV_DS1307 is not set | ||
1139 | # CONFIG_RTC_DRV_DS1374 is not set | ||
1140 | # CONFIG_RTC_DRV_DS1672 is not set | ||
1141 | # CONFIG_RTC_DRV_MAX6900 is not set | ||
1142 | # CONFIG_RTC_DRV_RS5C372 is not set | ||
1143 | # CONFIG_RTC_DRV_ISL1208 is not set | ||
1144 | # CONFIG_RTC_DRV_X1205 is not set | ||
1145 | # CONFIG_RTC_DRV_PCF8563 is not set | ||
1146 | # CONFIG_RTC_DRV_PCF8583 is not set | ||
1147 | # CONFIG_RTC_DRV_M41T80 is not set | ||
1148 | # CONFIG_RTC_DRV_S35390A is not set | ||
1149 | # CONFIG_RTC_DRV_FM3130 is not set | ||
1150 | |||
1151 | # | ||
1152 | # SPI RTC drivers | ||
1153 | # | ||
1154 | |||
1155 | # | ||
1156 | # Platform RTC drivers | ||
1157 | # | ||
1158 | CONFIG_RTC_DRV_CMOS=y | ||
1159 | # CONFIG_RTC_DRV_DS1511 is not set | ||
1160 | # CONFIG_RTC_DRV_DS1553 is not set | ||
1161 | # CONFIG_RTC_DRV_DS1742 is not set | ||
1162 | # CONFIG_RTC_DRV_STK17TA8 is not set | ||
1163 | # CONFIG_RTC_DRV_M48T86 is not set | ||
1164 | # CONFIG_RTC_DRV_M48T59 is not set | ||
1165 | # CONFIG_RTC_DRV_V3020 is not set | ||
1166 | |||
1167 | # | ||
1168 | # on-CPU RTC drivers | ||
1169 | # | ||
1170 | # CONFIG_RTC_DRV_PPC is not set | ||
1079 | # CONFIG_DMADEVICES is not set | 1171 | # CONFIG_DMADEVICES is not set |
1080 | # CONFIG_UIO is not set | 1172 | # CONFIG_UIO is not set |
1081 | 1173 | ||
@@ -1295,8 +1387,11 @@ CONFIG_DEBUG_INFO=y | |||
1295 | # CONFIG_DEBUG_STACK_USAGE is not set | 1387 | # CONFIG_DEBUG_STACK_USAGE is not set |
1296 | # CONFIG_DEBUG_PAGEALLOC is not set | 1388 | # CONFIG_DEBUG_PAGEALLOC is not set |
1297 | # CONFIG_DEBUGGER is not set | 1389 | # CONFIG_DEBUGGER is not set |
1390 | # CONFIG_CODE_PATCHING_SELFTEST is not set | ||
1391 | # CONFIG_FTR_FIXUP_SELFTEST is not set | ||
1298 | # CONFIG_IRQSTACKS is not set | 1392 | # CONFIG_IRQSTACKS is not set |
1299 | # CONFIG_BDI_SWITCH is not set | 1393 | # CONFIG_BDI_SWITCH is not set |
1394 | # CONFIG_BOOTX_TEXT is not set | ||
1300 | # CONFIG_PPC_EARLY_DEBUG is not set | 1395 | # CONFIG_PPC_EARLY_DEBUG is not set |
1301 | 1396 | ||
1302 | # | 1397 | # |
diff --git a/arch/powerpc/configs/mpc8641_hpcn_defconfig b/arch/powerpc/configs/mpc8641_hpcn_defconfig index 4a8171507391..867b8c0215f3 100644 --- a/arch/powerpc/configs/mpc8641_hpcn_defconfig +++ b/arch/powerpc/configs/mpc8641_hpcn_defconfig | |||
@@ -991,10 +991,12 @@ CONFIG_SND=y | |||
991 | CONFIG_SND_TIMER=y | 991 | CONFIG_SND_TIMER=y |
992 | CONFIG_SND_PCM=y | 992 | CONFIG_SND_PCM=y |
993 | # CONFIG_SND_SEQUENCER is not set | 993 | # CONFIG_SND_SEQUENCER is not set |
994 | # CONFIG_SND_MIXER_OSS is not set | 994 | CONFIG_SND_OSSEMUL=y |
995 | # CONFIG_SND_PCM_OSS is not set | 995 | CONFIG_SND_MIXER_OSS=y |
996 | CONFIG_SND_PCM_OSS=y | ||
997 | CONFIG_SND_PCM_OSS_PLUGINS=y | ||
996 | # CONFIG_SND_DYNAMIC_MINORS is not set | 998 | # CONFIG_SND_DYNAMIC_MINORS is not set |
997 | CONFIG_SND_SUPPORT_OLD_API=y | 999 | # CONFIG_SND_SUPPORT_OLD_API is not set |
998 | CONFIG_SND_VERBOSE_PROCFS=y | 1000 | CONFIG_SND_VERBOSE_PROCFS=y |
999 | # CONFIG_SND_VERBOSE_PRINTK is not set | 1001 | # CONFIG_SND_VERBOSE_PRINTK is not set |
1000 | # CONFIG_SND_DEBUG is not set | 1002 | # CONFIG_SND_DEBUG is not set |
diff --git a/arch/powerpc/configs/ppc6xx_defconfig b/arch/powerpc/configs/ppc6xx_defconfig new file mode 100644 index 000000000000..e6e91c85da31 --- /dev/null +++ b/arch/powerpc/configs/ppc6xx_defconfig | |||
@@ -0,0 +1,3304 @@ | |||
1 | # powerpc | ||
2 | # | ||
3 | # Automatically generated make config: don't edit | ||
4 | # Linux kernel version: 2.6.26-git2 | ||
5 | # Tue Jul 15 23:54:18 2008 | ||
6 | # | ||
7 | # CONFIG_PPC64 is not set | ||
8 | |||
9 | # | ||
10 | # Processor support | ||
11 | # | ||
12 | CONFIG_6xx=y | ||
13 | # CONFIG_PPC_85xx is not set | ||
14 | # CONFIG_PPC_8xx is not set | ||
15 | # CONFIG_40x is not set | ||
16 | # CONFIG_44x is not set | ||
17 | # CONFIG_E200 is not set | ||
18 | CONFIG_PPC_FPU=y | ||
19 | CONFIG_FSL_EMB_PERFMON=y | ||
20 | CONFIG_ALTIVEC=y | ||
21 | CONFIG_PPC_STD_MMU=y | ||
22 | CONFIG_PPC_STD_MMU_32=y | ||
23 | # CONFIG_PPC_MM_SLICES is not set | ||
24 | # CONFIG_SMP is not set | ||
25 | CONFIG_PPC32=y | ||
26 | CONFIG_WORD_SIZE=32 | ||
27 | CONFIG_PPC_MERGE=y | ||
28 | CONFIG_MMU=y | ||
29 | CONFIG_GENERIC_CMOS_UPDATE=y | ||
30 | CONFIG_GENERIC_TIME=y | ||
31 | CONFIG_GENERIC_TIME_VSYSCALL=y | ||
32 | CONFIG_GENERIC_CLOCKEVENTS=y | ||
33 | CONFIG_GENERIC_HARDIRQS=y | ||
34 | # CONFIG_HAVE_SETUP_PER_CPU_AREA is not set | ||
35 | CONFIG_IRQ_PER_CPU=y | ||
36 | CONFIG_STACKTRACE_SUPPORT=y | ||
37 | CONFIG_HAVE_LATENCYTOP_SUPPORT=y | ||
38 | CONFIG_LOCKDEP_SUPPORT=y | ||
39 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | ||
40 | CONFIG_ARCH_HAS_ILOG2_U32=y | ||
41 | CONFIG_GENERIC_HWEIGHT=y | ||
42 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
43 | CONFIG_GENERIC_FIND_NEXT_BIT=y | ||
44 | CONFIG_GENERIC_GPIO=y | ||
45 | # CONFIG_ARCH_NO_VIRT_TO_BUS is not set | ||
46 | CONFIG_PPC=y | ||
47 | CONFIG_EARLY_PRINTK=y | ||
48 | CONFIG_GENERIC_NVRAM=y | ||
49 | CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y | ||
50 | CONFIG_ARCH_MAY_HAVE_PC_FDC=y | ||
51 | CONFIG_PPC_OF=y | ||
52 | CONFIG_OF=y | ||
53 | CONFIG_PPC_UDBG_16550=y | ||
54 | # CONFIG_GENERIC_TBSYNC is not set | ||
55 | CONFIG_AUDIT_ARCH=y | ||
56 | CONFIG_GENERIC_BUG=y | ||
57 | CONFIG_SYS_SUPPORTS_APM_EMULATION=y | ||
58 | CONFIG_DEFAULT_UIMAGE=y | ||
59 | CONFIG_REDBOOT=y | ||
60 | CONFIG_HIBERNATE_32=y | ||
61 | CONFIG_ARCH_HIBERNATION_POSSIBLE=y | ||
62 | CONFIG_ARCH_SUSPEND_POSSIBLE=y | ||
63 | # CONFIG_PPC_DCR_NATIVE is not set | ||
64 | # CONFIG_PPC_DCR_MMIO is not set | ||
65 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | ||
66 | |||
67 | # | ||
68 | # General setup | ||
69 | # | ||
70 | CONFIG_EXPERIMENTAL=y | ||
71 | CONFIG_BROKEN_ON_SMP=y | ||
72 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
73 | CONFIG_LOCALVERSION="" | ||
74 | # CONFIG_LOCALVERSION_AUTO is not set | ||
75 | CONFIG_SWAP=y | ||
76 | CONFIG_SYSVIPC=y | ||
77 | CONFIG_SYSVIPC_SYSCTL=y | ||
78 | CONFIG_POSIX_MQUEUE=y | ||
79 | CONFIG_BSD_PROCESS_ACCT=y | ||
80 | # CONFIG_BSD_PROCESS_ACCT_V3 is not set | ||
81 | CONFIG_TASKSTATS=y | ||
82 | CONFIG_TASK_DELAY_ACCT=y | ||
83 | CONFIG_TASK_XACCT=y | ||
84 | CONFIG_TASK_IO_ACCOUNTING=y | ||
85 | CONFIG_AUDIT=y | ||
86 | CONFIG_AUDITSYSCALL=y | ||
87 | CONFIG_AUDIT_TREE=y | ||
88 | # CONFIG_IKCONFIG is not set | ||
89 | CONFIG_LOG_BUF_SHIFT=17 | ||
90 | CONFIG_CGROUPS=y | ||
91 | # CONFIG_CGROUP_DEBUG is not set | ||
92 | CONFIG_CGROUP_NS=y | ||
93 | CONFIG_CGROUP_DEVICE=y | ||
94 | CONFIG_GROUP_SCHED=y | ||
95 | CONFIG_FAIR_GROUP_SCHED=y | ||
96 | CONFIG_RT_GROUP_SCHED=y | ||
97 | # CONFIG_USER_SCHED is not set | ||
98 | CONFIG_CGROUP_SCHED=y | ||
99 | CONFIG_CGROUP_CPUACCT=y | ||
100 | CONFIG_RESOURCE_COUNTERS=y | ||
101 | # CONFIG_CGROUP_MEM_RES_CTLR is not set | ||
102 | # CONFIG_SYSFS_DEPRECATED_V2 is not set | ||
103 | CONFIG_RELAY=y | ||
104 | CONFIG_NAMESPACES=y | ||
105 | CONFIG_UTS_NS=y | ||
106 | CONFIG_IPC_NS=y | ||
107 | CONFIG_USER_NS=y | ||
108 | CONFIG_PID_NS=y | ||
109 | CONFIG_BLK_DEV_INITRD=y | ||
110 | CONFIG_INITRAMFS_SOURCE="" | ||
111 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | ||
112 | CONFIG_SYSCTL=y | ||
113 | # CONFIG_EMBEDDED is not set | ||
114 | CONFIG_SYSCTL_SYSCALL=y | ||
115 | CONFIG_SYSCTL_SYSCALL_CHECK=y | ||
116 | CONFIG_KALLSYMS=y | ||
117 | CONFIG_KALLSYMS_ALL=y | ||
118 | CONFIG_KALLSYMS_EXTRA_PASS=y | ||
119 | CONFIG_HOTPLUG=y | ||
120 | CONFIG_PRINTK=y | ||
121 | CONFIG_BUG=y | ||
122 | CONFIG_ELF_CORE=y | ||
123 | CONFIG_PCSPKR_PLATFORM=y | ||
124 | # CONFIG_COMPAT_BRK is not set | ||
125 | CONFIG_BASE_FULL=y | ||
126 | CONFIG_FUTEX=y | ||
127 | CONFIG_ANON_INODES=y | ||
128 | CONFIG_EPOLL=y | ||
129 | CONFIG_SIGNALFD=y | ||
130 | CONFIG_TIMERFD=y | ||
131 | CONFIG_EVENTFD=y | ||
132 | CONFIG_SHMEM=y | ||
133 | CONFIG_VM_EVENT_COUNTERS=y | ||
134 | CONFIG_SLUB_DEBUG=y | ||
135 | # CONFIG_SLAB is not set | ||
136 | CONFIG_SLUB=y | ||
137 | # CONFIG_SLOB is not set | ||
138 | CONFIG_PROFILING=y | ||
139 | CONFIG_MARKERS=y | ||
140 | CONFIG_OPROFILE=m | ||
141 | CONFIG_HAVE_OPROFILE=y | ||
142 | CONFIG_KPROBES=y | ||
143 | CONFIG_KRETPROBES=y | ||
144 | CONFIG_HAVE_KPROBES=y | ||
145 | CONFIG_HAVE_KRETPROBES=y | ||
146 | # CONFIG_HAVE_DMA_ATTRS is not set | ||
147 | # CONFIG_USE_GENERIC_SMP_HELPERS is not set | ||
148 | CONFIG_PROC_PAGE_MONITOR=y | ||
149 | CONFIG_SLABINFO=y | ||
150 | CONFIG_RT_MUTEXES=y | ||
151 | # CONFIG_TINY_SHMEM is not set | ||
152 | CONFIG_BASE_SMALL=0 | ||
153 | CONFIG_MODULES=y | ||
154 | # CONFIG_MODULE_FORCE_LOAD is not set | ||
155 | CONFIG_MODULE_UNLOAD=y | ||
156 | # CONFIG_MODULE_FORCE_UNLOAD is not set | ||
157 | # CONFIG_MODVERSIONS is not set | ||
158 | CONFIG_MODULE_SRCVERSION_ALL=y | ||
159 | CONFIG_KMOD=y | ||
160 | CONFIG_BLOCK=y | ||
161 | CONFIG_LBD=y | ||
162 | CONFIG_BLK_DEV_IO_TRACE=y | ||
163 | CONFIG_LSF=y | ||
164 | CONFIG_BLK_DEV_BSG=y | ||
165 | CONFIG_BLK_DEV_INTEGRITY=y | ||
166 | |||
167 | # | ||
168 | # IO Schedulers | ||
169 | # | ||
170 | CONFIG_IOSCHED_NOOP=y | ||
171 | CONFIG_IOSCHED_AS=y | ||
172 | CONFIG_IOSCHED_DEADLINE=y | ||
173 | CONFIG_IOSCHED_CFQ=y | ||
174 | # CONFIG_DEFAULT_AS is not set | ||
175 | # CONFIG_DEFAULT_DEADLINE is not set | ||
176 | CONFIG_DEFAULT_CFQ=y | ||
177 | # CONFIG_DEFAULT_NOOP is not set | ||
178 | CONFIG_DEFAULT_IOSCHED="cfq" | ||
179 | CONFIG_CLASSIC_RCU=y | ||
180 | |||
181 | # | ||
182 | # Platform support | ||
183 | # | ||
184 | CONFIG_PPC_MULTIPLATFORM=y | ||
185 | CONFIG_CLASSIC32=y | ||
186 | CONFIG_PPC_CHRP=y | ||
187 | # CONFIG_MPC5121_ADS is not set | ||
188 | # CONFIG_MPC5121_GENERIC is not set | ||
189 | CONFIG_PPC_MPC52xx=y | ||
190 | # CONFIG_PPC_MPC5200_SIMPLE is not set | ||
191 | CONFIG_PPC_EFIKA=y | ||
192 | # CONFIG_PPC_LITE5200 is not set | ||
193 | CONFIG_PPC_MPC5200_BUGFIX=y | ||
194 | CONFIG_PPC_MPC5200_GPIO=y | ||
195 | CONFIG_PPC_PMAC=y | ||
196 | # CONFIG_PPC_CELL is not set | ||
197 | # CONFIG_PPC_CELL_NATIVE is not set | ||
198 | CONFIG_PPC_82xx=y | ||
199 | CONFIG_MPC8272_ADS=y | ||
200 | CONFIG_PQ2FADS=y | ||
201 | CONFIG_EP8248E=y | ||
202 | CONFIG_PQ2ADS=y | ||
203 | CONFIG_8260=y | ||
204 | CONFIG_8272=y | ||
205 | CONFIG_PQ2_ADS_PCI_PIC=y | ||
206 | CONFIG_PPC_83xx=y | ||
207 | CONFIG_MPC831x_RDB=y | ||
208 | CONFIG_MPC832x_MDS=y | ||
209 | CONFIG_MPC832x_RDB=y | ||
210 | CONFIG_MPC834x_MDS=y | ||
211 | CONFIG_MPC834x_ITX=y | ||
212 | CONFIG_MPC836x_MDS=y | ||
213 | CONFIG_MPC836x_RDK=y | ||
214 | CONFIG_MPC837x_MDS=y | ||
215 | CONFIG_MPC837x_RDB=y | ||
216 | CONFIG_SBC834x=y | ||
217 | CONFIG_ASP834x=y | ||
218 | CONFIG_PPC_MPC831x=y | ||
219 | CONFIG_PPC_MPC832x=y | ||
220 | CONFIG_PPC_MPC834x=y | ||
221 | CONFIG_PPC_MPC837x=y | ||
222 | CONFIG_PPC_86xx=y | ||
223 | CONFIG_MPC8641_HPCN=y | ||
224 | CONFIG_SBC8641D=y | ||
225 | CONFIG_MPC8610_HPCD=y | ||
226 | CONFIG_MPC8641=y | ||
227 | CONFIG_MPC8610=y | ||
228 | # CONFIG_EMBEDDED6xx is not set | ||
229 | CONFIG_PPC_NATIVE=y | ||
230 | # CONFIG_UDBG_RTAS_CONSOLE is not set | ||
231 | CONFIG_IPIC=y | ||
232 | CONFIG_MPIC=y | ||
233 | # CONFIG_MPIC_WEIRD is not set | ||
234 | CONFIG_PPC_I8259=y | ||
235 | CONFIG_PPC_RTAS=y | ||
236 | # CONFIG_RTAS_ERROR_LOGGING is not set | ||
237 | CONFIG_RTAS_PROC=y | ||
238 | # CONFIG_MMIO_NVRAM is not set | ||
239 | CONFIG_PPC_MPC106=y | ||
240 | # CONFIG_PPC_970_NAP is not set | ||
241 | # CONFIG_PPC_INDIRECT_IO is not set | ||
242 | # CONFIG_GENERIC_IOMAP is not set | ||
243 | CONFIG_CPU_FREQ=y | ||
244 | CONFIG_CPU_FREQ_TABLE=y | ||
245 | CONFIG_CPU_FREQ_DEBUG=y | ||
246 | CONFIG_CPU_FREQ_STAT=m | ||
247 | CONFIG_CPU_FREQ_STAT_DETAILS=y | ||
248 | # CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set | ||
249 | # CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set | ||
250 | CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y | ||
251 | # CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set | ||
252 | # CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set | ||
253 | CONFIG_CPU_FREQ_GOV_PERFORMANCE=y | ||
254 | CONFIG_CPU_FREQ_GOV_POWERSAVE=m | ||
255 | CONFIG_CPU_FREQ_GOV_USERSPACE=y | ||
256 | CONFIG_CPU_FREQ_GOV_ONDEMAND=m | ||
257 | CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m | ||
258 | |||
259 | # | ||
260 | # CPU Frequency drivers | ||
261 | # | ||
262 | CONFIG_CPU_FREQ_PMAC=y | ||
263 | # CONFIG_PPC601_SYNC_FIX is not set | ||
264 | CONFIG_TAU=y | ||
265 | # CONFIG_TAU_INT is not set | ||
266 | CONFIG_TAU_AVERAGE=y | ||
267 | CONFIG_QUICC_ENGINE=y | ||
268 | CONFIG_CPM2=y | ||
269 | CONFIG_PPC_CPM_NEW_BINDING=y | ||
270 | CONFIG_FSL_ULI1575=y | ||
271 | CONFIG_CPM=y | ||
272 | CONFIG_PPC_BESTCOMM=y | ||
273 | CONFIG_PPC_BESTCOMM_ATA=m | ||
274 | CONFIG_PPC_BESTCOMM_FEC=m | ||
275 | CONFIG_PPC_BESTCOMM_GEN_BD=m | ||
276 | |||
277 | # | ||
278 | # Kernel options | ||
279 | # | ||
280 | CONFIG_HIGHMEM=y | ||
281 | CONFIG_TICK_ONESHOT=y | ||
282 | CONFIG_NO_HZ=y | ||
283 | CONFIG_HIGH_RES_TIMERS=y | ||
284 | CONFIG_GENERIC_CLOCKEVENTS_BUILD=y | ||
285 | # CONFIG_HZ_100 is not set | ||
286 | # CONFIG_HZ_250 is not set | ||
287 | # CONFIG_HZ_300 is not set | ||
288 | CONFIG_HZ_1000=y | ||
289 | CONFIG_HZ=1000 | ||
290 | # CONFIG_SCHED_HRTICK is not set | ||
291 | # CONFIG_PREEMPT_NONE is not set | ||
292 | CONFIG_PREEMPT_VOLUNTARY=y | ||
293 | # CONFIG_PREEMPT is not set | ||
294 | CONFIG_BINFMT_ELF=y | ||
295 | CONFIG_BINFMT_MISC=y | ||
296 | # CONFIG_MATH_EMULATION is not set | ||
297 | # CONFIG_IOMMU_HELPER is not set | ||
298 | CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y | ||
299 | CONFIG_ARCH_HAS_WALK_MEMORY=y | ||
300 | CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y | ||
301 | # CONFIG_KEXEC is not set | ||
302 | CONFIG_ARCH_FLATMEM_ENABLE=y | ||
303 | CONFIG_ARCH_POPULATES_NODE_MAP=y | ||
304 | CONFIG_SELECT_MEMORY_MODEL=y | ||
305 | CONFIG_FLATMEM_MANUAL=y | ||
306 | # CONFIG_DISCONTIGMEM_MANUAL is not set | ||
307 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
308 | CONFIG_FLATMEM=y | ||
309 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
310 | # CONFIG_SPARSEMEM_STATIC is not set | ||
311 | # CONFIG_SPARSEMEM_VMEMMAP_ENABLE is not set | ||
312 | CONFIG_PAGEFLAGS_EXTENDED=y | ||
313 | CONFIG_SPLIT_PTLOCK_CPUS=4 | ||
314 | CONFIG_RESOURCES_64BIT=y | ||
315 | CONFIG_ZONE_DMA_FLAG=1 | ||
316 | CONFIG_BOUNCE=y | ||
317 | CONFIG_VIRT_TO_BUS=y | ||
318 | CONFIG_FORCE_MAX_ZONEORDER=11 | ||
319 | CONFIG_PROC_DEVICETREE=y | ||
320 | # CONFIG_CMDLINE_BOOL is not set | ||
321 | CONFIG_EXTRA_TARGETS="" | ||
322 | CONFIG_ARCH_WANTS_FREEZER_CONTROL=y | ||
323 | CONFIG_PM=y | ||
324 | CONFIG_PM_DEBUG=y | ||
325 | # CONFIG_PM_VERBOSE is not set | ||
326 | CONFIG_CAN_PM_TRACE=y | ||
327 | CONFIG_PM_SLEEP=y | ||
328 | CONFIG_SUSPEND=y | ||
329 | CONFIG_SUSPEND_FREEZER=y | ||
330 | CONFIG_HIBERNATION=y | ||
331 | CONFIG_PM_STD_PARTITION="" | ||
332 | CONFIG_APM_EMULATION=y | ||
333 | CONFIG_SECCOMP=y | ||
334 | CONFIG_ISA_DMA_API=y | ||
335 | |||
336 | # | ||
337 | # Bus options | ||
338 | # | ||
339 | CONFIG_ISA=y | ||
340 | CONFIG_ZONE_DMA=y | ||
341 | CONFIG_GENERIC_ISA_DMA=y | ||
342 | CONFIG_PPC_INDIRECT_PCI=y | ||
343 | CONFIG_FSL_SOC=y | ||
344 | CONFIG_FSL_PCI=y | ||
345 | CONFIG_FSL_LBC=y | ||
346 | CONFIG_FSL_GTM=y | ||
347 | CONFIG_PCI=y | ||
348 | CONFIG_PCI_DOMAINS=y | ||
349 | CONFIG_PCI_SYSCALL=y | ||
350 | CONFIG_PCI_8260=y | ||
351 | CONFIG_PCIEPORTBUS=y | ||
352 | CONFIG_PCIEAER=y | ||
353 | CONFIG_PCIEASPM=y | ||
354 | # CONFIG_PCIEASPM_DEBUG is not set | ||
355 | CONFIG_ARCH_SUPPORTS_MSI=y | ||
356 | CONFIG_PCI_MSI=y | ||
357 | CONFIG_PCI_LEGACY=y | ||
358 | # CONFIG_PCI_DEBUG is not set | ||
359 | CONFIG_PCCARD=y | ||
360 | # CONFIG_PCMCIA_DEBUG is not set | ||
361 | CONFIG_PCMCIA=y | ||
362 | CONFIG_PCMCIA_LOAD_CIS=y | ||
363 | CONFIG_PCMCIA_IOCTL=y | ||
364 | CONFIG_CARDBUS=y | ||
365 | |||
366 | # | ||
367 | # PC-card bridges | ||
368 | # | ||
369 | CONFIG_YENTA=y | ||
370 | CONFIG_YENTA_O2=y | ||
371 | CONFIG_YENTA_RICOH=y | ||
372 | CONFIG_YENTA_TI=y | ||
373 | CONFIG_YENTA_ENE_TUNE=y | ||
374 | CONFIG_YENTA_TOSHIBA=y | ||
375 | CONFIG_PD6729=m | ||
376 | CONFIG_I82092=m | ||
377 | CONFIG_I82365=m | ||
378 | # CONFIG_TCIC is not set | ||
379 | CONFIG_PCMCIA_PROBE=y | ||
380 | CONFIG_PCCARD_NONSTATIC=y | ||
381 | # CONFIG_HOTPLUG_PCI is not set | ||
382 | CONFIG_HAS_RAPIDIO=y | ||
383 | # CONFIG_RAPIDIO is not set | ||
384 | |||
385 | # | ||
386 | # Advanced setup | ||
387 | # | ||
388 | CONFIG_ADVANCED_OPTIONS=y | ||
389 | # CONFIG_LOWMEM_SIZE_BOOL is not set | ||
390 | CONFIG_LOWMEM_SIZE=0x30000000 | ||
391 | # CONFIG_PAGE_OFFSET_BOOL is not set | ||
392 | CONFIG_PAGE_OFFSET=0xc0000000 | ||
393 | # CONFIG_KERNEL_START_BOOL is not set | ||
394 | CONFIG_KERNEL_START=0xc0000000 | ||
395 | CONFIG_PHYSICAL_START=0x00000000 | ||
396 | # CONFIG_TASK_SIZE_BOOL is not set | ||
397 | CONFIG_TASK_SIZE=0xc0000000 | ||
398 | |||
399 | # | ||
400 | # Networking | ||
401 | # | ||
402 | CONFIG_NET=y | ||
403 | |||
404 | # | ||
405 | # Networking options | ||
406 | # | ||
407 | CONFIG_PACKET=y | ||
408 | CONFIG_PACKET_MMAP=y | ||
409 | CONFIG_UNIX=y | ||
410 | CONFIG_XFRM=y | ||
411 | CONFIG_XFRM_USER=y | ||
412 | CONFIG_XFRM_SUB_POLICY=y | ||
413 | CONFIG_XFRM_MIGRATE=y | ||
414 | CONFIG_XFRM_STATISTICS=y | ||
415 | CONFIG_NET_KEY=m | ||
416 | CONFIG_NET_KEY_MIGRATE=y | ||
417 | CONFIG_INET=y | ||
418 | CONFIG_IP_MULTICAST=y | ||
419 | CONFIG_IP_ADVANCED_ROUTER=y | ||
420 | CONFIG_ASK_IP_FIB_HASH=y | ||
421 | # CONFIG_IP_FIB_TRIE is not set | ||
422 | CONFIG_IP_FIB_HASH=y | ||
423 | CONFIG_IP_MULTIPLE_TABLES=y | ||
424 | CONFIG_IP_ROUTE_MULTIPATH=y | ||
425 | CONFIG_IP_ROUTE_VERBOSE=y | ||
426 | # CONFIG_IP_PNP is not set | ||
427 | CONFIG_NET_IPIP=m | ||
428 | CONFIG_NET_IPGRE=m | ||
429 | CONFIG_NET_IPGRE_BROADCAST=y | ||
430 | CONFIG_IP_MROUTE=y | ||
431 | CONFIG_IP_PIMSM_V1=y | ||
432 | CONFIG_IP_PIMSM_V2=y | ||
433 | # CONFIG_ARPD is not set | ||
434 | CONFIG_SYN_COOKIES=y | ||
435 | CONFIG_INET_AH=m | ||
436 | CONFIG_INET_ESP=m | ||
437 | CONFIG_INET_IPCOMP=m | ||
438 | CONFIG_INET_XFRM_TUNNEL=m | ||
439 | CONFIG_INET_TUNNEL=m | ||
440 | CONFIG_INET_XFRM_MODE_TRANSPORT=m | ||
441 | CONFIG_INET_XFRM_MODE_TUNNEL=m | ||
442 | CONFIG_INET_XFRM_MODE_BEET=m | ||
443 | CONFIG_INET_LRO=y | ||
444 | CONFIG_INET_DIAG=m | ||
445 | CONFIG_INET_TCP_DIAG=m | ||
446 | CONFIG_TCP_CONG_ADVANCED=y | ||
447 | CONFIG_TCP_CONG_BIC=m | ||
448 | CONFIG_TCP_CONG_CUBIC=y | ||
449 | CONFIG_TCP_CONG_WESTWOOD=m | ||
450 | CONFIG_TCP_CONG_HTCP=m | ||
451 | CONFIG_TCP_CONG_HSTCP=m | ||
452 | CONFIG_TCP_CONG_HYBLA=m | ||
453 | CONFIG_TCP_CONG_VEGAS=m | ||
454 | CONFIG_TCP_CONG_SCALABLE=m | ||
455 | CONFIG_TCP_CONG_LP=m | ||
456 | CONFIG_TCP_CONG_VENO=m | ||
457 | CONFIG_TCP_CONG_YEAH=m | ||
458 | CONFIG_TCP_CONG_ILLINOIS=m | ||
459 | # CONFIG_DEFAULT_BIC is not set | ||
460 | CONFIG_DEFAULT_CUBIC=y | ||
461 | # CONFIG_DEFAULT_HTCP is not set | ||
462 | # CONFIG_DEFAULT_VEGAS is not set | ||
463 | # CONFIG_DEFAULT_WESTWOOD is not set | ||
464 | # CONFIG_DEFAULT_RENO is not set | ||
465 | CONFIG_DEFAULT_TCP_CONG="cubic" | ||
466 | CONFIG_TCP_MD5SIG=y | ||
467 | # CONFIG_IP_VS is not set | ||
468 | CONFIG_IPV6=m | ||
469 | CONFIG_IPV6_PRIVACY=y | ||
470 | CONFIG_IPV6_ROUTER_PREF=y | ||
471 | CONFIG_IPV6_ROUTE_INFO=y | ||
472 | CONFIG_IPV6_OPTIMISTIC_DAD=y | ||
473 | CONFIG_INET6_AH=m | ||
474 | CONFIG_INET6_ESP=m | ||
475 | CONFIG_INET6_IPCOMP=m | ||
476 | CONFIG_IPV6_MIP6=m | ||
477 | CONFIG_INET6_XFRM_TUNNEL=m | ||
478 | CONFIG_INET6_TUNNEL=m | ||
479 | CONFIG_INET6_XFRM_MODE_TRANSPORT=m | ||
480 | CONFIG_INET6_XFRM_MODE_TUNNEL=m | ||
481 | CONFIG_INET6_XFRM_MODE_BEET=m | ||
482 | CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m | ||
483 | CONFIG_IPV6_SIT=m | ||
484 | CONFIG_IPV6_NDISC_NODETYPE=y | ||
485 | CONFIG_IPV6_TUNNEL=m | ||
486 | CONFIG_IPV6_MULTIPLE_TABLES=y | ||
487 | CONFIG_IPV6_SUBTREES=y | ||
488 | CONFIG_IPV6_MROUTE=y | ||
489 | CONFIG_IPV6_PIMSM_V2=y | ||
490 | CONFIG_NETLABEL=y | ||
491 | CONFIG_NETWORK_SECMARK=y | ||
492 | CONFIG_NETFILTER=y | ||
493 | # CONFIG_NETFILTER_DEBUG is not set | ||
494 | CONFIG_NETFILTER_ADVANCED=y | ||
495 | CONFIG_BRIDGE_NETFILTER=y | ||
496 | |||
497 | # | ||
498 | # Core Netfilter Configuration | ||
499 | # | ||
500 | CONFIG_NETFILTER_NETLINK=m | ||
501 | CONFIG_NETFILTER_NETLINK_QUEUE=m | ||
502 | CONFIG_NETFILTER_NETLINK_LOG=m | ||
503 | CONFIG_NF_CONNTRACK=m | ||
504 | CONFIG_NF_CT_ACCT=y | ||
505 | CONFIG_NF_CONNTRACK_MARK=y | ||
506 | CONFIG_NF_CONNTRACK_SECMARK=y | ||
507 | CONFIG_NF_CONNTRACK_EVENTS=y | ||
508 | CONFIG_NF_CT_PROTO_DCCP=m | ||
509 | CONFIG_NF_CT_PROTO_GRE=m | ||
510 | CONFIG_NF_CT_PROTO_SCTP=m | ||
511 | CONFIG_NF_CT_PROTO_UDPLITE=m | ||
512 | CONFIG_NF_CONNTRACK_AMANDA=m | ||
513 | CONFIG_NF_CONNTRACK_FTP=m | ||
514 | CONFIG_NF_CONNTRACK_H323=m | ||
515 | CONFIG_NF_CONNTRACK_IRC=m | ||
516 | CONFIG_NF_CONNTRACK_NETBIOS_NS=m | ||
517 | CONFIG_NF_CONNTRACK_PPTP=m | ||
518 | CONFIG_NF_CONNTRACK_SANE=m | ||
519 | CONFIG_NF_CONNTRACK_SIP=m | ||
520 | CONFIG_NF_CONNTRACK_TFTP=m | ||
521 | CONFIG_NF_CT_NETLINK=m | ||
522 | CONFIG_NETFILTER_XTABLES=m | ||
523 | CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m | ||
524 | CONFIG_NETFILTER_XT_TARGET_CONNMARK=m | ||
525 | CONFIG_NETFILTER_XT_TARGET_DSCP=m | ||
526 | CONFIG_NETFILTER_XT_TARGET_MARK=m | ||
527 | CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m | ||
528 | CONFIG_NETFILTER_XT_TARGET_NFLOG=m | ||
529 | CONFIG_NETFILTER_XT_TARGET_NOTRACK=m | ||
530 | CONFIG_NETFILTER_XT_TARGET_RATEEST=m | ||
531 | CONFIG_NETFILTER_XT_TARGET_TRACE=m | ||
532 | CONFIG_NETFILTER_XT_TARGET_SECMARK=m | ||
533 | CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m | ||
534 | CONFIG_NETFILTER_XT_TARGET_TCPMSS=m | ||
535 | CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP=m | ||
536 | CONFIG_NETFILTER_XT_MATCH_COMMENT=m | ||
537 | CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m | ||
538 | CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=m | ||
539 | CONFIG_NETFILTER_XT_MATCH_CONNMARK=m | ||
540 | CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m | ||
541 | CONFIG_NETFILTER_XT_MATCH_DCCP=m | ||
542 | CONFIG_NETFILTER_XT_MATCH_DSCP=m | ||
543 | CONFIG_NETFILTER_XT_MATCH_ESP=m | ||
544 | CONFIG_NETFILTER_XT_MATCH_HELPER=m | ||
545 | CONFIG_NETFILTER_XT_MATCH_IPRANGE=m | ||
546 | CONFIG_NETFILTER_XT_MATCH_LENGTH=m | ||
547 | CONFIG_NETFILTER_XT_MATCH_LIMIT=m | ||
548 | CONFIG_NETFILTER_XT_MATCH_MAC=m | ||
549 | CONFIG_NETFILTER_XT_MATCH_MARK=m | ||
550 | CONFIG_NETFILTER_XT_MATCH_OWNER=m | ||
551 | CONFIG_NETFILTER_XT_MATCH_POLICY=m | ||
552 | CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m | ||
553 | CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m | ||
554 | CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m | ||
555 | CONFIG_NETFILTER_XT_MATCH_QUOTA=m | ||
556 | CONFIG_NETFILTER_XT_MATCH_RATEEST=m | ||
557 | CONFIG_NETFILTER_XT_MATCH_REALM=m | ||
558 | CONFIG_NETFILTER_XT_MATCH_SCTP=m | ||
559 | CONFIG_NETFILTER_XT_MATCH_STATE=m | ||
560 | CONFIG_NETFILTER_XT_MATCH_STATISTIC=m | ||
561 | CONFIG_NETFILTER_XT_MATCH_STRING=m | ||
562 | CONFIG_NETFILTER_XT_MATCH_TCPMSS=m | ||
563 | CONFIG_NETFILTER_XT_MATCH_TIME=m | ||
564 | CONFIG_NETFILTER_XT_MATCH_U32=m | ||
565 | CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m | ||
566 | |||
567 | # | ||
568 | # IP: Netfilter Configuration | ||
569 | # | ||
570 | CONFIG_NF_CONNTRACK_IPV4=m | ||
571 | # CONFIG_NF_CONNTRACK_PROC_COMPAT is not set | ||
572 | CONFIG_IP_NF_QUEUE=m | ||
573 | CONFIG_IP_NF_IPTABLES=m | ||
574 | CONFIG_IP_NF_MATCH_RECENT=m | ||
575 | CONFIG_IP_NF_MATCH_ECN=m | ||
576 | CONFIG_IP_NF_MATCH_AH=m | ||
577 | CONFIG_IP_NF_MATCH_TTL=m | ||
578 | CONFIG_IP_NF_MATCH_ADDRTYPE=m | ||
579 | CONFIG_IP_NF_FILTER=m | ||
580 | CONFIG_IP_NF_TARGET_REJECT=m | ||
581 | CONFIG_IP_NF_TARGET_LOG=m | ||
582 | CONFIG_IP_NF_TARGET_ULOG=m | ||
583 | CONFIG_NF_NAT=m | ||
584 | CONFIG_NF_NAT_NEEDED=y | ||
585 | CONFIG_IP_NF_TARGET_MASQUERADE=m | ||
586 | CONFIG_IP_NF_TARGET_REDIRECT=m | ||
587 | CONFIG_IP_NF_TARGET_NETMAP=m | ||
588 | CONFIG_NF_NAT_SNMP_BASIC=m | ||
589 | CONFIG_NF_NAT_PROTO_DCCP=m | ||
590 | CONFIG_NF_NAT_PROTO_GRE=m | ||
591 | CONFIG_NF_NAT_PROTO_UDPLITE=m | ||
592 | CONFIG_NF_NAT_PROTO_SCTP=m | ||
593 | CONFIG_NF_NAT_FTP=m | ||
594 | CONFIG_NF_NAT_IRC=m | ||
595 | CONFIG_NF_NAT_TFTP=m | ||
596 | CONFIG_NF_NAT_AMANDA=m | ||
597 | CONFIG_NF_NAT_PPTP=m | ||
598 | CONFIG_NF_NAT_H323=m | ||
599 | CONFIG_NF_NAT_SIP=m | ||
600 | CONFIG_IP_NF_MANGLE=m | ||
601 | CONFIG_IP_NF_TARGET_ECN=m | ||
602 | CONFIG_IP_NF_TARGET_TTL=m | ||
603 | CONFIG_IP_NF_TARGET_CLUSTERIP=m | ||
604 | CONFIG_IP_NF_RAW=m | ||
605 | CONFIG_IP_NF_ARPTABLES=m | ||
606 | CONFIG_IP_NF_ARPFILTER=m | ||
607 | CONFIG_IP_NF_ARP_MANGLE=m | ||
608 | |||
609 | # | ||
610 | # IPv6: Netfilter Configuration | ||
611 | # | ||
612 | CONFIG_NF_CONNTRACK_IPV6=m | ||
613 | CONFIG_IP6_NF_QUEUE=m | ||
614 | CONFIG_IP6_NF_IPTABLES=m | ||
615 | CONFIG_IP6_NF_MATCH_RT=m | ||
616 | CONFIG_IP6_NF_MATCH_OPTS=m | ||
617 | CONFIG_IP6_NF_MATCH_FRAG=m | ||
618 | CONFIG_IP6_NF_MATCH_HL=m | ||
619 | CONFIG_IP6_NF_MATCH_IPV6HEADER=m | ||
620 | CONFIG_IP6_NF_MATCH_AH=m | ||
621 | CONFIG_IP6_NF_MATCH_MH=m | ||
622 | CONFIG_IP6_NF_MATCH_EUI64=m | ||
623 | CONFIG_IP6_NF_FILTER=m | ||
624 | CONFIG_IP6_NF_TARGET_LOG=m | ||
625 | CONFIG_IP6_NF_TARGET_REJECT=m | ||
626 | CONFIG_IP6_NF_MANGLE=m | ||
627 | CONFIG_IP6_NF_TARGET_HL=m | ||
628 | CONFIG_IP6_NF_RAW=m | ||
629 | |||
630 | # | ||
631 | # DECnet: Netfilter Configuration | ||
632 | # | ||
633 | # CONFIG_DECNET_NF_GRABULATOR is not set | ||
634 | |||
635 | # | ||
636 | # Bridge: Netfilter Configuration | ||
637 | # | ||
638 | CONFIG_BRIDGE_NF_EBTABLES=m | ||
639 | CONFIG_BRIDGE_EBT_BROUTE=m | ||
640 | CONFIG_BRIDGE_EBT_T_FILTER=m | ||
641 | CONFIG_BRIDGE_EBT_T_NAT=m | ||
642 | CONFIG_BRIDGE_EBT_802_3=m | ||
643 | CONFIG_BRIDGE_EBT_AMONG=m | ||
644 | CONFIG_BRIDGE_EBT_ARP=m | ||
645 | CONFIG_BRIDGE_EBT_IP=m | ||
646 | CONFIG_BRIDGE_EBT_LIMIT=m | ||
647 | CONFIG_BRIDGE_EBT_MARK=m | ||
648 | CONFIG_BRIDGE_EBT_PKTTYPE=m | ||
649 | CONFIG_BRIDGE_EBT_STP=m | ||
650 | CONFIG_BRIDGE_EBT_VLAN=m | ||
651 | CONFIG_BRIDGE_EBT_ARPREPLY=m | ||
652 | CONFIG_BRIDGE_EBT_DNAT=m | ||
653 | CONFIG_BRIDGE_EBT_MARK_T=m | ||
654 | CONFIG_BRIDGE_EBT_REDIRECT=m | ||
655 | CONFIG_BRIDGE_EBT_SNAT=m | ||
656 | CONFIG_BRIDGE_EBT_LOG=m | ||
657 | CONFIG_BRIDGE_EBT_ULOG=m | ||
658 | CONFIG_BRIDGE_EBT_NFLOG=m | ||
659 | CONFIG_IP_DCCP=m | ||
660 | CONFIG_INET_DCCP_DIAG=m | ||
661 | CONFIG_IP_DCCP_ACKVEC=y | ||
662 | |||
663 | # | ||
664 | # DCCP CCIDs Configuration (EXPERIMENTAL) | ||
665 | # | ||
666 | CONFIG_IP_DCCP_CCID2=m | ||
667 | # CONFIG_IP_DCCP_CCID2_DEBUG is not set | ||
668 | CONFIG_IP_DCCP_CCID3=m | ||
669 | # CONFIG_IP_DCCP_CCID3_DEBUG is not set | ||
670 | CONFIG_IP_DCCP_CCID3_RTO=100 | ||
671 | CONFIG_IP_DCCP_TFRC_LIB=m | ||
672 | |||
673 | # | ||
674 | # DCCP Kernel Hacking | ||
675 | # | ||
676 | # CONFIG_IP_DCCP_DEBUG is not set | ||
677 | CONFIG_NET_DCCPPROBE=m | ||
678 | CONFIG_IP_SCTP=m | ||
679 | # CONFIG_SCTP_DBG_MSG is not set | ||
680 | # CONFIG_SCTP_DBG_OBJCNT is not set | ||
681 | # CONFIG_SCTP_HMAC_NONE is not set | ||
682 | # CONFIG_SCTP_HMAC_SHA1 is not set | ||
683 | CONFIG_SCTP_HMAC_MD5=y | ||
684 | CONFIG_TIPC=m | ||
685 | # CONFIG_TIPC_ADVANCED is not set | ||
686 | # CONFIG_TIPC_DEBUG is not set | ||
687 | CONFIG_ATM=m | ||
688 | CONFIG_ATM_CLIP=m | ||
689 | # CONFIG_ATM_CLIP_NO_ICMP is not set | ||
690 | CONFIG_ATM_LANE=m | ||
691 | # CONFIG_ATM_MPOA is not set | ||
692 | CONFIG_ATM_BR2684=m | ||
693 | # CONFIG_ATM_BR2684_IPFILTER is not set | ||
694 | CONFIG_BRIDGE=m | ||
695 | CONFIG_VLAN_8021Q=m | ||
696 | CONFIG_DECNET=m | ||
697 | CONFIG_DECNET_ROUTER=y | ||
698 | CONFIG_LLC=m | ||
699 | # CONFIG_LLC2 is not set | ||
700 | CONFIG_IPX=m | ||
701 | # CONFIG_IPX_INTERN is not set | ||
702 | CONFIG_ATALK=m | ||
703 | CONFIG_DEV_APPLETALK=m | ||
704 | # CONFIG_LTPC is not set | ||
705 | # CONFIG_COPS is not set | ||
706 | CONFIG_IPDDP=m | ||
707 | CONFIG_IPDDP_ENCAP=y | ||
708 | CONFIG_IPDDP_DECAP=y | ||
709 | # CONFIG_X25 is not set | ||
710 | # CONFIG_LAPB is not set | ||
711 | # CONFIG_ECONET is not set | ||
712 | CONFIG_WAN_ROUTER=m | ||
713 | CONFIG_NET_SCHED=y | ||
714 | |||
715 | # | ||
716 | # Queueing/Scheduling | ||
717 | # | ||
718 | CONFIG_NET_SCH_CBQ=m | ||
719 | CONFIG_NET_SCH_HTB=m | ||
720 | CONFIG_NET_SCH_HFSC=m | ||
721 | CONFIG_NET_SCH_ATM=m | ||
722 | CONFIG_NET_SCH_PRIO=m | ||
723 | CONFIG_NET_SCH_RED=m | ||
724 | CONFIG_NET_SCH_SFQ=m | ||
725 | CONFIG_NET_SCH_TEQL=m | ||
726 | CONFIG_NET_SCH_TBF=m | ||
727 | CONFIG_NET_SCH_GRED=m | ||
728 | CONFIG_NET_SCH_DSMARK=m | ||
729 | CONFIG_NET_SCH_NETEM=m | ||
730 | CONFIG_NET_SCH_INGRESS=m | ||
731 | |||
732 | # | ||
733 | # Classification | ||
734 | # | ||
735 | CONFIG_NET_CLS=y | ||
736 | CONFIG_NET_CLS_BASIC=m | ||
737 | CONFIG_NET_CLS_TCINDEX=m | ||
738 | CONFIG_NET_CLS_ROUTE4=m | ||
739 | CONFIG_NET_CLS_ROUTE=y | ||
740 | CONFIG_NET_CLS_FW=m | ||
741 | CONFIG_NET_CLS_U32=m | ||
742 | CONFIG_CLS_U32_PERF=y | ||
743 | CONFIG_CLS_U32_MARK=y | ||
744 | CONFIG_NET_CLS_RSVP=m | ||
745 | CONFIG_NET_CLS_RSVP6=m | ||
746 | CONFIG_NET_CLS_FLOW=m | ||
747 | CONFIG_NET_EMATCH=y | ||
748 | CONFIG_NET_EMATCH_STACK=32 | ||
749 | CONFIG_NET_EMATCH_CMP=m | ||
750 | CONFIG_NET_EMATCH_NBYTE=m | ||
751 | CONFIG_NET_EMATCH_U32=m | ||
752 | CONFIG_NET_EMATCH_META=m | ||
753 | CONFIG_NET_EMATCH_TEXT=m | ||
754 | CONFIG_NET_CLS_ACT=y | ||
755 | CONFIG_NET_ACT_POLICE=m | ||
756 | CONFIG_NET_ACT_GACT=m | ||
757 | CONFIG_GACT_PROB=y | ||
758 | CONFIG_NET_ACT_MIRRED=m | ||
759 | CONFIG_NET_ACT_IPT=m | ||
760 | CONFIG_NET_ACT_NAT=m | ||
761 | CONFIG_NET_ACT_PEDIT=m | ||
762 | CONFIG_NET_ACT_SIMP=m | ||
763 | CONFIG_NET_CLS_IND=y | ||
764 | CONFIG_NET_SCH_FIFO=y | ||
765 | |||
766 | # | ||
767 | # Network testing | ||
768 | # | ||
769 | # CONFIG_NET_PKTGEN is not set | ||
770 | # CONFIG_NET_TCPPROBE is not set | ||
771 | # CONFIG_HAMRADIO is not set | ||
772 | # CONFIG_CAN is not set | ||
773 | CONFIG_IRDA=m | ||
774 | |||
775 | # | ||
776 | # IrDA protocols | ||
777 | # | ||
778 | CONFIG_IRLAN=m | ||
779 | CONFIG_IRNET=m | ||
780 | CONFIG_IRCOMM=m | ||
781 | # CONFIG_IRDA_ULTRA is not set | ||
782 | |||
783 | # | ||
784 | # IrDA options | ||
785 | # | ||
786 | CONFIG_IRDA_CACHE_LAST_LSAP=y | ||
787 | CONFIG_IRDA_FAST_RR=y | ||
788 | # CONFIG_IRDA_DEBUG is not set | ||
789 | |||
790 | # | ||
791 | # Infrared-port device drivers | ||
792 | # | ||
793 | |||
794 | # | ||
795 | # SIR device drivers | ||
796 | # | ||
797 | CONFIG_IRTTY_SIR=m | ||
798 | |||
799 | # | ||
800 | # Dongle support | ||
801 | # | ||
802 | # CONFIG_DONGLE is not set | ||
803 | CONFIG_KINGSUN_DONGLE=m | ||
804 | CONFIG_KSDAZZLE_DONGLE=m | ||
805 | CONFIG_KS959_DONGLE=m | ||
806 | |||
807 | # | ||
808 | # FIR device drivers | ||
809 | # | ||
810 | CONFIG_USB_IRDA=m | ||
811 | CONFIG_SIGMATEL_FIR=m | ||
812 | CONFIG_NSC_FIR=m | ||
813 | CONFIG_WINBOND_FIR=m | ||
814 | CONFIG_TOSHIBA_FIR=m | ||
815 | CONFIG_SMC_IRCC_FIR=m | ||
816 | CONFIG_ALI_FIR=m | ||
817 | CONFIG_VLSI_FIR=m | ||
818 | CONFIG_VIA_FIR=m | ||
819 | CONFIG_MCS_FIR=m | ||
820 | CONFIG_BT=m | ||
821 | CONFIG_BT_L2CAP=m | ||
822 | CONFIG_BT_SCO=m | ||
823 | CONFIG_BT_RFCOMM=m | ||
824 | CONFIG_BT_RFCOMM_TTY=y | ||
825 | CONFIG_BT_BNEP=m | ||
826 | CONFIG_BT_BNEP_MC_FILTER=y | ||
827 | CONFIG_BT_BNEP_PROTO_FILTER=y | ||
828 | CONFIG_BT_HIDP=m | ||
829 | |||
830 | # | ||
831 | # Bluetooth device drivers | ||
832 | # | ||
833 | CONFIG_BT_HCIUSB=m | ||
834 | CONFIG_BT_HCIUSB_SCO=y | ||
835 | CONFIG_BT_HCIUART=m | ||
836 | CONFIG_BT_HCIUART_H4=y | ||
837 | CONFIG_BT_HCIUART_BCSP=y | ||
838 | CONFIG_BT_HCIUART_LL=y | ||
839 | CONFIG_BT_HCIBCM203X=m | ||
840 | CONFIG_BT_HCIBPA10X=m | ||
841 | CONFIG_BT_HCIBFUSB=m | ||
842 | CONFIG_BT_HCIDTL1=m | ||
843 | CONFIG_BT_HCIBT3C=m | ||
844 | CONFIG_BT_HCIBLUECARD=m | ||
845 | CONFIG_BT_HCIBTUART=m | ||
846 | CONFIG_BT_HCIVHCI=m | ||
847 | # CONFIG_AF_RXRPC is not set | ||
848 | CONFIG_FIB_RULES=y | ||
849 | |||
850 | # | ||
851 | # Wireless | ||
852 | # | ||
853 | CONFIG_CFG80211=m | ||
854 | CONFIG_NL80211=y | ||
855 | CONFIG_WIRELESS_EXT=y | ||
856 | CONFIG_WIRELESS_EXT_SYSFS=y | ||
857 | CONFIG_MAC80211=m | ||
858 | CONFIG_MAC80211_QOS=y | ||
859 | |||
860 | # | ||
861 | # Rate control algorithm selection | ||
862 | # | ||
863 | CONFIG_MAC80211_RC_PID=y | ||
864 | CONFIG_MAC80211_RC_DEFAULT_PID=y | ||
865 | CONFIG_MAC80211_RC_DEFAULT="pid" | ||
866 | CONFIG_MAC80211_MESH=y | ||
867 | CONFIG_MAC80211_LEDS=y | ||
868 | CONFIG_MAC80211_DEBUGFS=y | ||
869 | # CONFIG_MAC80211_DEBUG_MENU is not set | ||
870 | CONFIG_IEEE80211=m | ||
871 | CONFIG_IEEE80211_DEBUG=y | ||
872 | CONFIG_IEEE80211_CRYPT_WEP=m | ||
873 | CONFIG_IEEE80211_CRYPT_CCMP=m | ||
874 | CONFIG_IEEE80211_CRYPT_TKIP=m | ||
875 | # CONFIG_RFKILL is not set | ||
876 | CONFIG_NET_9P=m | ||
877 | CONFIG_NET_9P_VIRTIO=m | ||
878 | # CONFIG_NET_9P_DEBUG is not set | ||
879 | |||
880 | # | ||
881 | # Device Drivers | ||
882 | # | ||
883 | |||
884 | # | ||
885 | # Generic Driver Options | ||
886 | # | ||
887 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | ||
888 | CONFIG_STANDALONE=y | ||
889 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
890 | CONFIG_FW_LOADER=y | ||
891 | # CONFIG_FIRMWARE_IN_KERNEL is not set | ||
892 | CONFIG_EXTRA_FIRMWARE="" | ||
893 | # CONFIG_DEBUG_DRIVER is not set | ||
894 | CONFIG_DEBUG_DEVRES=y | ||
895 | # CONFIG_SYS_HYPERVISOR is not set | ||
896 | CONFIG_CONNECTOR=y | ||
897 | CONFIG_PROC_EVENTS=y | ||
898 | # CONFIG_MTD is not set | ||
899 | CONFIG_OF_DEVICE=y | ||
900 | CONFIG_OF_GPIO=y | ||
901 | CONFIG_OF_I2C=y | ||
902 | CONFIG_PARPORT=m | ||
903 | CONFIG_PARPORT_PC=m | ||
904 | CONFIG_PARPORT_SERIAL=m | ||
905 | # CONFIG_PARPORT_PC_FIFO is not set | ||
906 | # CONFIG_PARPORT_PC_SUPERIO is not set | ||
907 | # CONFIG_PARPORT_PC_PCMCIA is not set | ||
908 | # CONFIG_PARPORT_GSC is not set | ||
909 | # CONFIG_PARPORT_AX88796 is not set | ||
910 | CONFIG_PARPORT_1284=y | ||
911 | CONFIG_PARPORT_NOT_PC=y | ||
912 | CONFIG_PNP=y | ||
913 | # CONFIG_PNP_DEBUG is not set | ||
914 | |||
915 | # | ||
916 | # Protocols | ||
917 | # | ||
918 | CONFIG_ISAPNP=y | ||
919 | # CONFIG_PNPACPI is not set | ||
920 | CONFIG_BLK_DEV=y | ||
921 | # CONFIG_BLK_DEV_FD is not set | ||
922 | CONFIG_MAC_FLOPPY=m | ||
923 | # CONFIG_BLK_DEV_XD is not set | ||
924 | # CONFIG_PARIDE is not set | ||
925 | # CONFIG_BLK_CPQ_DA is not set | ||
926 | # CONFIG_BLK_CPQ_CISS_DA is not set | ||
927 | # CONFIG_BLK_DEV_DAC960 is not set | ||
928 | # CONFIG_BLK_DEV_UMEM is not set | ||
929 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
930 | CONFIG_BLK_DEV_LOOP=m | ||
931 | CONFIG_BLK_DEV_CRYPTOLOOP=m | ||
932 | CONFIG_BLK_DEV_NBD=m | ||
933 | # CONFIG_BLK_DEV_SX8 is not set | ||
934 | # CONFIG_BLK_DEV_UB is not set | ||
935 | CONFIG_BLK_DEV_RAM=y | ||
936 | CONFIG_BLK_DEV_RAM_COUNT=16 | ||
937 | CONFIG_BLK_DEV_RAM_SIZE=16384 | ||
938 | # CONFIG_BLK_DEV_XIP is not set | ||
939 | CONFIG_CDROM_PKTCDVD=m | ||
940 | CONFIG_CDROM_PKTCDVD_BUFFERS=8 | ||
941 | # CONFIG_CDROM_PKTCDVD_WCACHE is not set | ||
942 | # CONFIG_ATA_OVER_ETH is not set | ||
943 | CONFIG_VIRTIO_BLK=m | ||
944 | CONFIG_MISC_DEVICES=y | ||
945 | # CONFIG_PHANTOM is not set | ||
946 | CONFIG_EEPROM_93CX6=m | ||
947 | # CONFIG_SGI_IOC4 is not set | ||
948 | # CONFIG_TIFM_CORE is not set | ||
949 | CONFIG_ENCLOSURE_SERVICES=m | ||
950 | CONFIG_HAVE_IDE=y | ||
951 | CONFIG_IDE=y | ||
952 | CONFIG_BLK_DEV_IDE=y | ||
953 | |||
954 | # | ||
955 | # Please see Documentation/ide/ide.txt for help/info on IDE drives | ||
956 | # | ||
957 | CONFIG_IDE_ATAPI=y | ||
958 | # CONFIG_BLK_DEV_IDE_SATA is not set | ||
959 | CONFIG_BLK_DEV_IDEDISK=y | ||
960 | CONFIG_IDEDISK_MULTI_MODE=y | ||
961 | # CONFIG_BLK_DEV_IDECS is not set | ||
962 | # CONFIG_BLK_DEV_DELKIN is not set | ||
963 | CONFIG_BLK_DEV_IDECD=m | ||
964 | CONFIG_BLK_DEV_IDECD_VERBOSE_ERRORS=y | ||
965 | # CONFIG_BLK_DEV_IDETAPE is not set | ||
966 | CONFIG_BLK_DEV_IDEFLOPPY=m | ||
967 | # CONFIG_BLK_DEV_IDESCSI is not set | ||
968 | CONFIG_IDE_TASK_IOCTL=y | ||
969 | CONFIG_IDE_PROC_FS=y | ||
970 | |||
971 | # | ||
972 | # IDE chipset support/bugfixes | ||
973 | # | ||
974 | # CONFIG_IDE_GENERIC is not set | ||
975 | # CONFIG_BLK_DEV_PLATFORM is not set | ||
976 | # CONFIG_BLK_DEV_IDEPNP is not set | ||
977 | CONFIG_BLK_DEV_IDEDMA_SFF=y | ||
978 | |||
979 | # | ||
980 | # PCI IDE chipsets support | ||
981 | # | ||
982 | CONFIG_BLK_DEV_IDEPCI=y | ||
983 | # CONFIG_IDEPCI_PCIBUS_ORDER is not set | ||
984 | # CONFIG_BLK_DEV_OFFBOARD is not set | ||
985 | CONFIG_BLK_DEV_GENERIC=y | ||
986 | # CONFIG_BLK_DEV_OPTI621 is not set | ||
987 | CONFIG_BLK_DEV_IDEDMA_PCI=y | ||
988 | # CONFIG_BLK_DEV_AEC62XX is not set | ||
989 | # CONFIG_BLK_DEV_ALI15X3 is not set | ||
990 | # CONFIG_BLK_DEV_AMD74XX is not set | ||
991 | # CONFIG_BLK_DEV_CMD64X is not set | ||
992 | # CONFIG_BLK_DEV_TRIFLEX is not set | ||
993 | # CONFIG_BLK_DEV_CY82C693 is not set | ||
994 | # CONFIG_BLK_DEV_CS5520 is not set | ||
995 | # CONFIG_BLK_DEV_CS5530 is not set | ||
996 | # CONFIG_BLK_DEV_HPT34X is not set | ||
997 | # CONFIG_BLK_DEV_HPT366 is not set | ||
998 | # CONFIG_BLK_DEV_JMICRON is not set | ||
999 | # CONFIG_BLK_DEV_SC1200 is not set | ||
1000 | # CONFIG_BLK_DEV_PIIX is not set | ||
1001 | # CONFIG_BLK_DEV_IT8213 is not set | ||
1002 | # CONFIG_BLK_DEV_IT821X is not set | ||
1003 | # CONFIG_BLK_DEV_NS87415 is not set | ||
1004 | # CONFIG_BLK_DEV_PDC202XX_OLD is not set | ||
1005 | # CONFIG_BLK_DEV_PDC202XX_NEW is not set | ||
1006 | # CONFIG_BLK_DEV_SVWKS is not set | ||
1007 | # CONFIG_BLK_DEV_SIIMAGE is not set | ||
1008 | # CONFIG_BLK_DEV_SL82C105 is not set | ||
1009 | # CONFIG_BLK_DEV_SLC90E66 is not set | ||
1010 | # CONFIG_BLK_DEV_TRM290 is not set | ||
1011 | # CONFIG_BLK_DEV_VIA82CXXX is not set | ||
1012 | # CONFIG_BLK_DEV_TC86C001 is not set | ||
1013 | CONFIG_BLK_DEV_IDE_PMAC=y | ||
1014 | CONFIG_BLK_DEV_IDE_PMAC_ATA100FIRST=y | ||
1015 | CONFIG_BLK_DEV_IDEDMA_PMAC=y | ||
1016 | CONFIG_BLK_DEV_IDEDMA=y | ||
1017 | CONFIG_BLK_DEV_HD_ONLY=y | ||
1018 | CONFIG_BLK_DEV_HD=y | ||
1019 | |||
1020 | # | ||
1021 | # SCSI device support | ||
1022 | # | ||
1023 | CONFIG_RAID_ATTRS=m | ||
1024 | CONFIG_SCSI=y | ||
1025 | CONFIG_SCSI_DMA=y | ||
1026 | CONFIG_SCSI_TGT=m | ||
1027 | # CONFIG_SCSI_NETLINK is not set | ||
1028 | CONFIG_SCSI_PROC_FS=y | ||
1029 | |||
1030 | # | ||
1031 | # SCSI support type (disk, tape, CD-ROM) | ||
1032 | # | ||
1033 | CONFIG_BLK_DEV_SD=y | ||
1034 | CONFIG_CHR_DEV_ST=m | ||
1035 | CONFIG_CHR_DEV_OSST=m | ||
1036 | CONFIG_BLK_DEV_SR=m | ||
1037 | CONFIG_BLK_DEV_SR_VENDOR=y | ||
1038 | CONFIG_CHR_DEV_SG=y | ||
1039 | CONFIG_CHR_DEV_SCH=m | ||
1040 | CONFIG_SCSI_ENCLOSURE=m | ||
1041 | |||
1042 | # | ||
1043 | # Some SCSI devices (e.g. CD jukebox) support multiple LUNs | ||
1044 | # | ||
1045 | CONFIG_SCSI_MULTI_LUN=y | ||
1046 | CONFIG_SCSI_CONSTANTS=y | ||
1047 | CONFIG_SCSI_LOGGING=y | ||
1048 | CONFIG_SCSI_SCAN_ASYNC=y | ||
1049 | CONFIG_SCSI_WAIT_SCAN=m | ||
1050 | |||
1051 | # | ||
1052 | # SCSI Transports | ||
1053 | # | ||
1054 | CONFIG_SCSI_SPI_ATTRS=m | ||
1055 | # CONFIG_SCSI_FC_ATTRS is not set | ||
1056 | # CONFIG_SCSI_ISCSI_ATTRS is not set | ||
1057 | # CONFIG_SCSI_SAS_ATTRS is not set | ||
1058 | # CONFIG_SCSI_SAS_LIBSAS is not set | ||
1059 | CONFIG_SCSI_SRP_ATTRS=m | ||
1060 | CONFIG_SCSI_SRP_TGT_ATTRS=y | ||
1061 | CONFIG_SCSI_LOWLEVEL=y | ||
1062 | # CONFIG_ISCSI_TCP is not set | ||
1063 | # CONFIG_BLK_DEV_3W_XXXX_RAID is not set | ||
1064 | # CONFIG_SCSI_3W_9XXX is not set | ||
1065 | # CONFIG_SCSI_7000FASST is not set | ||
1066 | # CONFIG_SCSI_ACARD is not set | ||
1067 | # CONFIG_SCSI_AHA152X is not set | ||
1068 | # CONFIG_SCSI_AHA1542 is not set | ||
1069 | # CONFIG_SCSI_AACRAID is not set | ||
1070 | # CONFIG_SCSI_AIC7XXX is not set | ||
1071 | # CONFIG_SCSI_AIC7XXX_OLD is not set | ||
1072 | # CONFIG_SCSI_AIC79XX is not set | ||
1073 | # CONFIG_SCSI_AIC94XX is not set | ||
1074 | # CONFIG_SCSI_DPT_I2O is not set | ||
1075 | # CONFIG_SCSI_ADVANSYS is not set | ||
1076 | # CONFIG_SCSI_IN2000 is not set | ||
1077 | # CONFIG_SCSI_ARCMSR is not set | ||
1078 | # CONFIG_MEGARAID_NEWGEN is not set | ||
1079 | # CONFIG_MEGARAID_LEGACY is not set | ||
1080 | # CONFIG_MEGARAID_SAS is not set | ||
1081 | # CONFIG_SCSI_HPTIOP is not set | ||
1082 | # CONFIG_SCSI_BUSLOGIC is not set | ||
1083 | # CONFIG_SCSI_DMX3191D is not set | ||
1084 | # CONFIG_SCSI_DTC3280 is not set | ||
1085 | # CONFIG_SCSI_EATA is not set | ||
1086 | # CONFIG_SCSI_FUTURE_DOMAIN is not set | ||
1087 | # CONFIG_SCSI_GDTH is not set | ||
1088 | # CONFIG_SCSI_GENERIC_NCR5380 is not set | ||
1089 | # CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set | ||
1090 | # CONFIG_SCSI_IPS is not set | ||
1091 | # CONFIG_SCSI_INITIO is not set | ||
1092 | # CONFIG_SCSI_INIA100 is not set | ||
1093 | # CONFIG_SCSI_PPA is not set | ||
1094 | # CONFIG_SCSI_IMM is not set | ||
1095 | # CONFIG_SCSI_MVSAS is not set | ||
1096 | # CONFIG_SCSI_NCR53C406A is not set | ||
1097 | # CONFIG_SCSI_STEX is not set | ||
1098 | # CONFIG_SCSI_SYM53C8XX_2 is not set | ||
1099 | # CONFIG_SCSI_IPR is not set | ||
1100 | # CONFIG_SCSI_PAS16 is not set | ||
1101 | # CONFIG_SCSI_QLOGIC_FAS is not set | ||
1102 | # CONFIG_SCSI_QLOGIC_1280 is not set | ||
1103 | # CONFIG_SCSI_QLA_FC is not set | ||
1104 | # CONFIG_SCSI_QLA_ISCSI is not set | ||
1105 | # CONFIG_SCSI_LPFC is not set | ||
1106 | # CONFIG_SCSI_SYM53C416 is not set | ||
1107 | # CONFIG_SCSI_DC395x is not set | ||
1108 | # CONFIG_SCSI_DC390T is not set | ||
1109 | # CONFIG_SCSI_T128 is not set | ||
1110 | # CONFIG_SCSI_U14_34F is not set | ||
1111 | # CONFIG_SCSI_NSP32 is not set | ||
1112 | # CONFIG_SCSI_DEBUG is not set | ||
1113 | CONFIG_SCSI_MESH=m | ||
1114 | CONFIG_SCSI_MESH_SYNC_RATE=5 | ||
1115 | CONFIG_SCSI_MESH_RESET_DELAY_MS=4000 | ||
1116 | CONFIG_SCSI_MAC53C94=m | ||
1117 | CONFIG_SCSI_SRP=m | ||
1118 | CONFIG_SCSI_LOWLEVEL_PCMCIA=y | ||
1119 | # CONFIG_PCMCIA_AHA152X is not set | ||
1120 | # CONFIG_PCMCIA_FDOMAIN is not set | ||
1121 | # CONFIG_PCMCIA_NINJA_SCSI is not set | ||
1122 | # CONFIG_PCMCIA_QLOGIC is not set | ||
1123 | # CONFIG_PCMCIA_SYM53C500 is not set | ||
1124 | CONFIG_SCSI_DH=y | ||
1125 | CONFIG_SCSI_DH_RDAC=m | ||
1126 | CONFIG_SCSI_DH_HP_SW=m | ||
1127 | CONFIG_SCSI_DH_EMC=m | ||
1128 | CONFIG_ATA=y | ||
1129 | # CONFIG_ATA_NONSTANDARD is not set | ||
1130 | # CONFIG_SATA_PMP is not set | ||
1131 | # CONFIG_SATA_AHCI is not set | ||
1132 | # CONFIG_SATA_SIL24 is not set | ||
1133 | CONFIG_SATA_FSL=m | ||
1134 | CONFIG_ATA_SFF=y | ||
1135 | # CONFIG_SATA_SVW is not set | ||
1136 | CONFIG_ATA_PIIX=m | ||
1137 | # CONFIG_SATA_MV is not set | ||
1138 | # CONFIG_SATA_NV is not set | ||
1139 | CONFIG_PDC_ADMA=m | ||
1140 | # CONFIG_SATA_QSTOR is not set | ||
1141 | # CONFIG_SATA_PROMISE is not set | ||
1142 | # CONFIG_SATA_SX4 is not set | ||
1143 | # CONFIG_SATA_SIL is not set | ||
1144 | # CONFIG_SATA_SIS is not set | ||
1145 | # CONFIG_SATA_ULI is not set | ||
1146 | # CONFIG_SATA_VIA is not set | ||
1147 | # CONFIG_SATA_VITESSE is not set | ||
1148 | # CONFIG_SATA_INIC162X is not set | ||
1149 | # CONFIG_PATA_ALI is not set | ||
1150 | # CONFIG_PATA_AMD is not set | ||
1151 | # CONFIG_PATA_ARTOP is not set | ||
1152 | # CONFIG_PATA_ATIIXP is not set | ||
1153 | # CONFIG_PATA_CMD640_PCI is not set | ||
1154 | # CONFIG_PATA_CMD64X is not set | ||
1155 | # CONFIG_PATA_CS5520 is not set | ||
1156 | # CONFIG_PATA_CS5530 is not set | ||
1157 | # CONFIG_PATA_CYPRESS is not set | ||
1158 | # CONFIG_PATA_EFAR is not set | ||
1159 | CONFIG_ATA_GENERIC=m | ||
1160 | # CONFIG_PATA_HPT366 is not set | ||
1161 | # CONFIG_PATA_HPT37X is not set | ||
1162 | # CONFIG_PATA_HPT3X2N is not set | ||
1163 | # CONFIG_PATA_HPT3X3 is not set | ||
1164 | # CONFIG_PATA_ISAPNP is not set | ||
1165 | # CONFIG_PATA_IT821X is not set | ||
1166 | # CONFIG_PATA_IT8213 is not set | ||
1167 | # CONFIG_PATA_JMICRON is not set | ||
1168 | # CONFIG_PATA_LEGACY is not set | ||
1169 | # CONFIG_PATA_TRIFLEX is not set | ||
1170 | # CONFIG_PATA_MARVELL is not set | ||
1171 | CONFIG_PATA_MPC52xx=m | ||
1172 | # CONFIG_PATA_MPIIX is not set | ||
1173 | # CONFIG_PATA_OLDPIIX is not set | ||
1174 | # CONFIG_PATA_NETCELL is not set | ||
1175 | # CONFIG_PATA_NINJA32 is not set | ||
1176 | # CONFIG_PATA_NS87410 is not set | ||
1177 | # CONFIG_PATA_NS87415 is not set | ||
1178 | # CONFIG_PATA_OPTI is not set | ||
1179 | CONFIG_PATA_OPTIDMA=m | ||
1180 | # CONFIG_PATA_PCMCIA is not set | ||
1181 | # CONFIG_PATA_PDC_OLD is not set | ||
1182 | # CONFIG_PATA_QDI is not set | ||
1183 | # CONFIG_PATA_RADISYS is not set | ||
1184 | # CONFIG_PATA_RZ1000 is not set | ||
1185 | # CONFIG_PATA_SC1200 is not set | ||
1186 | # CONFIG_PATA_SERVERWORKS is not set | ||
1187 | # CONFIG_PATA_PDC2027X is not set | ||
1188 | # CONFIG_PATA_SIL680 is not set | ||
1189 | # CONFIG_PATA_SIS is not set | ||
1190 | CONFIG_PATA_VIA=m | ||
1191 | # CONFIG_PATA_WINBOND is not set | ||
1192 | # CONFIG_PATA_WINBOND_VLB is not set | ||
1193 | CONFIG_PATA_PLATFORM=m | ||
1194 | CONFIG_PATA_OF_PLATFORM=m | ||
1195 | CONFIG_PATA_SCH=m | ||
1196 | CONFIG_MD=y | ||
1197 | CONFIG_BLK_DEV_MD=y | ||
1198 | CONFIG_MD_LINEAR=m | ||
1199 | CONFIG_MD_RAID0=m | ||
1200 | CONFIG_MD_RAID1=m | ||
1201 | CONFIG_MD_RAID10=m | ||
1202 | CONFIG_MD_RAID456=m | ||
1203 | CONFIG_MD_RAID5_RESHAPE=y | ||
1204 | CONFIG_MD_MULTIPATH=m | ||
1205 | CONFIG_MD_FAULTY=m | ||
1206 | CONFIG_BLK_DEV_DM=m | ||
1207 | CONFIG_DM_DEBUG=y | ||
1208 | CONFIG_DM_CRYPT=m | ||
1209 | CONFIG_DM_SNAPSHOT=m | ||
1210 | CONFIG_DM_MIRROR=m | ||
1211 | CONFIG_DM_ZERO=m | ||
1212 | CONFIG_DM_MULTIPATH=m | ||
1213 | # CONFIG_DM_DELAY is not set | ||
1214 | CONFIG_DM_UEVENT=y | ||
1215 | # CONFIG_FUSION is not set | ||
1216 | |||
1217 | # | ||
1218 | # IEEE 1394 (FireWire) support | ||
1219 | # | ||
1220 | |||
1221 | # | ||
1222 | # Enable only one of the two stacks, unless you know what you are doing | ||
1223 | # | ||
1224 | CONFIG_FIREWIRE=m | ||
1225 | CONFIG_FIREWIRE_OHCI=m | ||
1226 | CONFIG_FIREWIRE_OHCI_DEBUG=y | ||
1227 | CONFIG_FIREWIRE_SBP2=m | ||
1228 | # CONFIG_IEEE1394 is not set | ||
1229 | # CONFIG_I2O is not set | ||
1230 | CONFIG_MACINTOSH_DRIVERS=y | ||
1231 | CONFIG_ADB=y | ||
1232 | CONFIG_ADB_CUDA=y | ||
1233 | CONFIG_ADB_PMU=y | ||
1234 | CONFIG_ADB_PMU_LED=y | ||
1235 | CONFIG_ADB_PMU_LED_IDE=y | ||
1236 | CONFIG_PMAC_APM_EMU=y | ||
1237 | CONFIG_PMAC_MEDIABAY=y | ||
1238 | CONFIG_PMAC_BACKLIGHT=y | ||
1239 | # CONFIG_PMAC_BACKLIGHT_LEGACY is not set | ||
1240 | CONFIG_ADB_MACIO=y | ||
1241 | CONFIG_INPUT_ADBHID=y | ||
1242 | CONFIG_MAC_EMUMOUSEBTN=y | ||
1243 | CONFIG_THERM_WINDTUNNEL=m | ||
1244 | CONFIG_THERM_ADT746X=m | ||
1245 | CONFIG_WINDFARM=y | ||
1246 | # CONFIG_ANSLCD is not set | ||
1247 | CONFIG_PMAC_RACKMETER=m | ||
1248 | CONFIG_NETDEVICES=y | ||
1249 | CONFIG_NETDEVICES_MULTIQUEUE=y | ||
1250 | CONFIG_IFB=m | ||
1251 | CONFIG_DUMMY=m | ||
1252 | CONFIG_BONDING=m | ||
1253 | CONFIG_MACVLAN=m | ||
1254 | CONFIG_EQUALIZER=m | ||
1255 | CONFIG_TUN=m | ||
1256 | CONFIG_VETH=m | ||
1257 | CONFIG_NET_SB1000=m | ||
1258 | # CONFIG_ARCNET is not set | ||
1259 | CONFIG_PHYLIB=m | ||
1260 | |||
1261 | # | ||
1262 | # MII PHY device drivers | ||
1263 | # | ||
1264 | CONFIG_MARVELL_PHY=m | ||
1265 | CONFIG_DAVICOM_PHY=m | ||
1266 | CONFIG_QSEMI_PHY=m | ||
1267 | CONFIG_LXT_PHY=m | ||
1268 | CONFIG_CICADA_PHY=m | ||
1269 | CONFIG_VITESSE_PHY=m | ||
1270 | CONFIG_SMSC_PHY=m | ||
1271 | CONFIG_BROADCOM_PHY=m | ||
1272 | CONFIG_ICPLUS_PHY=m | ||
1273 | CONFIG_REALTEK_PHY=m | ||
1274 | CONFIG_MDIO_BITBANG=y | ||
1275 | CONFIG_NET_ETHERNET=y | ||
1276 | CONFIG_MII=m | ||
1277 | CONFIG_MACE=m | ||
1278 | # CONFIG_MACE_AAUI_PORT is not set | ||
1279 | CONFIG_BMAC=m | ||
1280 | CONFIG_HAPPYMEAL=m | ||
1281 | CONFIG_SUNGEM=m | ||
1282 | CONFIG_CASSINI=m | ||
1283 | CONFIG_NET_VENDOR_3COM=y | ||
1284 | # CONFIG_EL1 is not set | ||
1285 | # CONFIG_EL2 is not set | ||
1286 | # CONFIG_ELPLUS is not set | ||
1287 | # CONFIG_EL16 is not set | ||
1288 | CONFIG_EL3=m | ||
1289 | # CONFIG_3C515 is not set | ||
1290 | CONFIG_VORTEX=m | ||
1291 | CONFIG_TYPHOON=m | ||
1292 | # CONFIG_LANCE is not set | ||
1293 | CONFIG_NET_VENDOR_SMC=y | ||
1294 | # CONFIG_WD80x3 is not set | ||
1295 | CONFIG_ULTRA=m | ||
1296 | # CONFIG_SMC9194 is not set | ||
1297 | # CONFIG_NET_VENDOR_RACAL is not set | ||
1298 | CONFIG_NET_TULIP=y | ||
1299 | CONFIG_DE2104X=m | ||
1300 | CONFIG_TULIP=m | ||
1301 | # CONFIG_TULIP_MWI is not set | ||
1302 | CONFIG_TULIP_MMIO=y | ||
1303 | # CONFIG_TULIP_NAPI is not set | ||
1304 | CONFIG_DE4X5=m | ||
1305 | CONFIG_WINBOND_840=m | ||
1306 | CONFIG_DM9102=m | ||
1307 | CONFIG_ULI526X=m | ||
1308 | CONFIG_PCMCIA_XIRCOM=m | ||
1309 | # CONFIG_AT1700 is not set | ||
1310 | # CONFIG_DEPCA is not set | ||
1311 | # CONFIG_HP100 is not set | ||
1312 | CONFIG_NET_ISA=y | ||
1313 | # CONFIG_E2100 is not set | ||
1314 | CONFIG_EWRK3=m | ||
1315 | # CONFIG_EEXPRESS is not set | ||
1316 | # CONFIG_EEXPRESS_PRO is not set | ||
1317 | # CONFIG_HPLAN_PLUS is not set | ||
1318 | # CONFIG_HPLAN is not set | ||
1319 | # CONFIG_LP486E is not set | ||
1320 | # CONFIG_ETH16I is not set | ||
1321 | CONFIG_NE2000=m | ||
1322 | # CONFIG_ZNET is not set | ||
1323 | # CONFIG_SEEQ8005 is not set | ||
1324 | # CONFIG_IBM_NEW_EMAC_ZMII is not set | ||
1325 | # CONFIG_IBM_NEW_EMAC_RGMII is not set | ||
1326 | # CONFIG_IBM_NEW_EMAC_TAH is not set | ||
1327 | # CONFIG_IBM_NEW_EMAC_EMAC4 is not set | ||
1328 | CONFIG_NET_PCI=y | ||
1329 | CONFIG_PCNET32=m | ||
1330 | CONFIG_AMD8111_ETH=m | ||
1331 | CONFIG_AMD8111E_NAPI=y | ||
1332 | CONFIG_ADAPTEC_STARFIRE=m | ||
1333 | CONFIG_ADAPTEC_STARFIRE_NAPI=y | ||
1334 | # CONFIG_AC3200 is not set | ||
1335 | # CONFIG_APRICOT is not set | ||
1336 | CONFIG_B44=m | ||
1337 | CONFIG_B44_PCI_AUTOSELECT=y | ||
1338 | CONFIG_B44_PCICORE_AUTOSELECT=y | ||
1339 | CONFIG_B44_PCI=y | ||
1340 | CONFIG_FORCEDETH=m | ||
1341 | CONFIG_FORCEDETH_NAPI=y | ||
1342 | # CONFIG_CS89x0 is not set | ||
1343 | # CONFIG_EEPRO100 is not set | ||
1344 | CONFIG_E100=m | ||
1345 | CONFIG_FEALNX=m | ||
1346 | CONFIG_NATSEMI=m | ||
1347 | CONFIG_NE2K_PCI=m | ||
1348 | CONFIG_8139CP=m | ||
1349 | CONFIG_8139TOO=m | ||
1350 | # CONFIG_8139TOO_PIO is not set | ||
1351 | # CONFIG_8139TOO_TUNE_TWISTER is not set | ||
1352 | CONFIG_8139TOO_8129=y | ||
1353 | # CONFIG_8139_OLD_RX_RESET is not set | ||
1354 | CONFIG_R6040=m | ||
1355 | CONFIG_SIS900=m | ||
1356 | CONFIG_EPIC100=m | ||
1357 | CONFIG_SUNDANCE=m | ||
1358 | # CONFIG_SUNDANCE_MMIO is not set | ||
1359 | CONFIG_TLAN=m | ||
1360 | CONFIG_VIA_RHINE=m | ||
1361 | CONFIG_VIA_RHINE_MMIO=y | ||
1362 | CONFIG_VIA_RHINE_NAPI=y | ||
1363 | CONFIG_SC92031=m | ||
1364 | CONFIG_NET_POCKET=y | ||
1365 | CONFIG_DE600=m | ||
1366 | CONFIG_DE620=m | ||
1367 | CONFIG_FEC_MPC52xx=m | ||
1368 | CONFIG_FEC_MPC52xx_MDIO=y | ||
1369 | # CONFIG_FS_ENET is not set | ||
1370 | CONFIG_NETDEV_1000=y | ||
1371 | CONFIG_ACENIC=m | ||
1372 | # CONFIG_ACENIC_OMIT_TIGON_I is not set | ||
1373 | CONFIG_DL2K=m | ||
1374 | CONFIG_E1000=m | ||
1375 | CONFIG_E1000_NAPI=y | ||
1376 | # CONFIG_E1000_DISABLE_PACKET_SPLIT is not set | ||
1377 | CONFIG_E1000E=m | ||
1378 | CONFIG_E1000E_ENABLED=y | ||
1379 | CONFIG_IP1000=m | ||
1380 | CONFIG_IGB=m | ||
1381 | CONFIG_NS83820=m | ||
1382 | CONFIG_HAMACHI=m | ||
1383 | CONFIG_YELLOWFIN=m | ||
1384 | CONFIG_R8169=m | ||
1385 | CONFIG_R8169_NAPI=y | ||
1386 | CONFIG_R8169_VLAN=y | ||
1387 | CONFIG_SIS190=m | ||
1388 | CONFIG_SKGE=m | ||
1389 | # CONFIG_SKGE_DEBUG is not set | ||
1390 | CONFIG_SKY2=m | ||
1391 | # CONFIG_SKY2_DEBUG is not set | ||
1392 | CONFIG_VIA_VELOCITY=m | ||
1393 | CONFIG_TIGON3=m | ||
1394 | CONFIG_BNX2=m | ||
1395 | CONFIG_GIANFAR=m | ||
1396 | CONFIG_GFAR_NAPI=y | ||
1397 | # CONFIG_UCC_GETH is not set | ||
1398 | CONFIG_MV643XX_ETH=m | ||
1399 | CONFIG_QLA3XXX=m | ||
1400 | CONFIG_ATL1=m | ||
1401 | CONFIG_NETDEV_10000=y | ||
1402 | CONFIG_CHELSIO_T1=m | ||
1403 | CONFIG_CHELSIO_T1_1G=y | ||
1404 | CONFIG_CHELSIO_T1_NAPI=y | ||
1405 | CONFIG_CHELSIO_T3=m | ||
1406 | CONFIG_IXGBE=m | ||
1407 | CONFIG_IXGB=m | ||
1408 | CONFIG_IXGB_NAPI=y | ||
1409 | CONFIG_S2IO=m | ||
1410 | CONFIG_S2IO_NAPI=y | ||
1411 | CONFIG_MYRI10GE=m | ||
1412 | CONFIG_NETXEN_NIC=m | ||
1413 | CONFIG_NIU=m | ||
1414 | # CONFIG_MLX4_CORE is not set | ||
1415 | CONFIG_TEHUTI=m | ||
1416 | CONFIG_BNX2X=m | ||
1417 | CONFIG_SFC=m | ||
1418 | # CONFIG_TR is not set | ||
1419 | |||
1420 | # | ||
1421 | # Wireless LAN | ||
1422 | # | ||
1423 | # CONFIG_WLAN_PRE80211 is not set | ||
1424 | # CONFIG_WLAN_80211 is not set | ||
1425 | # CONFIG_IWLWIFI_LEDS is not set | ||
1426 | |||
1427 | # | ||
1428 | # USB Network Adapters | ||
1429 | # | ||
1430 | CONFIG_USB_CATC=m | ||
1431 | CONFIG_USB_KAWETH=m | ||
1432 | CONFIG_USB_PEGASUS=m | ||
1433 | CONFIG_USB_RTL8150=m | ||
1434 | CONFIG_USB_USBNET=m | ||
1435 | CONFIG_USB_NET_AX8817X=m | ||
1436 | CONFIG_USB_NET_CDCETHER=m | ||
1437 | CONFIG_USB_NET_DM9601=m | ||
1438 | CONFIG_USB_NET_GL620A=m | ||
1439 | CONFIG_USB_NET_NET1080=m | ||
1440 | CONFIG_USB_NET_PLUSB=m | ||
1441 | CONFIG_USB_NET_MCS7830=m | ||
1442 | CONFIG_USB_NET_RNDIS_HOST=m | ||
1443 | CONFIG_USB_NET_CDC_SUBSET=m | ||
1444 | CONFIG_USB_ALI_M5632=y | ||
1445 | CONFIG_USB_AN2720=y | ||
1446 | CONFIG_USB_BELKIN=y | ||
1447 | CONFIG_USB_ARMLINUX=y | ||
1448 | CONFIG_USB_EPSON2888=y | ||
1449 | CONFIG_USB_KC2190=y | ||
1450 | CONFIG_USB_NET_ZAURUS=m | ||
1451 | CONFIG_NET_PCMCIA=y | ||
1452 | CONFIG_PCMCIA_3C589=m | ||
1453 | CONFIG_PCMCIA_3C574=m | ||
1454 | CONFIG_PCMCIA_FMVJ18X=m | ||
1455 | CONFIG_PCMCIA_PCNET=m | ||
1456 | CONFIG_PCMCIA_NMCLAN=m | ||
1457 | CONFIG_PCMCIA_SMC91C92=m | ||
1458 | CONFIG_PCMCIA_XIRC2PS=m | ||
1459 | CONFIG_PCMCIA_AXNET=m | ||
1460 | # CONFIG_WAN is not set | ||
1461 | CONFIG_ATM_DRIVERS=y | ||
1462 | # CONFIG_ATM_DUMMY is not set | ||
1463 | CONFIG_ATM_TCP=m | ||
1464 | CONFIG_ATM_LANAI=m | ||
1465 | CONFIG_ATM_ENI=m | ||
1466 | # CONFIG_ATM_ENI_DEBUG is not set | ||
1467 | # CONFIG_ATM_ENI_TUNE_BURST is not set | ||
1468 | # CONFIG_ATM_FIRESTREAM is not set | ||
1469 | # CONFIG_ATM_ZATM is not set | ||
1470 | CONFIG_ATM_NICSTAR=m | ||
1471 | # CONFIG_ATM_NICSTAR_USE_SUNI is not set | ||
1472 | # CONFIG_ATM_NICSTAR_USE_IDT77105 is not set | ||
1473 | CONFIG_ATM_IDT77252=m | ||
1474 | # CONFIG_ATM_IDT77252_DEBUG is not set | ||
1475 | # CONFIG_ATM_IDT77252_RCV_ALL is not set | ||
1476 | CONFIG_ATM_IDT77252_USE_SUNI=y | ||
1477 | # CONFIG_ATM_AMBASSADOR is not set | ||
1478 | # CONFIG_ATM_HORIZON is not set | ||
1479 | # CONFIG_ATM_IA is not set | ||
1480 | CONFIG_ATM_FORE200E_MAYBE=m | ||
1481 | # CONFIG_ATM_FORE200E_PCA is not set | ||
1482 | CONFIG_ATM_HE=m | ||
1483 | # CONFIG_ATM_HE_USE_SUNI is not set | ||
1484 | CONFIG_FDDI=y | ||
1485 | # CONFIG_DEFXX is not set | ||
1486 | CONFIG_SKFP=m | ||
1487 | # CONFIG_HIPPI is not set | ||
1488 | CONFIG_PLIP=m | ||
1489 | CONFIG_PPP=m | ||
1490 | CONFIG_PPP_MULTILINK=y | ||
1491 | CONFIG_PPP_FILTER=y | ||
1492 | CONFIG_PPP_ASYNC=m | ||
1493 | CONFIG_PPP_SYNC_TTY=m | ||
1494 | CONFIG_PPP_DEFLATE=m | ||
1495 | # CONFIG_PPP_BSDCOMP is not set | ||
1496 | CONFIG_PPP_MPPE=m | ||
1497 | CONFIG_PPPOE=m | ||
1498 | CONFIG_PPPOATM=m | ||
1499 | CONFIG_PPPOL2TP=m | ||
1500 | CONFIG_SLIP=m | ||
1501 | CONFIG_SLIP_COMPRESSED=y | ||
1502 | CONFIG_SLHC=m | ||
1503 | CONFIG_SLIP_SMART=y | ||
1504 | # CONFIG_SLIP_MODE_SLIP6 is not set | ||
1505 | CONFIG_NET_FC=y | ||
1506 | CONFIG_NETCONSOLE=m | ||
1507 | CONFIG_NETCONSOLE_DYNAMIC=y | ||
1508 | CONFIG_NETPOLL=y | ||
1509 | CONFIG_NETPOLL_TRAP=y | ||
1510 | CONFIG_NET_POLL_CONTROLLER=y | ||
1511 | CONFIG_VIRTIO_NET=m | ||
1512 | # CONFIG_ISDN is not set | ||
1513 | # CONFIG_PHONE is not set | ||
1514 | |||
1515 | # | ||
1516 | # Input device support | ||
1517 | # | ||
1518 | CONFIG_INPUT=y | ||
1519 | CONFIG_INPUT_FF_MEMLESS=y | ||
1520 | CONFIG_INPUT_POLLDEV=m | ||
1521 | |||
1522 | # | ||
1523 | # Userland interfaces | ||
1524 | # | ||
1525 | CONFIG_INPUT_MOUSEDEV=y | ||
1526 | # CONFIG_INPUT_MOUSEDEV_PSAUX is not set | ||
1527 | CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 | ||
1528 | CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 | ||
1529 | CONFIG_INPUT_JOYDEV=m | ||
1530 | CONFIG_INPUT_EVDEV=y | ||
1531 | # CONFIG_INPUT_EVBUG is not set | ||
1532 | |||
1533 | # | ||
1534 | # Input Device Drivers | ||
1535 | # | ||
1536 | CONFIG_INPUT_KEYBOARD=y | ||
1537 | CONFIG_KEYBOARD_ATKBD=y | ||
1538 | # CONFIG_KEYBOARD_SUNKBD is not set | ||
1539 | # CONFIG_KEYBOARD_LKKBD is not set | ||
1540 | # CONFIG_KEYBOARD_XTKBD is not set | ||
1541 | # CONFIG_KEYBOARD_NEWTON is not set | ||
1542 | # CONFIG_KEYBOARD_STOWAWAY is not set | ||
1543 | # CONFIG_KEYBOARD_GPIO is not set | ||
1544 | CONFIG_INPUT_MOUSE=y | ||
1545 | CONFIG_MOUSE_PS2=y | ||
1546 | CONFIG_MOUSE_PS2_ALPS=y | ||
1547 | CONFIG_MOUSE_PS2_LOGIPS2PP=y | ||
1548 | CONFIG_MOUSE_PS2_SYNAPTICS=y | ||
1549 | CONFIG_MOUSE_PS2_LIFEBOOK=y | ||
1550 | CONFIG_MOUSE_PS2_TRACKPOINT=y | ||
1551 | # CONFIG_MOUSE_PS2_TOUCHKIT is not set | ||
1552 | CONFIG_MOUSE_SERIAL=m | ||
1553 | CONFIG_MOUSE_APPLETOUCH=m | ||
1554 | # CONFIG_MOUSE_INPORT is not set | ||
1555 | # CONFIG_MOUSE_LOGIBM is not set | ||
1556 | # CONFIG_MOUSE_PC110PAD is not set | ||
1557 | CONFIG_MOUSE_VSXXXAA=m | ||
1558 | # CONFIG_MOUSE_GPIO is not set | ||
1559 | CONFIG_INPUT_JOYSTICK=y | ||
1560 | CONFIG_JOYSTICK_ANALOG=m | ||
1561 | CONFIG_JOYSTICK_A3D=m | ||
1562 | CONFIG_JOYSTICK_ADI=m | ||
1563 | CONFIG_JOYSTICK_COBRA=m | ||
1564 | CONFIG_JOYSTICK_GF2K=m | ||
1565 | CONFIG_JOYSTICK_GRIP=m | ||
1566 | CONFIG_JOYSTICK_GRIP_MP=m | ||
1567 | CONFIG_JOYSTICK_GUILLEMOT=m | ||
1568 | CONFIG_JOYSTICK_INTERACT=m | ||
1569 | CONFIG_JOYSTICK_SIDEWINDER=m | ||
1570 | CONFIG_JOYSTICK_TMDC=m | ||
1571 | CONFIG_JOYSTICK_IFORCE=m | ||
1572 | CONFIG_JOYSTICK_IFORCE_USB=y | ||
1573 | CONFIG_JOYSTICK_IFORCE_232=y | ||
1574 | CONFIG_JOYSTICK_WARRIOR=m | ||
1575 | CONFIG_JOYSTICK_MAGELLAN=m | ||
1576 | CONFIG_JOYSTICK_SPACEORB=m | ||
1577 | CONFIG_JOYSTICK_SPACEBALL=m | ||
1578 | CONFIG_JOYSTICK_STINGER=m | ||
1579 | CONFIG_JOYSTICK_TWIDJOY=m | ||
1580 | CONFIG_JOYSTICK_ZHENHUA=m | ||
1581 | CONFIG_JOYSTICK_DB9=m | ||
1582 | CONFIG_JOYSTICK_GAMECON=m | ||
1583 | CONFIG_JOYSTICK_TURBOGRAFX=m | ||
1584 | CONFIG_JOYSTICK_JOYDUMP=m | ||
1585 | CONFIG_JOYSTICK_XPAD=m | ||
1586 | CONFIG_JOYSTICK_XPAD_FF=y | ||
1587 | CONFIG_JOYSTICK_XPAD_LEDS=y | ||
1588 | CONFIG_INPUT_TABLET=y | ||
1589 | CONFIG_TABLET_USB_ACECAD=m | ||
1590 | CONFIG_TABLET_USB_AIPTEK=m | ||
1591 | CONFIG_TABLET_USB_GTCO=m | ||
1592 | CONFIG_TABLET_USB_KBTAB=m | ||
1593 | CONFIG_TABLET_USB_WACOM=m | ||
1594 | # CONFIG_INPUT_TOUCHSCREEN is not set | ||
1595 | CONFIG_INPUT_MISC=y | ||
1596 | CONFIG_INPUT_PCSPKR=m | ||
1597 | CONFIG_INPUT_ATI_REMOTE=m | ||
1598 | CONFIG_INPUT_ATI_REMOTE2=m | ||
1599 | CONFIG_INPUT_KEYSPAN_REMOTE=m | ||
1600 | CONFIG_INPUT_POWERMATE=m | ||
1601 | CONFIG_INPUT_YEALINK=m | ||
1602 | CONFIG_INPUT_UINPUT=m | ||
1603 | |||
1604 | # | ||
1605 | # Hardware I/O ports | ||
1606 | # | ||
1607 | CONFIG_SERIO=y | ||
1608 | CONFIG_SERIO_I8042=y | ||
1609 | CONFIG_SERIO_SERPORT=y | ||
1610 | # CONFIG_SERIO_PARKBD is not set | ||
1611 | # CONFIG_SERIO_PCIPS2 is not set | ||
1612 | CONFIG_SERIO_LIBPS2=y | ||
1613 | CONFIG_SERIO_RAW=m | ||
1614 | CONFIG_GAMEPORT=m | ||
1615 | CONFIG_GAMEPORT_NS558=m | ||
1616 | CONFIG_GAMEPORT_L4=m | ||
1617 | CONFIG_GAMEPORT_EMU10K1=m | ||
1618 | CONFIG_GAMEPORT_FM801=m | ||
1619 | CONFIG_INPUT_LIRC=y | ||
1620 | CONFIG_LIRC_DEV=m | ||
1621 | CONFIG_LIRC_ATIUSB=m | ||
1622 | CONFIG_LIRC_BT829=m | ||
1623 | CONFIG_LIRC_CMDIR=m | ||
1624 | CONFIG_LIRC_I2C=m | ||
1625 | CONFIG_LIRC_IGORPLUGUSB=m | ||
1626 | CONFIG_LIRC_IMON=m | ||
1627 | CONFIG_LIRC_IT87=m | ||
1628 | CONFIG_LIRC_MCEUSB=m | ||
1629 | CONFIG_LIRC_MCEUSB2=m | ||
1630 | CONFIG_LIRC_PVR150=m | ||
1631 | CONFIG_LIRC_PARALLEL=m | ||
1632 | CONFIG_LIRC_SERIAL=m | ||
1633 | CONFIG_LIRC_SIR=m | ||
1634 | CONFIG_LIRC_STREAMZAP=m | ||
1635 | CONFIG_LIRC_TTUSBIR=m | ||
1636 | |||
1637 | # | ||
1638 | # Character devices | ||
1639 | # | ||
1640 | CONFIG_VT=y | ||
1641 | CONFIG_VT_CONSOLE=y | ||
1642 | CONFIG_HW_CONSOLE=y | ||
1643 | CONFIG_VT_HW_CONSOLE_BINDING=y | ||
1644 | # CONFIG_DEVKMEM is not set | ||
1645 | CONFIG_SERIAL_NONSTANDARD=y | ||
1646 | # CONFIG_COMPUTONE is not set | ||
1647 | CONFIG_ROCKETPORT=m | ||
1648 | CONFIG_CYCLADES=m | ||
1649 | # CONFIG_CYZ_INTR is not set | ||
1650 | # CONFIG_DIGIEPCA is not set | ||
1651 | # CONFIG_ESPSERIAL is not set | ||
1652 | # CONFIG_MOXA_INTELLIO is not set | ||
1653 | # CONFIG_MOXA_SMARTIO is not set | ||
1654 | # CONFIG_ISI is not set | ||
1655 | CONFIG_SYNCLINK=m | ||
1656 | CONFIG_SYNCLINKMP=m | ||
1657 | CONFIG_SYNCLINK_GT=m | ||
1658 | CONFIG_N_HDLC=m | ||
1659 | # CONFIG_RISCOM8 is not set | ||
1660 | # CONFIG_SPECIALIX is not set | ||
1661 | # CONFIG_SX is not set | ||
1662 | # CONFIG_RIO is not set | ||
1663 | # CONFIG_STALDRV is not set | ||
1664 | CONFIG_NOZOMI=m | ||
1665 | |||
1666 | # | ||
1667 | # Serial drivers | ||
1668 | # | ||
1669 | CONFIG_SERIAL_8250=y | ||
1670 | CONFIG_SERIAL_8250_CONSOLE=y | ||
1671 | CONFIG_SERIAL_8250_PCI=y | ||
1672 | CONFIG_SERIAL_8250_PNP=y | ||
1673 | CONFIG_SERIAL_8250_CS=m | ||
1674 | CONFIG_SERIAL_8250_NR_UARTS=32 | ||
1675 | CONFIG_SERIAL_8250_RUNTIME_UARTS=4 | ||
1676 | CONFIG_SERIAL_8250_EXTENDED=y | ||
1677 | CONFIG_SERIAL_8250_MANY_PORTS=y | ||
1678 | # CONFIG_SERIAL_8250_FOURPORT is not set | ||
1679 | # CONFIG_SERIAL_8250_ACCENT is not set | ||
1680 | # CONFIG_SERIAL_8250_BOCA is not set | ||
1681 | # CONFIG_SERIAL_8250_EXAR_ST16C554 is not set | ||
1682 | # CONFIG_SERIAL_8250_HUB6 is not set | ||
1683 | CONFIG_SERIAL_8250_SHARE_IRQ=y | ||
1684 | CONFIG_SERIAL_8250_DETECT_IRQ=y | ||
1685 | CONFIG_SERIAL_8250_RSA=y | ||
1686 | |||
1687 | # | ||
1688 | # Non-8250 serial port support | ||
1689 | # | ||
1690 | CONFIG_SERIAL_UARTLITE=m | ||
1691 | CONFIG_SERIAL_CORE=y | ||
1692 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
1693 | CONFIG_SERIAL_PMACZILOG=m | ||
1694 | # CONFIG_SERIAL_PMACZILOG_TTYS is not set | ||
1695 | # CONFIG_SERIAL_CPM is not set | ||
1696 | CONFIG_SERIAL_MPC52xx=y | ||
1697 | CONFIG_SERIAL_MPC52xx_CONSOLE=y | ||
1698 | CONFIG_SERIAL_MPC52xx_CONSOLE_BAUD=115200 | ||
1699 | CONFIG_SERIAL_JSM=m | ||
1700 | CONFIG_SERIAL_OF_PLATFORM=y | ||
1701 | # CONFIG_SERIAL_QE is not set | ||
1702 | CONFIG_UNIX98_PTYS=y | ||
1703 | # CONFIG_LEGACY_PTYS is not set | ||
1704 | # CONFIG_CRASH is not set | ||
1705 | CONFIG_BRIQ_PANEL=m | ||
1706 | CONFIG_PRINTER=m | ||
1707 | CONFIG_LP_CONSOLE=y | ||
1708 | CONFIG_PPDEV=m | ||
1709 | # CONFIG_HVC_RTAS is not set | ||
1710 | # CONFIG_IPMI_HANDLER is not set | ||
1711 | CONFIG_HW_RANDOM=y | ||
1712 | CONFIG_HW_RANDOM_VIRTIO=m | ||
1713 | CONFIG_NVRAM=y | ||
1714 | CONFIG_DTLK=m | ||
1715 | CONFIG_R3964=m | ||
1716 | # CONFIG_APPLICOM is not set | ||
1717 | |||
1718 | # | ||
1719 | # PCMCIA character devices | ||
1720 | # | ||
1721 | # CONFIG_SYNCLINK_CS is not set | ||
1722 | CONFIG_CARDMAN_4000=m | ||
1723 | CONFIG_CARDMAN_4040=m | ||
1724 | CONFIG_IPWIRELESS=m | ||
1725 | # CONFIG_RAW_DRIVER is not set | ||
1726 | # CONFIG_TCG_TPM is not set | ||
1727 | CONFIG_DEVPORT=y | ||
1728 | CONFIG_I2C=y | ||
1729 | CONFIG_I2C_BOARDINFO=y | ||
1730 | CONFIG_I2C_CHARDEV=m | ||
1731 | CONFIG_I2C_ALGOBIT=y | ||
1732 | CONFIG_I2C_ALGOPCA=m | ||
1733 | |||
1734 | # | ||
1735 | # I2C Hardware Bus support | ||
1736 | # | ||
1737 | |||
1738 | # | ||
1739 | # PC SMBus host controller drivers | ||
1740 | # | ||
1741 | # CONFIG_I2C_ALI1535 is not set | ||
1742 | # CONFIG_I2C_ALI1563 is not set | ||
1743 | # CONFIG_I2C_ALI15X3 is not set | ||
1744 | # CONFIG_I2C_AMD756 is not set | ||
1745 | # CONFIG_I2C_AMD8111 is not set | ||
1746 | # CONFIG_I2C_I801 is not set | ||
1747 | # CONFIG_I2C_ISCH is not set | ||
1748 | # CONFIG_I2C_PIIX4 is not set | ||
1749 | # CONFIG_I2C_NFORCE2 is not set | ||
1750 | # CONFIG_I2C_SIS5595 is not set | ||
1751 | # CONFIG_I2C_SIS630 is not set | ||
1752 | # CONFIG_I2C_SIS96X is not set | ||
1753 | # CONFIG_I2C_VIA is not set | ||
1754 | # CONFIG_I2C_VIAPRO is not set | ||
1755 | |||
1756 | # | ||
1757 | # Mac SMBus host controller drivers | ||
1758 | # | ||
1759 | CONFIG_I2C_HYDRA=m | ||
1760 | CONFIG_I2C_POWERMAC=y | ||
1761 | |||
1762 | # | ||
1763 | # I2C system bus drivers (mostly embedded / system-on-chip) | ||
1764 | # | ||
1765 | # CONFIG_I2C_CPM is not set | ||
1766 | # CONFIG_I2C_GPIO is not set | ||
1767 | CONFIG_I2C_MPC=m | ||
1768 | # CONFIG_I2C_OCORES is not set | ||
1769 | CONFIG_I2C_SIMTEC=m | ||
1770 | |||
1771 | # | ||
1772 | # External I2C/SMBus adapter drivers | ||
1773 | # | ||
1774 | CONFIG_I2C_PARPORT=m | ||
1775 | CONFIG_I2C_PARPORT_LIGHT=m | ||
1776 | # CONFIG_I2C_TAOS_EVM is not set | ||
1777 | CONFIG_I2C_TINY_USB=m | ||
1778 | |||
1779 | # | ||
1780 | # Graphics adapter I2C/DDC channel drivers | ||
1781 | # | ||
1782 | CONFIG_I2C_VOODOO3=m | ||
1783 | |||
1784 | # | ||
1785 | # Other I2C/SMBus bus drivers | ||
1786 | # | ||
1787 | # CONFIG_I2C_ELEKTOR is not set | ||
1788 | CONFIG_I2C_PCA_ISA=m | ||
1789 | CONFIG_I2C_PCA_PLATFORM=m | ||
1790 | CONFIG_I2C_STUB=m | ||
1791 | |||
1792 | # | ||
1793 | # Miscellaneous I2C Chip support | ||
1794 | # | ||
1795 | # CONFIG_DS1682 is not set | ||
1796 | CONFIG_AT24=m | ||
1797 | CONFIG_SENSORS_EEPROM=m | ||
1798 | CONFIG_SENSORS_PCF8574=m | ||
1799 | CONFIG_PCF8575=m | ||
1800 | CONFIG_SENSORS_PCA9539=m | ||
1801 | CONFIG_SENSORS_PCF8591=m | ||
1802 | # CONFIG_TPS65010 is not set | ||
1803 | CONFIG_SENSORS_MAX6875=m | ||
1804 | CONFIG_SENSORS_TSL2550=m | ||
1805 | # CONFIG_I2C_DEBUG_CORE is not set | ||
1806 | # CONFIG_I2C_DEBUG_ALGO is not set | ||
1807 | # CONFIG_I2C_DEBUG_BUS is not set | ||
1808 | # CONFIG_I2C_DEBUG_CHIP is not set | ||
1809 | # CONFIG_SPI is not set | ||
1810 | CONFIG_HAVE_GPIO_LIB=y | ||
1811 | |||
1812 | # | ||
1813 | # GPIO Support | ||
1814 | # | ||
1815 | # CONFIG_DEBUG_GPIO is not set | ||
1816 | |||
1817 | # | ||
1818 | # I2C GPIO expanders: | ||
1819 | # | ||
1820 | # CONFIG_GPIO_PCA953X is not set | ||
1821 | # CONFIG_GPIO_PCF857X is not set | ||
1822 | |||
1823 | # | ||
1824 | # SPI GPIO expanders: | ||
1825 | # | ||
1826 | CONFIG_W1=m | ||
1827 | CONFIG_W1_CON=y | ||
1828 | |||
1829 | # | ||
1830 | # 1-wire Bus Masters | ||
1831 | # | ||
1832 | # CONFIG_W1_MASTER_MATROX is not set | ||
1833 | CONFIG_W1_MASTER_DS2490=m | ||
1834 | CONFIG_W1_MASTER_DS2482=m | ||
1835 | # CONFIG_W1_MASTER_GPIO is not set | ||
1836 | |||
1837 | # | ||
1838 | # 1-wire Slaves | ||
1839 | # | ||
1840 | CONFIG_W1_SLAVE_THERM=m | ||
1841 | CONFIG_W1_SLAVE_SMEM=m | ||
1842 | CONFIG_W1_SLAVE_DS2433=m | ||
1843 | CONFIG_W1_SLAVE_DS2433_CRC=y | ||
1844 | CONFIG_W1_SLAVE_DS2760=m | ||
1845 | CONFIG_POWER_SUPPLY=m | ||
1846 | # CONFIG_POWER_SUPPLY_DEBUG is not set | ||
1847 | # CONFIG_PDA_POWER is not set | ||
1848 | CONFIG_APM_POWER=m | ||
1849 | # CONFIG_BATTERY_DS2760 is not set | ||
1850 | CONFIG_BATTERY_PMU=m | ||
1851 | CONFIG_HWMON=m | ||
1852 | CONFIG_HWMON_VID=m | ||
1853 | CONFIG_SENSORS_AD7418=m | ||
1854 | CONFIG_SENSORS_ADM1021=m | ||
1855 | CONFIG_SENSORS_ADM1025=m | ||
1856 | CONFIG_SENSORS_ADM1026=m | ||
1857 | CONFIG_SENSORS_ADM1029=m | ||
1858 | CONFIG_SENSORS_ADM1031=m | ||
1859 | CONFIG_SENSORS_ADM9240=m | ||
1860 | CONFIG_SENSORS_ADT7470=m | ||
1861 | CONFIG_SENSORS_ADT7473=m | ||
1862 | CONFIG_SENSORS_AMS=m | ||
1863 | CONFIG_SENSORS_AMS_PMU=y | ||
1864 | CONFIG_SENSORS_AMS_I2C=y | ||
1865 | CONFIG_SENSORS_ATXP1=m | ||
1866 | CONFIG_SENSORS_DS1621=m | ||
1867 | # CONFIG_SENSORS_I5K_AMB is not set | ||
1868 | CONFIG_SENSORS_F71805F=m | ||
1869 | CONFIG_SENSORS_F71882FG=m | ||
1870 | CONFIG_SENSORS_F75375S=m | ||
1871 | CONFIG_SENSORS_GL518SM=m | ||
1872 | CONFIG_SENSORS_GL520SM=m | ||
1873 | CONFIG_SENSORS_IT87=m | ||
1874 | CONFIG_SENSORS_LM63=m | ||
1875 | CONFIG_SENSORS_LM75=m | ||
1876 | CONFIG_SENSORS_LM77=m | ||
1877 | CONFIG_SENSORS_LM78=m | ||
1878 | CONFIG_SENSORS_LM80=m | ||
1879 | CONFIG_SENSORS_LM83=m | ||
1880 | CONFIG_SENSORS_LM85=m | ||
1881 | CONFIG_SENSORS_LM87=m | ||
1882 | CONFIG_SENSORS_LM90=m | ||
1883 | CONFIG_SENSORS_LM92=m | ||
1884 | CONFIG_SENSORS_LM93=m | ||
1885 | CONFIG_SENSORS_MAX1619=m | ||
1886 | CONFIG_SENSORS_MAX6650=m | ||
1887 | CONFIG_SENSORS_PC87360=m | ||
1888 | CONFIG_SENSORS_PC87427=m | ||
1889 | CONFIG_SENSORS_SIS5595=m | ||
1890 | CONFIG_SENSORS_DME1737=m | ||
1891 | CONFIG_SENSORS_SMSC47M1=m | ||
1892 | CONFIG_SENSORS_SMSC47M192=m | ||
1893 | CONFIG_SENSORS_SMSC47B397=m | ||
1894 | CONFIG_SENSORS_ADS7828=m | ||
1895 | CONFIG_SENSORS_THMC50=m | ||
1896 | CONFIG_SENSORS_VIA686A=m | ||
1897 | CONFIG_SENSORS_VT1211=m | ||
1898 | CONFIG_SENSORS_VT8231=m | ||
1899 | CONFIG_SENSORS_W83781D=m | ||
1900 | CONFIG_SENSORS_W83791D=m | ||
1901 | CONFIG_SENSORS_W83792D=m | ||
1902 | CONFIG_SENSORS_W83793=m | ||
1903 | CONFIG_SENSORS_W83L785TS=m | ||
1904 | CONFIG_SENSORS_W83L786NG=m | ||
1905 | CONFIG_SENSORS_W83627HF=m | ||
1906 | CONFIG_SENSORS_W83627EHF=m | ||
1907 | # CONFIG_HWMON_DEBUG_CHIP is not set | ||
1908 | CONFIG_THERMAL=y | ||
1909 | CONFIG_WATCHDOG=y | ||
1910 | # CONFIG_WATCHDOG_NOWAYOUT is not set | ||
1911 | |||
1912 | # | ||
1913 | # Watchdog Device Drivers | ||
1914 | # | ||
1915 | CONFIG_SOFT_WATCHDOG=m | ||
1916 | # CONFIG_MPC5200_WDT is not set | ||
1917 | CONFIG_83xx_WDT=m | ||
1918 | CONFIG_WATCHDOG_RTAS=m | ||
1919 | |||
1920 | # | ||
1921 | # ISA-based Watchdog Cards | ||
1922 | # | ||
1923 | # CONFIG_PCWATCHDOG is not set | ||
1924 | # CONFIG_MIXCOMWD is not set | ||
1925 | # CONFIG_WDT is not set | ||
1926 | |||
1927 | # | ||
1928 | # PCI-based Watchdog Cards | ||
1929 | # | ||
1930 | # CONFIG_PCIPCWATCHDOG is not set | ||
1931 | # CONFIG_WDTPCI is not set | ||
1932 | |||
1933 | # | ||
1934 | # USB-based Watchdog Cards | ||
1935 | # | ||
1936 | CONFIG_USBPCWATCHDOG=m | ||
1937 | |||
1938 | # | ||
1939 | # Sonics Silicon Backplane | ||
1940 | # | ||
1941 | CONFIG_SSB_POSSIBLE=y | ||
1942 | CONFIG_SSB=m | ||
1943 | CONFIG_SSB_SPROM=y | ||
1944 | CONFIG_SSB_PCIHOST_POSSIBLE=y | ||
1945 | CONFIG_SSB_PCIHOST=y | ||
1946 | # CONFIG_SSB_B43_PCI_BRIDGE is not set | ||
1947 | CONFIG_SSB_PCMCIAHOST_POSSIBLE=y | ||
1948 | CONFIG_SSB_PCMCIAHOST=y | ||
1949 | # CONFIG_SSB_DEBUG is not set | ||
1950 | CONFIG_SSB_DRIVER_PCICORE_POSSIBLE=y | ||
1951 | CONFIG_SSB_DRIVER_PCICORE=y | ||
1952 | |||
1953 | # | ||
1954 | # Multifunction device drivers | ||
1955 | # | ||
1956 | CONFIG_MFD_SM501=m | ||
1957 | # CONFIG_HTC_PASIC3 is not set | ||
1958 | |||
1959 | # | ||
1960 | # Multimedia devices | ||
1961 | # | ||
1962 | |||
1963 | # | ||
1964 | # Multimedia core support | ||
1965 | # | ||
1966 | CONFIG_VIDEO_DEV=m | ||
1967 | CONFIG_VIDEO_V4L2_COMMON=m | ||
1968 | CONFIG_VIDEO_ALLOW_V4L1=y | ||
1969 | CONFIG_VIDEO_V4L1_COMPAT=y | ||
1970 | CONFIG_DVB_CORE=m | ||
1971 | CONFIG_VIDEO_MEDIA=m | ||
1972 | |||
1973 | # | ||
1974 | # Multimedia drivers | ||
1975 | # | ||
1976 | CONFIG_VIDEO_SAA7146=m | ||
1977 | CONFIG_VIDEO_SAA7146_VV=m | ||
1978 | CONFIG_MEDIA_ATTACH=y | ||
1979 | CONFIG_MEDIA_TUNER=m | ||
1980 | # CONFIG_MEDIA_TUNER_CUSTOMIZE is not set | ||
1981 | CONFIG_MEDIA_TUNER_SIMPLE=m | ||
1982 | CONFIG_MEDIA_TUNER_TDA8290=m | ||
1983 | CONFIG_MEDIA_TUNER_TDA827X=m | ||
1984 | CONFIG_MEDIA_TUNER_TDA18271=m | ||
1985 | CONFIG_MEDIA_TUNER_TDA9887=m | ||
1986 | CONFIG_MEDIA_TUNER_TEA5761=m | ||
1987 | CONFIG_MEDIA_TUNER_TEA5767=m | ||
1988 | CONFIG_MEDIA_TUNER_MT20XX=m | ||
1989 | CONFIG_MEDIA_TUNER_MT2060=m | ||
1990 | CONFIG_MEDIA_TUNER_MT2266=m | ||
1991 | CONFIG_MEDIA_TUNER_MT2131=m | ||
1992 | CONFIG_MEDIA_TUNER_QT1010=m | ||
1993 | CONFIG_MEDIA_TUNER_XC2028=m | ||
1994 | CONFIG_MEDIA_TUNER_XC5000=m | ||
1995 | CONFIG_MEDIA_TUNER_MXL5005S=m | ||
1996 | CONFIG_VIDEO_V4L2=m | ||
1997 | CONFIG_VIDEO_V4L1=m | ||
1998 | CONFIG_VIDEOBUF_GEN=m | ||
1999 | CONFIG_VIDEOBUF_DMA_SG=m | ||
2000 | CONFIG_VIDEOBUF_VMALLOC=m | ||
2001 | CONFIG_VIDEOBUF_DVB=m | ||
2002 | CONFIG_VIDEO_BTCX=m | ||
2003 | CONFIG_VIDEO_IR_I2C=m | ||
2004 | CONFIG_VIDEO_IR=m | ||
2005 | CONFIG_VIDEO_TVEEPROM=m | ||
2006 | CONFIG_VIDEO_TUNER=m | ||
2007 | CONFIG_VIDEO_CAPTURE_DRIVERS=y | ||
2008 | # CONFIG_VIDEO_ADV_DEBUG is not set | ||
2009 | # CONFIG_VIDEO_HELPER_CHIPS_AUTO is not set | ||
2010 | |||
2011 | # | ||
2012 | # Encoders/decoders and other helper chips | ||
2013 | # | ||
2014 | |||
2015 | # | ||
2016 | # Audio decoders | ||
2017 | # | ||
2018 | CONFIG_VIDEO_TVAUDIO=m | ||
2019 | CONFIG_VIDEO_TDA7432=m | ||
2020 | CONFIG_VIDEO_TDA9840=m | ||
2021 | CONFIG_VIDEO_TDA9875=m | ||
2022 | CONFIG_VIDEO_TEA6415C=m | ||
2023 | CONFIG_VIDEO_TEA6420=m | ||
2024 | CONFIG_VIDEO_MSP3400=m | ||
2025 | CONFIG_VIDEO_CS5345=m | ||
2026 | CONFIG_VIDEO_CS53L32A=m | ||
2027 | CONFIG_VIDEO_M52790=m | ||
2028 | CONFIG_VIDEO_TLV320AIC23B=m | ||
2029 | CONFIG_VIDEO_WM8775=m | ||
2030 | CONFIG_VIDEO_WM8739=m | ||
2031 | CONFIG_VIDEO_VP27SMPX=m | ||
2032 | |||
2033 | # | ||
2034 | # Video decoders | ||
2035 | # | ||
2036 | CONFIG_VIDEO_BT819=m | ||
2037 | CONFIG_VIDEO_BT856=m | ||
2038 | CONFIG_VIDEO_BT866=m | ||
2039 | CONFIG_VIDEO_KS0127=m | ||
2040 | CONFIG_VIDEO_OV7670=m | ||
2041 | CONFIG_VIDEO_TCM825X=m | ||
2042 | CONFIG_VIDEO_SAA7110=m | ||
2043 | CONFIG_VIDEO_SAA7111=m | ||
2044 | CONFIG_VIDEO_SAA7114=m | ||
2045 | CONFIG_VIDEO_SAA711X=m | ||
2046 | CONFIG_VIDEO_SAA717X=m | ||
2047 | CONFIG_VIDEO_SAA7191=m | ||
2048 | CONFIG_VIDEO_TVP5150=m | ||
2049 | CONFIG_VIDEO_VPX3220=m | ||
2050 | |||
2051 | # | ||
2052 | # Video and audio decoders | ||
2053 | # | ||
2054 | CONFIG_VIDEO_CX25840=m | ||
2055 | |||
2056 | # | ||
2057 | # MPEG video encoders | ||
2058 | # | ||
2059 | CONFIG_VIDEO_CX2341X=m | ||
2060 | |||
2061 | # | ||
2062 | # Video encoders | ||
2063 | # | ||
2064 | CONFIG_VIDEO_SAA7127=m | ||
2065 | CONFIG_VIDEO_SAA7185=m | ||
2066 | CONFIG_VIDEO_ADV7170=m | ||
2067 | CONFIG_VIDEO_ADV7175=m | ||
2068 | |||
2069 | # | ||
2070 | # Video improvement chips | ||
2071 | # | ||
2072 | CONFIG_VIDEO_UPD64031A=m | ||
2073 | CONFIG_VIDEO_UPD64083=m | ||
2074 | # CONFIG_VIDEO_VIVI is not set | ||
2075 | CONFIG_VIDEO_BT848=m | ||
2076 | CONFIG_VIDEO_BT848_DVB=y | ||
2077 | CONFIG_VIDEO_SAA6588=m | ||
2078 | # CONFIG_VIDEO_PMS is not set | ||
2079 | CONFIG_VIDEO_BWQCAM=m | ||
2080 | CONFIG_VIDEO_CQCAM=m | ||
2081 | CONFIG_VIDEO_W9966=m | ||
2082 | CONFIG_VIDEO_CPIA=m | ||
2083 | CONFIG_VIDEO_CPIA_PP=m | ||
2084 | CONFIG_VIDEO_CPIA_USB=m | ||
2085 | CONFIG_VIDEO_CPIA2=m | ||
2086 | CONFIG_VIDEO_SAA5246A=m | ||
2087 | CONFIG_VIDEO_SAA5249=m | ||
2088 | CONFIG_TUNER_3036=m | ||
2089 | # CONFIG_VIDEO_STRADIS is not set | ||
2090 | # CONFIG_VIDEO_ZORAN is not set | ||
2091 | CONFIG_VIDEO_SAA7134=m | ||
2092 | CONFIG_VIDEO_SAA7134_ALSA=m | ||
2093 | CONFIG_VIDEO_SAA7134_DVB=m | ||
2094 | CONFIG_VIDEO_MXB=m | ||
2095 | CONFIG_VIDEO_DPC=m | ||
2096 | CONFIG_VIDEO_HEXIUM_ORION=m | ||
2097 | CONFIG_VIDEO_HEXIUM_GEMINI=m | ||
2098 | CONFIG_VIDEO_CX88=m | ||
2099 | CONFIG_VIDEO_CX88_ALSA=m | ||
2100 | CONFIG_VIDEO_CX88_BLACKBIRD=m | ||
2101 | CONFIG_VIDEO_CX88_DVB=m | ||
2102 | CONFIG_VIDEO_CX88_VP3054=m | ||
2103 | CONFIG_VIDEO_CX23885=m | ||
2104 | CONFIG_VIDEO_AU0828=m | ||
2105 | CONFIG_VIDEO_IVTV=m | ||
2106 | CONFIG_VIDEO_FB_IVTV=m | ||
2107 | CONFIG_VIDEO_CX18=m | ||
2108 | # CONFIG_VIDEO_CAFE_CCIC is not set | ||
2109 | CONFIG_V4L_USB_DRIVERS=y | ||
2110 | CONFIG_USB_VIDEO_CLASS=m | ||
2111 | CONFIG_VIDEO_PVRUSB2=m | ||
2112 | CONFIG_VIDEO_PVRUSB2_SYSFS=y | ||
2113 | CONFIG_VIDEO_PVRUSB2_DVB=y | ||
2114 | # CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set | ||
2115 | CONFIG_VIDEO_EM28XX=m | ||
2116 | CONFIG_VIDEO_EM28XX_ALSA=m | ||
2117 | CONFIG_VIDEO_EM28XX_DVB=m | ||
2118 | CONFIG_VIDEO_USBVISION=m | ||
2119 | CONFIG_VIDEO_USBVIDEO=m | ||
2120 | CONFIG_USB_VICAM=m | ||
2121 | CONFIG_USB_IBMCAM=m | ||
2122 | CONFIG_USB_KONICAWC=m | ||
2123 | CONFIG_USB_QUICKCAM_MESSENGER=m | ||
2124 | CONFIG_USB_ET61X251=m | ||
2125 | CONFIG_VIDEO_OVCAMCHIP=m | ||
2126 | CONFIG_USB_W9968CF=m | ||
2127 | CONFIG_USB_OV511=m | ||
2128 | CONFIG_USB_SE401=m | ||
2129 | CONFIG_USB_SN9C102=m | ||
2130 | CONFIG_USB_STV680=m | ||
2131 | CONFIG_USB_ZC0301=m | ||
2132 | CONFIG_USB_PWC=m | ||
2133 | # CONFIG_USB_PWC_DEBUG is not set | ||
2134 | CONFIG_USB_ZR364XX=m | ||
2135 | CONFIG_USB_STKWEBCAM=m | ||
2136 | CONFIG_SOC_CAMERA=m | ||
2137 | CONFIG_SOC_CAMERA_MT9M001=m | ||
2138 | # CONFIG_MT9M001_PCA9536_SWITCH is not set | ||
2139 | CONFIG_SOC_CAMERA_MT9V022=m | ||
2140 | # CONFIG_MT9V022_PCA9536_SWITCH is not set | ||
2141 | CONFIG_RADIO_ADAPTERS=y | ||
2142 | # CONFIG_RADIO_CADET is not set | ||
2143 | # CONFIG_RADIO_RTRACK is not set | ||
2144 | # CONFIG_RADIO_RTRACK2 is not set | ||
2145 | # CONFIG_RADIO_AZTECH is not set | ||
2146 | # CONFIG_RADIO_GEMTEK is not set | ||
2147 | CONFIG_RADIO_GEMTEK_PCI=m | ||
2148 | CONFIG_RADIO_MAXIRADIO=m | ||
2149 | CONFIG_RADIO_MAESTRO=m | ||
2150 | # CONFIG_RADIO_SF16FMI is not set | ||
2151 | # CONFIG_RADIO_SF16FMR2 is not set | ||
2152 | # CONFIG_RADIO_TERRATEC is not set | ||
2153 | # CONFIG_RADIO_TRUST is not set | ||
2154 | # CONFIG_RADIO_TYPHOON is not set | ||
2155 | # CONFIG_RADIO_ZOLTRIX is not set | ||
2156 | CONFIG_USB_DSBR=m | ||
2157 | CONFIG_USB_SI470X=m | ||
2158 | CONFIG_DVB_CAPTURE_DRIVERS=y | ||
2159 | |||
2160 | # | ||
2161 | # Supported SAA7146 based PCI Adapters | ||
2162 | # | ||
2163 | CONFIG_TTPCI_EEPROM=m | ||
2164 | CONFIG_DVB_AV7110=m | ||
2165 | CONFIG_DVB_AV7110_OSD=y | ||
2166 | CONFIG_DVB_BUDGET_CORE=m | ||
2167 | CONFIG_DVB_BUDGET=m | ||
2168 | CONFIG_DVB_BUDGET_CI=m | ||
2169 | CONFIG_DVB_BUDGET_AV=m | ||
2170 | CONFIG_DVB_BUDGET_PATCH=m | ||
2171 | |||
2172 | # | ||
2173 | # Supported USB Adapters | ||
2174 | # | ||
2175 | CONFIG_DVB_USB=m | ||
2176 | # CONFIG_DVB_USB_DEBUG is not set | ||
2177 | CONFIG_DVB_USB_A800=m | ||
2178 | CONFIG_DVB_USB_DIBUSB_MB=m | ||
2179 | # CONFIG_DVB_USB_DIBUSB_MB_FAULTY is not set | ||
2180 | CONFIG_DVB_USB_DIBUSB_MC=m | ||
2181 | CONFIG_DVB_USB_DIB0700=m | ||
2182 | CONFIG_DVB_USB_UMT_010=m | ||
2183 | CONFIG_DVB_USB_CXUSB=m | ||
2184 | CONFIG_DVB_USB_M920X=m | ||
2185 | CONFIG_DVB_USB_GL861=m | ||
2186 | CONFIG_DVB_USB_AU6610=m | ||
2187 | CONFIG_DVB_USB_DIGITV=m | ||
2188 | CONFIG_DVB_USB_VP7045=m | ||
2189 | CONFIG_DVB_USB_VP702X=m | ||
2190 | CONFIG_DVB_USB_GP8PSK=m | ||
2191 | CONFIG_DVB_USB_NOVA_T_USB2=m | ||
2192 | CONFIG_DVB_USB_TTUSB2=m | ||
2193 | CONFIG_DVB_USB_DTT200U=m | ||
2194 | CONFIG_DVB_USB_OPERA1=m | ||
2195 | CONFIG_DVB_USB_AF9005=m | ||
2196 | CONFIG_DVB_USB_AF9005_REMOTE=m | ||
2197 | CONFIG_DVB_TTUSB_BUDGET=m | ||
2198 | CONFIG_DVB_TTUSB_DEC=m | ||
2199 | CONFIG_DVB_CINERGYT2=m | ||
2200 | CONFIG_DVB_CINERGYT2_TUNING=y | ||
2201 | CONFIG_DVB_CINERGYT2_STREAM_URB_COUNT=32 | ||
2202 | CONFIG_DVB_CINERGYT2_STREAM_BUF_SIZE=512 | ||
2203 | CONFIG_DVB_CINERGYT2_QUERY_INTERVAL=250 | ||
2204 | CONFIG_DVB_CINERGYT2_ENABLE_RC_INPUT_DEVICE=y | ||
2205 | CONFIG_DVB_CINERGYT2_RC_QUERY_INTERVAL=100 | ||
2206 | |||
2207 | # | ||
2208 | # Supported FlexCopII (B2C2) Adapters | ||
2209 | # | ||
2210 | CONFIG_DVB_B2C2_FLEXCOP=m | ||
2211 | CONFIG_DVB_B2C2_FLEXCOP_PCI=m | ||
2212 | CONFIG_DVB_B2C2_FLEXCOP_USB=m | ||
2213 | # CONFIG_DVB_B2C2_FLEXCOP_DEBUG is not set | ||
2214 | |||
2215 | # | ||
2216 | # Supported BT878 Adapters | ||
2217 | # | ||
2218 | CONFIG_DVB_BT8XX=m | ||
2219 | |||
2220 | # | ||
2221 | # Supported Pluto2 Adapters | ||
2222 | # | ||
2223 | CONFIG_DVB_PLUTO2=m | ||
2224 | |||
2225 | # | ||
2226 | # Supported DVB Frontends | ||
2227 | # | ||
2228 | |||
2229 | # | ||
2230 | # Customise DVB Frontends | ||
2231 | # | ||
2232 | # CONFIG_DVB_FE_CUSTOMISE is not set | ||
2233 | |||
2234 | # | ||
2235 | # DVB-S (satellite) frontends | ||
2236 | # | ||
2237 | CONFIG_DVB_CX24110=m | ||
2238 | CONFIG_DVB_CX24123=m | ||
2239 | CONFIG_DVB_MT312=m | ||
2240 | CONFIG_DVB_S5H1420=m | ||
2241 | CONFIG_DVB_STV0299=m | ||
2242 | CONFIG_DVB_TDA8083=m | ||
2243 | CONFIG_DVB_TDA10086=m | ||
2244 | CONFIG_DVB_VES1X93=m | ||
2245 | CONFIG_DVB_TUNER_ITD1000=m | ||
2246 | CONFIG_DVB_TDA826X=m | ||
2247 | CONFIG_DVB_TUA6100=m | ||
2248 | |||
2249 | # | ||
2250 | # DVB-T (terrestrial) frontends | ||
2251 | # | ||
2252 | CONFIG_DVB_SP8870=m | ||
2253 | CONFIG_DVB_SP887X=m | ||
2254 | CONFIG_DVB_CX22700=m | ||
2255 | CONFIG_DVB_CX22702=m | ||
2256 | CONFIG_DVB_L64781=m | ||
2257 | CONFIG_DVB_TDA1004X=m | ||
2258 | CONFIG_DVB_NXT6000=m | ||
2259 | CONFIG_DVB_MT352=m | ||
2260 | CONFIG_DVB_ZL10353=m | ||
2261 | CONFIG_DVB_DIB3000MB=m | ||
2262 | CONFIG_DVB_DIB3000MC=m | ||
2263 | CONFIG_DVB_DIB7000M=m | ||
2264 | CONFIG_DVB_DIB7000P=m | ||
2265 | CONFIG_DVB_TDA10048=m | ||
2266 | |||
2267 | # | ||
2268 | # DVB-C (cable) frontends | ||
2269 | # | ||
2270 | CONFIG_DVB_VES1820=m | ||
2271 | CONFIG_DVB_TDA10021=m | ||
2272 | CONFIG_DVB_TDA10023=m | ||
2273 | CONFIG_DVB_STV0297=m | ||
2274 | |||
2275 | # | ||
2276 | # ATSC (North American/Korean Terrestrial/Cable DTV) frontends | ||
2277 | # | ||
2278 | CONFIG_DVB_NXT200X=m | ||
2279 | CONFIG_DVB_OR51211=m | ||
2280 | CONFIG_DVB_OR51132=m | ||
2281 | CONFIG_DVB_BCM3510=m | ||
2282 | CONFIG_DVB_LGDT330X=m | ||
2283 | CONFIG_DVB_S5H1409=m | ||
2284 | CONFIG_DVB_AU8522=m | ||
2285 | CONFIG_DVB_S5H1411=m | ||
2286 | |||
2287 | # | ||
2288 | # Digital terrestrial only tuners/PLL | ||
2289 | # | ||
2290 | CONFIG_DVB_PLL=m | ||
2291 | CONFIG_DVB_TUNER_DIB0070=m | ||
2292 | |||
2293 | # | ||
2294 | # SEC control devices for DVB-S | ||
2295 | # | ||
2296 | CONFIG_DVB_LNBP21=m | ||
2297 | CONFIG_DVB_ISL6405=m | ||
2298 | CONFIG_DVB_ISL6421=m | ||
2299 | CONFIG_DAB=y | ||
2300 | CONFIG_USB_DABUSB=m | ||
2301 | |||
2302 | # | ||
2303 | # Graphics support | ||
2304 | # | ||
2305 | CONFIG_AGP=y | ||
2306 | CONFIG_AGP_UNINORTH=y | ||
2307 | CONFIG_DRM=m | ||
2308 | CONFIG_DRM_TDFX=m | ||
2309 | CONFIG_DRM_R128=m | ||
2310 | CONFIG_DRM_RADEON=m | ||
2311 | CONFIG_DRM_MGA=m | ||
2312 | CONFIG_DRM_SIS=m | ||
2313 | CONFIG_DRM_VIA=m | ||
2314 | CONFIG_DRM_SAVAGE=m | ||
2315 | CONFIG_VGASTATE=y | ||
2316 | CONFIG_VIDEO_OUTPUT_CONTROL=m | ||
2317 | CONFIG_FB=y | ||
2318 | # CONFIG_FIRMWARE_EDID is not set | ||
2319 | CONFIG_FB_DDC=y | ||
2320 | CONFIG_FB_CFB_FILLRECT=y | ||
2321 | CONFIG_FB_CFB_COPYAREA=y | ||
2322 | CONFIG_FB_CFB_IMAGEBLIT=y | ||
2323 | # CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set | ||
2324 | # CONFIG_FB_SYS_FILLRECT is not set | ||
2325 | # CONFIG_FB_SYS_COPYAREA is not set | ||
2326 | # CONFIG_FB_SYS_IMAGEBLIT is not set | ||
2327 | # CONFIG_FB_FOREIGN_ENDIAN is not set | ||
2328 | # CONFIG_FB_SYS_FOPS is not set | ||
2329 | CONFIG_FB_SVGALIB=m | ||
2330 | CONFIG_FB_MACMODES=y | ||
2331 | CONFIG_FB_BACKLIGHT=y | ||
2332 | CONFIG_FB_MODE_HELPERS=y | ||
2333 | CONFIG_FB_TILEBLITTING=y | ||
2334 | |||
2335 | # | ||
2336 | # Frame buffer hardware drivers | ||
2337 | # | ||
2338 | CONFIG_FB_CIRRUS=m | ||
2339 | # CONFIG_FB_PM2 is not set | ||
2340 | # CONFIG_FB_CYBER2000 is not set | ||
2341 | CONFIG_FB_OF=y | ||
2342 | # CONFIG_FB_CONTROL is not set | ||
2343 | CONFIG_FB_PLATINUM=y | ||
2344 | CONFIG_FB_VALKYRIE=y | ||
2345 | CONFIG_FB_CT65550=y | ||
2346 | # CONFIG_FB_ASILIANT is not set | ||
2347 | # CONFIG_FB_IMSTT is not set | ||
2348 | # CONFIG_FB_VGA16 is not set | ||
2349 | # CONFIG_FB_UVESA is not set | ||
2350 | # CONFIG_FB_S1D13XXX is not set | ||
2351 | CONFIG_FB_NVIDIA=y | ||
2352 | CONFIG_FB_NVIDIA_I2C=y | ||
2353 | # CONFIG_FB_NVIDIA_DEBUG is not set | ||
2354 | CONFIG_FB_NVIDIA_BACKLIGHT=y | ||
2355 | CONFIG_FB_RIVA=m | ||
2356 | # CONFIG_FB_RIVA_I2C is not set | ||
2357 | # CONFIG_FB_RIVA_DEBUG is not set | ||
2358 | CONFIG_FB_RIVA_BACKLIGHT=y | ||
2359 | CONFIG_FB_MATROX=y | ||
2360 | CONFIG_FB_MATROX_MILLENIUM=y | ||
2361 | CONFIG_FB_MATROX_MYSTIQUE=y | ||
2362 | CONFIG_FB_MATROX_G=y | ||
2363 | CONFIG_FB_MATROX_I2C=m | ||
2364 | CONFIG_FB_MATROX_MAVEN=m | ||
2365 | CONFIG_FB_MATROX_MULTIHEAD=y | ||
2366 | CONFIG_FB_RADEON=y | ||
2367 | CONFIG_FB_RADEON_I2C=y | ||
2368 | CONFIG_FB_RADEON_BACKLIGHT=y | ||
2369 | # CONFIG_FB_RADEON_DEBUG is not set | ||
2370 | CONFIG_FB_ATY128=y | ||
2371 | CONFIG_FB_ATY128_BACKLIGHT=y | ||
2372 | CONFIG_FB_ATY=y | ||
2373 | CONFIG_FB_ATY_CT=y | ||
2374 | CONFIG_FB_ATY_GENERIC_LCD=y | ||
2375 | CONFIG_FB_ATY_GX=y | ||
2376 | CONFIG_FB_ATY_BACKLIGHT=y | ||
2377 | CONFIG_FB_S3=m | ||
2378 | CONFIG_FB_SAVAGE=m | ||
2379 | CONFIG_FB_SAVAGE_I2C=y | ||
2380 | CONFIG_FB_SAVAGE_ACCEL=y | ||
2381 | # CONFIG_FB_SIS is not set | ||
2382 | CONFIG_FB_NEOMAGIC=m | ||
2383 | CONFIG_FB_KYRO=m | ||
2384 | CONFIG_FB_3DFX=m | ||
2385 | CONFIG_FB_3DFX_ACCEL=y | ||
2386 | CONFIG_FB_VOODOO1=m | ||
2387 | # CONFIG_FB_VT8623 is not set | ||
2388 | CONFIG_FB_TRIDENT=m | ||
2389 | CONFIG_FB_TRIDENT_ACCEL=y | ||
2390 | # CONFIG_FB_ARK is not set | ||
2391 | # CONFIG_FB_PM3 is not set | ||
2392 | # CONFIG_FB_FSL_DIU is not set | ||
2393 | CONFIG_FB_SM501=m | ||
2394 | CONFIG_FB_IBM_GXT4500=y | ||
2395 | # CONFIG_FB_VIRTUAL is not set | ||
2396 | CONFIG_BACKLIGHT_LCD_SUPPORT=y | ||
2397 | CONFIG_LCD_CLASS_DEVICE=m | ||
2398 | CONFIG_BACKLIGHT_CLASS_DEVICE=y | ||
2399 | # CONFIG_BACKLIGHT_CORGI is not set | ||
2400 | |||
2401 | # | ||
2402 | # Display device support | ||
2403 | # | ||
2404 | CONFIG_DISPLAY_SUPPORT=m | ||
2405 | |||
2406 | # | ||
2407 | # Display hardware drivers | ||
2408 | # | ||
2409 | |||
2410 | # | ||
2411 | # Console display driver support | ||
2412 | # | ||
2413 | CONFIG_VGA_CONSOLE=y | ||
2414 | CONFIG_VGACON_SOFT_SCROLLBACK=y | ||
2415 | CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=64 | ||
2416 | # CONFIG_MDA_CONSOLE is not set | ||
2417 | CONFIG_DUMMY_CONSOLE=y | ||
2418 | CONFIG_FRAMEBUFFER_CONSOLE=y | ||
2419 | CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y | ||
2420 | CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y | ||
2421 | # CONFIG_FONTS is not set | ||
2422 | CONFIG_FONT_8x8=y | ||
2423 | CONFIG_FONT_8x16=y | ||
2424 | CONFIG_LOGO=y | ||
2425 | # CONFIG_LOGO_LINUX_MONO is not set | ||
2426 | # CONFIG_LOGO_LINUX_VGA16 is not set | ||
2427 | CONFIG_LOGO_LINUX_CLUT224=y | ||
2428 | CONFIG_SOUND=m | ||
2429 | CONFIG_SND=m | ||
2430 | CONFIG_SND_TIMER=m | ||
2431 | CONFIG_SND_PCM=m | ||
2432 | CONFIG_SND_HWDEP=m | ||
2433 | CONFIG_SND_RAWMIDI=m | ||
2434 | CONFIG_SND_SEQUENCER=m | ||
2435 | CONFIG_SND_SEQ_DUMMY=m | ||
2436 | CONFIG_SND_OSSEMUL=y | ||
2437 | CONFIG_SND_MIXER_OSS=m | ||
2438 | CONFIG_SND_PCM_OSS=m | ||
2439 | CONFIG_SND_PCM_OSS_PLUGINS=y | ||
2440 | CONFIG_SND_SEQUENCER_OSS=y | ||
2441 | CONFIG_SND_DYNAMIC_MINORS=y | ||
2442 | # CONFIG_SND_SUPPORT_OLD_API is not set | ||
2443 | CONFIG_SND_VERBOSE_PROCFS=y | ||
2444 | CONFIG_SND_VERBOSE_PRINTK=y | ||
2445 | CONFIG_SND_DEBUG=y | ||
2446 | CONFIG_SND_DEBUG_VERBOSE=y | ||
2447 | CONFIG_SND_PCM_XRUN_DEBUG=y | ||
2448 | CONFIG_SND_VMASTER=y | ||
2449 | CONFIG_SND_MPU401_UART=m | ||
2450 | CONFIG_SND_OPL3_LIB=m | ||
2451 | CONFIG_SND_VX_LIB=m | ||
2452 | CONFIG_SND_AC97_CODEC=m | ||
2453 | CONFIG_SND_DRIVERS=y | ||
2454 | CONFIG_SND_DUMMY=m | ||
2455 | CONFIG_SND_VIRMIDI=m | ||
2456 | CONFIG_SND_MTPAV=m | ||
2457 | CONFIG_SND_MTS64=m | ||
2458 | CONFIG_SND_SERIAL_U16550=m | ||
2459 | CONFIG_SND_MPU401=m | ||
2460 | CONFIG_SND_PORTMAN2X4=m | ||
2461 | CONFIG_SND_AC97_POWER_SAVE=y | ||
2462 | CONFIG_SND_AC97_POWER_SAVE_DEFAULT=5 | ||
2463 | CONFIG_SND_SB_COMMON=m | ||
2464 | CONFIG_SND_SB16_DSP=m | ||
2465 | CONFIG_SND_ISA=y | ||
2466 | # CONFIG_SND_ADLIB is not set | ||
2467 | # CONFIG_SND_AD1816A is not set | ||
2468 | # CONFIG_SND_AD1848 is not set | ||
2469 | # CONFIG_SND_ALS100 is not set | ||
2470 | # CONFIG_SND_AZT2320 is not set | ||
2471 | # CONFIG_SND_CMI8330 is not set | ||
2472 | # CONFIG_SND_CS4231 is not set | ||
2473 | # CONFIG_SND_CS4232 is not set | ||
2474 | # CONFIG_SND_CS4236 is not set | ||
2475 | # CONFIG_SND_DT019X is not set | ||
2476 | # CONFIG_SND_ES968 is not set | ||
2477 | # CONFIG_SND_ES1688 is not set | ||
2478 | # CONFIG_SND_ES18XX is not set | ||
2479 | # CONFIG_SND_SC6000 is not set | ||
2480 | # CONFIG_SND_GUSCLASSIC is not set | ||
2481 | # CONFIG_SND_GUSEXTREME is not set | ||
2482 | # CONFIG_SND_GUSMAX is not set | ||
2483 | # CONFIG_SND_INTERWAVE is not set | ||
2484 | # CONFIG_SND_INTERWAVE_STB is not set | ||
2485 | # CONFIG_SND_OPL3SA2 is not set | ||
2486 | # CONFIG_SND_OPTI92X_AD1848 is not set | ||
2487 | # CONFIG_SND_OPTI92X_CS4231 is not set | ||
2488 | # CONFIG_SND_OPTI93X is not set | ||
2489 | # CONFIG_SND_MIRO is not set | ||
2490 | # CONFIG_SND_SB8 is not set | ||
2491 | # CONFIG_SND_SB16 is not set | ||
2492 | # CONFIG_SND_SBAWE is not set | ||
2493 | # CONFIG_SND_SGALAXY is not set | ||
2494 | # CONFIG_SND_SSCAPE is not set | ||
2495 | # CONFIG_SND_WAVEFRONT is not set | ||
2496 | CONFIG_SND_PCI=y | ||
2497 | CONFIG_SND_AD1889=m | ||
2498 | CONFIG_SND_ALS300=m | ||
2499 | CONFIG_SND_ALS4000=m | ||
2500 | CONFIG_SND_ALI5451=m | ||
2501 | CONFIG_SND_ATIIXP=m | ||
2502 | CONFIG_SND_ATIIXP_MODEM=m | ||
2503 | CONFIG_SND_AU8810=m | ||
2504 | CONFIG_SND_AU8820=m | ||
2505 | CONFIG_SND_AU8830=m | ||
2506 | CONFIG_SND_AW2=m | ||
2507 | CONFIG_SND_AZT3328=m | ||
2508 | CONFIG_SND_BT87X=m | ||
2509 | # CONFIG_SND_BT87X_OVERCLOCK is not set | ||
2510 | CONFIG_SND_CA0106=m | ||
2511 | CONFIG_SND_CMIPCI=m | ||
2512 | CONFIG_SND_OXYGEN_LIB=m | ||
2513 | CONFIG_SND_OXYGEN=m | ||
2514 | CONFIG_SND_CS4281=m | ||
2515 | CONFIG_SND_CS46XX=m | ||
2516 | CONFIG_SND_CS46XX_NEW_DSP=y | ||
2517 | CONFIG_SND_CS5530=m | ||
2518 | CONFIG_SND_DARLA20=m | ||
2519 | CONFIG_SND_GINA20=m | ||
2520 | CONFIG_SND_LAYLA20=m | ||
2521 | CONFIG_SND_DARLA24=m | ||
2522 | CONFIG_SND_GINA24=m | ||
2523 | CONFIG_SND_LAYLA24=m | ||
2524 | CONFIG_SND_MONA=m | ||
2525 | CONFIG_SND_MIA=m | ||
2526 | CONFIG_SND_ECHO3G=m | ||
2527 | CONFIG_SND_INDIGO=m | ||
2528 | CONFIG_SND_INDIGOIO=m | ||
2529 | CONFIG_SND_INDIGODJ=m | ||
2530 | CONFIG_SND_EMU10K1=m | ||
2531 | CONFIG_SND_EMU10K1X=m | ||
2532 | CONFIG_SND_ENS1370=m | ||
2533 | CONFIG_SND_ENS1371=m | ||
2534 | CONFIG_SND_ES1938=m | ||
2535 | CONFIG_SND_ES1968=m | ||
2536 | CONFIG_SND_FM801=m | ||
2537 | CONFIG_SND_FM801_TEA575X_BOOL=y | ||
2538 | CONFIG_SND_FM801_TEA575X=m | ||
2539 | # CONFIG_SND_HDA_INTEL is not set | ||
2540 | CONFIG_SND_HDSP=m | ||
2541 | CONFIG_SND_HDSPM=m | ||
2542 | CONFIG_SND_HIFIER=m | ||
2543 | CONFIG_SND_ICE1712=m | ||
2544 | CONFIG_SND_ICE1724=m | ||
2545 | # CONFIG_SND_INTEL8X0 is not set | ||
2546 | # CONFIG_SND_INTEL8X0M is not set | ||
2547 | CONFIG_SND_KORG1212=m | ||
2548 | CONFIG_SND_MAESTRO3=m | ||
2549 | CONFIG_SND_MIXART=m | ||
2550 | CONFIG_SND_NM256=m | ||
2551 | CONFIG_SND_PCXHR=m | ||
2552 | CONFIG_SND_RIPTIDE=m | ||
2553 | CONFIG_SND_RME32=m | ||
2554 | CONFIG_SND_RME96=m | ||
2555 | CONFIG_SND_RME9652=m | ||
2556 | CONFIG_SND_SONICVIBES=m | ||
2557 | CONFIG_SND_TRIDENT=m | ||
2558 | CONFIG_SND_VIA82XX=m | ||
2559 | CONFIG_SND_VIA82XX_MODEM=m | ||
2560 | CONFIG_SND_VIRTUOSO=m | ||
2561 | CONFIG_SND_VX222=m | ||
2562 | # CONFIG_SND_YMFPCI is not set | ||
2563 | CONFIG_SND_PPC=y | ||
2564 | CONFIG_SND_POWERMAC=m | ||
2565 | CONFIG_SND_POWERMAC_AUTO_DRC=y | ||
2566 | CONFIG_SND_AOA=m | ||
2567 | CONFIG_SND_AOA_FABRIC_LAYOUT=m | ||
2568 | CONFIG_SND_AOA_ONYX=m | ||
2569 | CONFIG_SND_AOA_TAS=m | ||
2570 | CONFIG_SND_AOA_TOONIE=m | ||
2571 | CONFIG_SND_AOA_SOUNDBUS=m | ||
2572 | CONFIG_SND_AOA_SOUNDBUS_I2S=m | ||
2573 | CONFIG_SND_USB=y | ||
2574 | CONFIG_SND_USB_AUDIO=m | ||
2575 | CONFIG_SND_USB_USX2Y=m | ||
2576 | CONFIG_SND_USB_CAIAQ=m | ||
2577 | CONFIG_SND_USB_CAIAQ_INPUT=y | ||
2578 | # CONFIG_SND_PCMCIA is not set | ||
2579 | # CONFIG_SND_SOC is not set | ||
2580 | # CONFIG_SOUND_PRIME is not set | ||
2581 | CONFIG_AC97_BUS=m | ||
2582 | CONFIG_HID_SUPPORT=y | ||
2583 | CONFIG_HID=y | ||
2584 | CONFIG_HID_DEBUG=y | ||
2585 | CONFIG_HIDRAW=y | ||
2586 | |||
2587 | # | ||
2588 | # USB Input Devices | ||
2589 | # | ||
2590 | CONFIG_USB_HID=y | ||
2591 | CONFIG_USB_HIDINPUT_POWERBOOK=y | ||
2592 | CONFIG_HID_FF=y | ||
2593 | CONFIG_HID_PID=y | ||
2594 | CONFIG_LOGITECH_FF=y | ||
2595 | CONFIG_LOGIRUMBLEPAD2_FF=y | ||
2596 | CONFIG_PANTHERLORD_FF=y | ||
2597 | CONFIG_THRUSTMASTER_FF=y | ||
2598 | CONFIG_ZEROPLUS_FF=y | ||
2599 | CONFIG_USB_HIDDEV=y | ||
2600 | CONFIG_USB_SUPPORT=y | ||
2601 | CONFIG_USB_ARCH_HAS_HCD=y | ||
2602 | CONFIG_USB_ARCH_HAS_OHCI=y | ||
2603 | CONFIG_USB_ARCH_HAS_EHCI=y | ||
2604 | CONFIG_USB=y | ||
2605 | CONFIG_USB_DEBUG=y | ||
2606 | CONFIG_USB_ANNOUNCE_NEW_DEVICES=y | ||
2607 | |||
2608 | # | ||
2609 | # Miscellaneous USB options | ||
2610 | # | ||
2611 | CONFIG_USB_DEVICEFS=y | ||
2612 | # CONFIG_USB_DEVICE_CLASS is not set | ||
2613 | # CONFIG_USB_DYNAMIC_MINORS is not set | ||
2614 | CONFIG_USB_SUSPEND=y | ||
2615 | # CONFIG_USB_OTG is not set | ||
2616 | |||
2617 | # | ||
2618 | # USB Host Controller Drivers | ||
2619 | # | ||
2620 | # CONFIG_USB_C67X00_HCD is not set | ||
2621 | CONFIG_USB_EHCI_HCD=m | ||
2622 | CONFIG_USB_EHCI_ROOT_HUB_TT=y | ||
2623 | CONFIG_USB_EHCI_TT_NEWSCHED=y | ||
2624 | CONFIG_USB_EHCI_FSL=y | ||
2625 | CONFIG_USB_EHCI_HCD_PPC_OF=y | ||
2626 | # CONFIG_USB_ISP116X_HCD is not set | ||
2627 | # CONFIG_USB_ISP1760_HCD is not set | ||
2628 | CONFIG_USB_OHCI_HCD=m | ||
2629 | CONFIG_USB_OHCI_HCD_PPC_SOC=y | ||
2630 | CONFIG_USB_OHCI_HCD_PPC_OF=y | ||
2631 | CONFIG_USB_OHCI_HCD_PPC_OF_BE=y | ||
2632 | CONFIG_USB_OHCI_HCD_PPC_OF_LE=y | ||
2633 | CONFIG_USB_OHCI_HCD_PCI=y | ||
2634 | # CONFIG_USB_OHCI_HCD_SSB is not set | ||
2635 | CONFIG_USB_OHCI_BIG_ENDIAN_DESC=y | ||
2636 | CONFIG_USB_OHCI_BIG_ENDIAN_MMIO=y | ||
2637 | CONFIG_USB_OHCI_LITTLE_ENDIAN=y | ||
2638 | CONFIG_USB_UHCI_HCD=m | ||
2639 | CONFIG_USB_U132_HCD=m | ||
2640 | CONFIG_USB_SL811_HCD=m | ||
2641 | # CONFIG_USB_SL811_CS is not set | ||
2642 | # CONFIG_USB_R8A66597_HCD is not set | ||
2643 | |||
2644 | # | ||
2645 | # USB Device Class drivers | ||
2646 | # | ||
2647 | CONFIG_USB_ACM=m | ||
2648 | CONFIG_USB_PRINTER=m | ||
2649 | CONFIG_USB_WDM=m | ||
2650 | |||
2651 | # | ||
2652 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | ||
2653 | # | ||
2654 | |||
2655 | # | ||
2656 | # may also be needed; see USB_STORAGE Help for more information | ||
2657 | # | ||
2658 | CONFIG_USB_STORAGE=m | ||
2659 | # CONFIG_USB_STORAGE_DEBUG is not set | ||
2660 | CONFIG_USB_STORAGE_DATAFAB=y | ||
2661 | CONFIG_USB_STORAGE_FREECOM=y | ||
2662 | # CONFIG_USB_STORAGE_ISD200 is not set | ||
2663 | CONFIG_USB_STORAGE_DPCM=y | ||
2664 | CONFIG_USB_STORAGE_USBAT=y | ||
2665 | CONFIG_USB_STORAGE_SDDR09=y | ||
2666 | CONFIG_USB_STORAGE_SDDR55=y | ||
2667 | CONFIG_USB_STORAGE_JUMPSHOT=y | ||
2668 | CONFIG_USB_STORAGE_ALAUDA=y | ||
2669 | CONFIG_USB_STORAGE_ONETOUCH=y | ||
2670 | CONFIG_USB_STORAGE_KARMA=y | ||
2671 | CONFIG_USB_STORAGE_CYPRESS_ATACB=y | ||
2672 | # CONFIG_USB_LIBUSUAL is not set | ||
2673 | |||
2674 | # | ||
2675 | # USB Imaging devices | ||
2676 | # | ||
2677 | CONFIG_USB_MDC800=m | ||
2678 | CONFIG_USB_MICROTEK=m | ||
2679 | CONFIG_USB_MON=y | ||
2680 | |||
2681 | # | ||
2682 | # USB port drivers | ||
2683 | # | ||
2684 | CONFIG_USB_USS720=m | ||
2685 | CONFIG_USB_SERIAL=m | ||
2686 | CONFIG_USB_EZUSB=y | ||
2687 | CONFIG_USB_SERIAL_GENERIC=y | ||
2688 | CONFIG_USB_SERIAL_AIRCABLE=m | ||
2689 | CONFIG_USB_SERIAL_AIRPRIME=m | ||
2690 | CONFIG_USB_SERIAL_ARK3116=m | ||
2691 | CONFIG_USB_SERIAL_BELKIN=m | ||
2692 | CONFIG_USB_SERIAL_CH341=m | ||
2693 | CONFIG_USB_SERIAL_WHITEHEAT=m | ||
2694 | CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m | ||
2695 | CONFIG_USB_SERIAL_CP2101=m | ||
2696 | CONFIG_USB_SERIAL_CYPRESS_M8=m | ||
2697 | CONFIG_USB_SERIAL_EMPEG=m | ||
2698 | CONFIG_USB_SERIAL_FTDI_SIO=m | ||
2699 | CONFIG_USB_SERIAL_FUNSOFT=m | ||
2700 | CONFIG_USB_SERIAL_VISOR=m | ||
2701 | CONFIG_USB_SERIAL_IPAQ=m | ||
2702 | CONFIG_USB_SERIAL_IR=m | ||
2703 | CONFIG_USB_SERIAL_EDGEPORT=m | ||
2704 | CONFIG_USB_SERIAL_EDGEPORT_TI=m | ||
2705 | # CONFIG_USB_SERIAL_GARMIN is not set | ||
2706 | CONFIG_USB_SERIAL_IPW=m | ||
2707 | CONFIG_USB_SERIAL_IUU=m | ||
2708 | CONFIG_USB_SERIAL_KEYSPAN_PDA=m | ||
2709 | CONFIG_USB_SERIAL_KEYSPAN=m | ||
2710 | CONFIG_USB_SERIAL_KLSI=m | ||
2711 | CONFIG_USB_SERIAL_KOBIL_SCT=m | ||
2712 | CONFIG_USB_SERIAL_MCT_U232=m | ||
2713 | CONFIG_USB_SERIAL_MOS7720=m | ||
2714 | CONFIG_USB_SERIAL_MOS7840=m | ||
2715 | CONFIG_USB_SERIAL_MOTOROLA=m | ||
2716 | CONFIG_USB_SERIAL_NAVMAN=m | ||
2717 | CONFIG_USB_SERIAL_PL2303=m | ||
2718 | CONFIG_USB_SERIAL_OTI6858=m | ||
2719 | CONFIG_USB_SERIAL_SPCP8X5=m | ||
2720 | CONFIG_USB_SERIAL_HP4X=m | ||
2721 | CONFIG_USB_SERIAL_SAFE=m | ||
2722 | CONFIG_USB_SERIAL_SAFE_PADDED=y | ||
2723 | CONFIG_USB_SERIAL_SIERRAWIRELESS=m | ||
2724 | CONFIG_USB_SERIAL_TI=m | ||
2725 | CONFIG_USB_SERIAL_CYBERJACK=m | ||
2726 | CONFIG_USB_SERIAL_XIRCOM=m | ||
2727 | CONFIG_USB_SERIAL_OPTION=m | ||
2728 | CONFIG_USB_SERIAL_OMNINET=m | ||
2729 | CONFIG_USB_SERIAL_DEBUG=m | ||
2730 | |||
2731 | # | ||
2732 | # USB Miscellaneous drivers | ||
2733 | # | ||
2734 | CONFIG_USB_EMI62=m | ||
2735 | CONFIG_USB_EMI26=m | ||
2736 | CONFIG_USB_ADUTUX=m | ||
2737 | CONFIG_USB_AUERSWALD=m | ||
2738 | # CONFIG_USB_RIO500 is not set | ||
2739 | CONFIG_USB_LEGOTOWER=m | ||
2740 | CONFIG_USB_LCD=m | ||
2741 | CONFIG_USB_BERRY_CHARGE=m | ||
2742 | CONFIG_USB_LED=m | ||
2743 | # CONFIG_USB_CYPRESS_CY7C63 is not set | ||
2744 | # CONFIG_USB_CYTHERM is not set | ||
2745 | CONFIG_USB_PHIDGET=m | ||
2746 | CONFIG_USB_PHIDGETKIT=m | ||
2747 | CONFIG_USB_PHIDGETMOTORCONTROL=m | ||
2748 | CONFIG_USB_PHIDGETSERVO=m | ||
2749 | CONFIG_USB_IDMOUSE=m | ||
2750 | CONFIG_USB_FTDI_ELAN=m | ||
2751 | CONFIG_USB_APPLEDISPLAY=m | ||
2752 | CONFIG_USB_SISUSBVGA=m | ||
2753 | CONFIG_USB_SISUSBVGA_CON=y | ||
2754 | CONFIG_USB_LD=m | ||
2755 | CONFIG_USB_TRANCEVIBRATOR=m | ||
2756 | CONFIG_USB_IOWARRIOR=m | ||
2757 | # CONFIG_USB_TEST is not set | ||
2758 | CONFIG_USB_ISIGHTFW=m | ||
2759 | CONFIG_USB_ATM=m | ||
2760 | CONFIG_USB_SPEEDTOUCH=m | ||
2761 | CONFIG_USB_CXACRU=m | ||
2762 | CONFIG_USB_UEAGLEATM=m | ||
2763 | CONFIG_USB_XUSBATM=m | ||
2764 | # CONFIG_USB_GADGET is not set | ||
2765 | # CONFIG_MMC is not set | ||
2766 | # CONFIG_MEMSTICK is not set | ||
2767 | CONFIG_NEW_LEDS=y | ||
2768 | CONFIG_LEDS_CLASS=y | ||
2769 | |||
2770 | # | ||
2771 | # LED drivers | ||
2772 | # | ||
2773 | # CONFIG_LEDS_GPIO is not set | ||
2774 | |||
2775 | # | ||
2776 | # LED Triggers | ||
2777 | # | ||
2778 | CONFIG_LEDS_TRIGGERS=y | ||
2779 | CONFIG_LEDS_TRIGGER_TIMER=m | ||
2780 | CONFIG_LEDS_TRIGGER_IDE_DISK=y | ||
2781 | CONFIG_LEDS_TRIGGER_HEARTBEAT=m | ||
2782 | CONFIG_LEDS_TRIGGER_DEFAULT_ON=m | ||
2783 | CONFIG_ACCESSIBILITY=y | ||
2784 | CONFIG_A11Y_BRAILLE_CONSOLE=y | ||
2785 | # CONFIG_INFINIBAND is not set | ||
2786 | CONFIG_EDAC=y | ||
2787 | |||
2788 | # | ||
2789 | # Reporting subsystems | ||
2790 | # | ||
2791 | # CONFIG_EDAC_DEBUG is not set | ||
2792 | CONFIG_EDAC_MM_EDAC=m | ||
2793 | CONFIG_RTC_LIB=y | ||
2794 | CONFIG_RTC_CLASS=y | ||
2795 | # CONFIG_RTC_HCTOSYS is not set | ||
2796 | # CONFIG_RTC_DEBUG is not set | ||
2797 | |||
2798 | # | ||
2799 | # RTC interfaces | ||
2800 | # | ||
2801 | CONFIG_RTC_INTF_SYSFS=y | ||
2802 | CONFIG_RTC_INTF_PROC=y | ||
2803 | CONFIG_RTC_INTF_DEV=y | ||
2804 | # CONFIG_RTC_INTF_DEV_UIE_EMUL is not set | ||
2805 | # CONFIG_RTC_DRV_TEST is not set | ||
2806 | |||
2807 | # | ||
2808 | # I2C RTC drivers | ||
2809 | # | ||
2810 | CONFIG_RTC_DRV_DS1307=m | ||
2811 | CONFIG_RTC_DRV_DS1374=m | ||
2812 | CONFIG_RTC_DRV_DS1672=m | ||
2813 | CONFIG_RTC_DRV_MAX6900=m | ||
2814 | CONFIG_RTC_DRV_RS5C372=m | ||
2815 | CONFIG_RTC_DRV_ISL1208=m | ||
2816 | CONFIG_RTC_DRV_X1205=m | ||
2817 | CONFIG_RTC_DRV_PCF8563=m | ||
2818 | CONFIG_RTC_DRV_PCF8583=m | ||
2819 | CONFIG_RTC_DRV_M41T80=m | ||
2820 | CONFIG_RTC_DRV_M41T80_WDT=y | ||
2821 | # CONFIG_RTC_DRV_S35390A is not set | ||
2822 | CONFIG_RTC_DRV_FM3130=m | ||
2823 | |||
2824 | # | ||
2825 | # SPI RTC drivers | ||
2826 | # | ||
2827 | |||
2828 | # | ||
2829 | # Platform RTC drivers | ||
2830 | # | ||
2831 | CONFIG_RTC_DRV_CMOS=y | ||
2832 | CONFIG_RTC_DRV_DS1511=m | ||
2833 | CONFIG_RTC_DRV_DS1553=m | ||
2834 | CONFIG_RTC_DRV_DS1742=m | ||
2835 | CONFIG_RTC_DRV_STK17TA8=m | ||
2836 | # CONFIG_RTC_DRV_M48T86 is not set | ||
2837 | CONFIG_RTC_DRV_M48T59=m | ||
2838 | CONFIG_RTC_DRV_V3020=m | ||
2839 | |||
2840 | # | ||
2841 | # on-CPU RTC drivers | ||
2842 | # | ||
2843 | CONFIG_RTC_DRV_PPC=y | ||
2844 | CONFIG_DMADEVICES=y | ||
2845 | |||
2846 | # | ||
2847 | # DMA Devices | ||
2848 | # | ||
2849 | # CONFIG_FSL_DMA is not set | ||
2850 | CONFIG_AUXDISPLAY=y | ||
2851 | CONFIG_KS0108=m | ||
2852 | CONFIG_KS0108_PORT=0x378 | ||
2853 | CONFIG_KS0108_DELAY=2 | ||
2854 | CONFIG_UIO=m | ||
2855 | CONFIG_UIO_CIF=m | ||
2856 | CONFIG_UIO_SMX=m | ||
2857 | |||
2858 | # | ||
2859 | # File systems | ||
2860 | # | ||
2861 | CONFIG_EXT2_FS=m | ||
2862 | CONFIG_EXT2_FS_XATTR=y | ||
2863 | CONFIG_EXT2_FS_POSIX_ACL=y | ||
2864 | CONFIG_EXT2_FS_SECURITY=y | ||
2865 | CONFIG_EXT2_FS_XIP=y | ||
2866 | CONFIG_FS_XIP=y | ||
2867 | CONFIG_EXT3_FS=m | ||
2868 | CONFIG_EXT3_FS_XATTR=y | ||
2869 | CONFIG_EXT3_FS_POSIX_ACL=y | ||
2870 | CONFIG_EXT3_FS_SECURITY=y | ||
2871 | CONFIG_EXT4DEV_FS=m | ||
2872 | CONFIG_EXT4DEV_FS_XATTR=y | ||
2873 | CONFIG_EXT4DEV_FS_POSIX_ACL=y | ||
2874 | CONFIG_EXT4DEV_FS_SECURITY=y | ||
2875 | CONFIG_JBD=m | ||
2876 | # CONFIG_JBD_DEBUG is not set | ||
2877 | CONFIG_JBD2=m | ||
2878 | CONFIG_JBD2_DEBUG=y | ||
2879 | CONFIG_FS_MBCACHE=m | ||
2880 | CONFIG_REISERFS_FS=m | ||
2881 | # CONFIG_REISERFS_CHECK is not set | ||
2882 | CONFIG_REISERFS_PROC_INFO=y | ||
2883 | CONFIG_REISERFS_FS_XATTR=y | ||
2884 | CONFIG_REISERFS_FS_POSIX_ACL=y | ||
2885 | CONFIG_REISERFS_FS_SECURITY=y | ||
2886 | CONFIG_JFS_FS=m | ||
2887 | CONFIG_JFS_POSIX_ACL=y | ||
2888 | CONFIG_JFS_SECURITY=y | ||
2889 | # CONFIG_JFS_DEBUG is not set | ||
2890 | # CONFIG_JFS_STATISTICS is not set | ||
2891 | CONFIG_FS_POSIX_ACL=y | ||
2892 | CONFIG_XFS_FS=m | ||
2893 | CONFIG_XFS_QUOTA=y | ||
2894 | CONFIG_XFS_POSIX_ACL=y | ||
2895 | # CONFIG_XFS_RT is not set | ||
2896 | # CONFIG_XFS_DEBUG is not set | ||
2897 | CONFIG_GFS2_FS=m | ||
2898 | CONFIG_GFS2_FS_LOCKING_DLM=m | ||
2899 | CONFIG_OCFS2_FS=m | ||
2900 | CONFIG_OCFS2_FS_O2CB=m | ||
2901 | CONFIG_OCFS2_FS_USERSPACE_CLUSTER=m | ||
2902 | # CONFIG_OCFS2_DEBUG_MASKLOG is not set | ||
2903 | # CONFIG_OCFS2_DEBUG_FS is not set | ||
2904 | CONFIG_DNOTIFY=y | ||
2905 | CONFIG_INOTIFY=y | ||
2906 | CONFIG_INOTIFY_USER=y | ||
2907 | CONFIG_QUOTA=y | ||
2908 | CONFIG_QUOTA_NETLINK_INTERFACE=y | ||
2909 | # CONFIG_PRINT_QUOTA_WARNING is not set | ||
2910 | # CONFIG_QFMT_V1 is not set | ||
2911 | CONFIG_QFMT_V2=y | ||
2912 | CONFIG_QUOTACTL=y | ||
2913 | CONFIG_AUTOFS_FS=m | ||
2914 | CONFIG_AUTOFS4_FS=m | ||
2915 | CONFIG_FUSE_FS=m | ||
2916 | CONFIG_GENERIC_ACL=y | ||
2917 | |||
2918 | # | ||
2919 | # CD-ROM/DVD Filesystems | ||
2920 | # | ||
2921 | CONFIG_ISO9660_FS=y | ||
2922 | CONFIG_JOLIET=y | ||
2923 | CONFIG_ZISOFS=y | ||
2924 | CONFIG_UDF_FS=m | ||
2925 | CONFIG_UDF_NLS=y | ||
2926 | |||
2927 | # | ||
2928 | # DOS/FAT/NT Filesystems | ||
2929 | # | ||
2930 | CONFIG_FAT_FS=m | ||
2931 | CONFIG_MSDOS_FS=m | ||
2932 | CONFIG_VFAT_FS=m | ||
2933 | CONFIG_FAT_DEFAULT_CODEPAGE=437 | ||
2934 | CONFIG_FAT_DEFAULT_IOCHARSET="ascii" | ||
2935 | # CONFIG_NTFS_FS is not set | ||
2936 | |||
2937 | # | ||
2938 | # Pseudo filesystems | ||
2939 | # | ||
2940 | CONFIG_PROC_FS=y | ||
2941 | CONFIG_PROC_KCORE=y | ||
2942 | CONFIG_PROC_SYSCTL=y | ||
2943 | CONFIG_SYSFS=y | ||
2944 | CONFIG_TMPFS=y | ||
2945 | CONFIG_TMPFS_POSIX_ACL=y | ||
2946 | # CONFIG_HUGETLB_PAGE is not set | ||
2947 | CONFIG_CONFIGFS_FS=m | ||
2948 | |||
2949 | # | ||
2950 | # Miscellaneous filesystems | ||
2951 | # | ||
2952 | # CONFIG_ADFS_FS is not set | ||
2953 | CONFIG_AFFS_FS=m | ||
2954 | CONFIG_ECRYPT_FS=m | ||
2955 | CONFIG_HFS_FS=m | ||
2956 | CONFIG_HFSPLUS_FS=m | ||
2957 | CONFIG_BEFS_FS=m | ||
2958 | # CONFIG_BEFS_DEBUG is not set | ||
2959 | CONFIG_BFS_FS=m | ||
2960 | CONFIG_EFS_FS=m | ||
2961 | CONFIG_CRAMFS=m | ||
2962 | CONFIG_SQUASHFS=m | ||
2963 | # CONFIG_SQUASHFS_EMBEDDED is not set | ||
2964 | CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3 | ||
2965 | CONFIG_VXFS_FS=m | ||
2966 | CONFIG_MINIX_FS=m | ||
2967 | # CONFIG_HPFS_FS is not set | ||
2968 | CONFIG_QNX4FS_FS=m | ||
2969 | CONFIG_ROMFS_FS=m | ||
2970 | CONFIG_SYSV_FS=m | ||
2971 | CONFIG_UFS_FS=m | ||
2972 | # CONFIG_UFS_FS_WRITE is not set | ||
2973 | # CONFIG_UFS_DEBUG is not set | ||
2974 | CONFIG_NETWORK_FILESYSTEMS=y | ||
2975 | CONFIG_NFS_FS=m | ||
2976 | CONFIG_NFS_V3=y | ||
2977 | CONFIG_NFS_V3_ACL=y | ||
2978 | CONFIG_NFS_V4=y | ||
2979 | CONFIG_NFSD=m | ||
2980 | CONFIG_NFSD_V2_ACL=y | ||
2981 | CONFIG_NFSD_V3=y | ||
2982 | CONFIG_NFSD_V3_ACL=y | ||
2983 | CONFIG_NFSD_V4=y | ||
2984 | CONFIG_LOCKD=m | ||
2985 | CONFIG_LOCKD_V4=y | ||
2986 | CONFIG_EXPORTFS=m | ||
2987 | CONFIG_NFS_ACL_SUPPORT=m | ||
2988 | CONFIG_NFS_COMMON=y | ||
2989 | CONFIG_SUNRPC=m | ||
2990 | CONFIG_SUNRPC_GSS=m | ||
2991 | CONFIG_SUNRPC_BIND34=y | ||
2992 | CONFIG_RPCSEC_GSS_KRB5=m | ||
2993 | CONFIG_RPCSEC_GSS_SPKM3=m | ||
2994 | # CONFIG_SMB_FS is not set | ||
2995 | CONFIG_CIFS=m | ||
2996 | # CONFIG_CIFS_STATS is not set | ||
2997 | CONFIG_CIFS_WEAK_PW_HASH=y | ||
2998 | CONFIG_CIFS_XATTR=y | ||
2999 | CONFIG_CIFS_POSIX=y | ||
3000 | # CONFIG_CIFS_DEBUG2 is not set | ||
3001 | CONFIG_CIFS_EXPERIMENTAL=y | ||
3002 | CONFIG_CIFS_UPCALL=y | ||
3003 | CONFIG_CIFS_DFS_UPCALL=y | ||
3004 | CONFIG_NCP_FS=m | ||
3005 | CONFIG_NCPFS_PACKET_SIGNING=y | ||
3006 | CONFIG_NCPFS_IOCTL_LOCKING=y | ||
3007 | CONFIG_NCPFS_STRONG=y | ||
3008 | CONFIG_NCPFS_NFS_NS=y | ||
3009 | CONFIG_NCPFS_OS2_NS=y | ||
3010 | CONFIG_NCPFS_SMALLDOS=y | ||
3011 | CONFIG_NCPFS_NLS=y | ||
3012 | CONFIG_NCPFS_EXTRAS=y | ||
3013 | CONFIG_CODA_FS=m | ||
3014 | # CONFIG_CODA_FS_OLD_API is not set | ||
3015 | # CONFIG_AFS_FS is not set | ||
3016 | CONFIG_9P_FS=m | ||
3017 | |||
3018 | # | ||
3019 | # Partition Types | ||
3020 | # | ||
3021 | CONFIG_PARTITION_ADVANCED=y | ||
3022 | # CONFIG_ACORN_PARTITION is not set | ||
3023 | CONFIG_OSF_PARTITION=y | ||
3024 | CONFIG_AMIGA_PARTITION=y | ||
3025 | # CONFIG_ATARI_PARTITION is not set | ||
3026 | CONFIG_MAC_PARTITION=y | ||
3027 | CONFIG_MSDOS_PARTITION=y | ||
3028 | CONFIG_BSD_DISKLABEL=y | ||
3029 | CONFIG_MINIX_SUBPARTITION=y | ||
3030 | CONFIG_SOLARIS_X86_PARTITION=y | ||
3031 | CONFIG_UNIXWARE_DISKLABEL=y | ||
3032 | # CONFIG_LDM_PARTITION is not set | ||
3033 | CONFIG_SGI_PARTITION=y | ||
3034 | # CONFIG_ULTRIX_PARTITION is not set | ||
3035 | CONFIG_SUN_PARTITION=y | ||
3036 | CONFIG_KARMA_PARTITION=y | ||
3037 | CONFIG_EFI_PARTITION=y | ||
3038 | # CONFIG_SYSV68_PARTITION is not set | ||
3039 | CONFIG_NLS=y | ||
3040 | CONFIG_NLS_DEFAULT="utf8" | ||
3041 | CONFIG_NLS_CODEPAGE_437=y | ||
3042 | CONFIG_NLS_CODEPAGE_737=m | ||
3043 | CONFIG_NLS_CODEPAGE_775=m | ||
3044 | CONFIG_NLS_CODEPAGE_850=m | ||
3045 | CONFIG_NLS_CODEPAGE_852=m | ||
3046 | CONFIG_NLS_CODEPAGE_855=m | ||
3047 | CONFIG_NLS_CODEPAGE_857=m | ||
3048 | CONFIG_NLS_CODEPAGE_860=m | ||
3049 | CONFIG_NLS_CODEPAGE_861=m | ||
3050 | CONFIG_NLS_CODEPAGE_862=m | ||
3051 | CONFIG_NLS_CODEPAGE_863=m | ||
3052 | CONFIG_NLS_CODEPAGE_864=m | ||
3053 | CONFIG_NLS_CODEPAGE_865=m | ||
3054 | CONFIG_NLS_CODEPAGE_866=m | ||
3055 | CONFIG_NLS_CODEPAGE_869=m | ||
3056 | CONFIG_NLS_CODEPAGE_936=m | ||
3057 | CONFIG_NLS_CODEPAGE_950=m | ||
3058 | CONFIG_NLS_CODEPAGE_932=m | ||
3059 | CONFIG_NLS_CODEPAGE_949=m | ||
3060 | CONFIG_NLS_CODEPAGE_874=m | ||
3061 | CONFIG_NLS_ISO8859_8=m | ||
3062 | CONFIG_NLS_CODEPAGE_1250=m | ||
3063 | CONFIG_NLS_CODEPAGE_1251=m | ||
3064 | CONFIG_NLS_ASCII=y | ||
3065 | CONFIG_NLS_ISO8859_1=m | ||
3066 | CONFIG_NLS_ISO8859_2=m | ||
3067 | CONFIG_NLS_ISO8859_3=m | ||
3068 | CONFIG_NLS_ISO8859_4=m | ||
3069 | CONFIG_NLS_ISO8859_5=m | ||
3070 | CONFIG_NLS_ISO8859_6=m | ||
3071 | CONFIG_NLS_ISO8859_7=m | ||
3072 | CONFIG_NLS_ISO8859_9=m | ||
3073 | CONFIG_NLS_ISO8859_13=m | ||
3074 | CONFIG_NLS_ISO8859_14=m | ||
3075 | CONFIG_NLS_ISO8859_15=m | ||
3076 | CONFIG_NLS_KOI8_R=m | ||
3077 | CONFIG_NLS_KOI8_U=m | ||
3078 | CONFIG_NLS_UTF8=m | ||
3079 | CONFIG_DLM=m | ||
3080 | CONFIG_DLM_DEBUG=y | ||
3081 | CONFIG_QE_GPIO=y | ||
3082 | |||
3083 | # | ||
3084 | # Library routines | ||
3085 | # | ||
3086 | CONFIG_BITREVERSE=y | ||
3087 | # CONFIG_GENERIC_FIND_FIRST_BIT is not set | ||
3088 | CONFIG_CRC_CCITT=m | ||
3089 | CONFIG_CRC16=m | ||
3090 | CONFIG_CRC_T10DIF=m | ||
3091 | CONFIG_CRC_ITU_T=m | ||
3092 | CONFIG_CRC32=y | ||
3093 | # CONFIG_CRC7 is not set | ||
3094 | CONFIG_LIBCRC32C=m | ||
3095 | CONFIG_ZLIB_INFLATE=y | ||
3096 | CONFIG_ZLIB_DEFLATE=m | ||
3097 | CONFIG_LZO_COMPRESS=m | ||
3098 | CONFIG_LZO_DECOMPRESS=m | ||
3099 | CONFIG_TEXTSEARCH=y | ||
3100 | CONFIG_TEXTSEARCH_KMP=m | ||
3101 | CONFIG_TEXTSEARCH_BM=m | ||
3102 | CONFIG_TEXTSEARCH_FSM=m | ||
3103 | CONFIG_PLIST=y | ||
3104 | CONFIG_HAS_IOMEM=y | ||
3105 | CONFIG_HAS_IOPORT=y | ||
3106 | CONFIG_HAS_DMA=y | ||
3107 | CONFIG_HAVE_LMB=y | ||
3108 | |||
3109 | # | ||
3110 | # Kernel hacking | ||
3111 | # | ||
3112 | # CONFIG_PRINTK_TIME is not set | ||
3113 | # CONFIG_ENABLE_WARN_DEPRECATED is not set | ||
3114 | CONFIG_ENABLE_MUST_CHECK=y | ||
3115 | CONFIG_FRAME_WARN=1024 | ||
3116 | CONFIG_MAGIC_SYSRQ=y | ||
3117 | CONFIG_UNUSED_SYMBOLS=y | ||
3118 | CONFIG_DEBUG_FS=y | ||
3119 | CONFIG_HEADERS_CHECK=y | ||
3120 | CONFIG_DEBUG_KERNEL=y | ||
3121 | CONFIG_DEBUG_SHIRQ=y | ||
3122 | CONFIG_DETECT_SOFTLOCKUP=y | ||
3123 | CONFIG_SCHED_DEBUG=y | ||
3124 | CONFIG_SCHEDSTATS=y | ||
3125 | CONFIG_TIMER_STATS=y | ||
3126 | CONFIG_DEBUG_OBJECTS=y | ||
3127 | # CONFIG_DEBUG_OBJECTS_SELFTEST is not set | ||
3128 | CONFIG_DEBUG_OBJECTS_FREE=y | ||
3129 | CONFIG_DEBUG_OBJECTS_TIMERS=y | ||
3130 | CONFIG_SLUB_DEBUG_ON=y | ||
3131 | # CONFIG_SLUB_STATS is not set | ||
3132 | CONFIG_DEBUG_RT_MUTEXES=y | ||
3133 | CONFIG_DEBUG_PI_LIST=y | ||
3134 | # CONFIG_RT_MUTEX_TESTER is not set | ||
3135 | CONFIG_DEBUG_SPINLOCK=y | ||
3136 | CONFIG_DEBUG_MUTEXES=y | ||
3137 | CONFIG_DEBUG_SPINLOCK_SLEEP=y | ||
3138 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set | ||
3139 | CONFIG_STACKTRACE=y | ||
3140 | # CONFIG_DEBUG_KOBJECT is not set | ||
3141 | CONFIG_DEBUG_HIGHMEM=y | ||
3142 | CONFIG_DEBUG_BUGVERBOSE=y | ||
3143 | CONFIG_DEBUG_INFO=y | ||
3144 | CONFIG_DEBUG_VM=y | ||
3145 | CONFIG_DEBUG_WRITECOUNT=y | ||
3146 | CONFIG_DEBUG_LIST=y | ||
3147 | CONFIG_DEBUG_SG=y | ||
3148 | CONFIG_FRAME_POINTER=y | ||
3149 | CONFIG_BOOT_PRINTK_DELAY=y | ||
3150 | # CONFIG_RCU_TORTURE_TEST is not set | ||
3151 | # CONFIG_KPROBES_SANITY_TEST is not set | ||
3152 | # CONFIG_BACKTRACE_SELF_TEST is not set | ||
3153 | # CONFIG_LKDTM is not set | ||
3154 | CONFIG_FAULT_INJECTION=y | ||
3155 | CONFIG_FAILSLAB=y | ||
3156 | CONFIG_FAIL_PAGE_ALLOC=y | ||
3157 | CONFIG_FAIL_MAKE_REQUEST=y | ||
3158 | CONFIG_FAULT_INJECTION_DEBUG_FS=y | ||
3159 | CONFIG_FAULT_INJECTION_STACKTRACE_FILTER=y | ||
3160 | CONFIG_LATENCYTOP=y | ||
3161 | CONFIG_HAVE_FTRACE=y | ||
3162 | CONFIG_HAVE_DYNAMIC_FTRACE=y | ||
3163 | CONFIG_TRACER_MAX_TRACE=y | ||
3164 | CONFIG_TRACING=y | ||
3165 | CONFIG_FTRACE=y | ||
3166 | CONFIG_SCHED_TRACER=y | ||
3167 | CONFIG_CONTEXT_SWITCH_TRACER=y | ||
3168 | CONFIG_DYNAMIC_FTRACE=y | ||
3169 | # CONFIG_FTRACE_STARTUP_TEST is not set | ||
3170 | # CONFIG_FIREWIRE_OHCI_REMOTE_DMA is not set | ||
3171 | # CONFIG_SAMPLES is not set | ||
3172 | CONFIG_DEBUG_STACKOVERFLOW=y | ||
3173 | CONFIG_DEBUG_STACK_USAGE=y | ||
3174 | CONFIG_DEBUGGER=y | ||
3175 | # CONFIG_CODE_PATCHING_SELFTEST is not set | ||
3176 | # CONFIG_FTR_FIXUP_SELFTEST is not set | ||
3177 | # CONFIG_KGDB_CONSOLE is not set | ||
3178 | CONFIG_XMON=y | ||
3179 | # CONFIG_XMON_DEFAULT is not set | ||
3180 | CONFIG_XMON_DISASSEMBLY=y | ||
3181 | CONFIG_IRQSTACKS=y | ||
3182 | # CONFIG_VIRQ_DEBUG is not set | ||
3183 | # CONFIG_BDI_SWITCH is not set | ||
3184 | CONFIG_BOOTX_TEXT=y | ||
3185 | # CONFIG_PPC_EARLY_DEBUG is not set | ||
3186 | |||
3187 | # | ||
3188 | # Security options | ||
3189 | # | ||
3190 | CONFIG_KEYS=y | ||
3191 | CONFIG_KEYS_DEBUG_PROC_KEYS=y | ||
3192 | CONFIG_SECURITY=y | ||
3193 | CONFIG_SECURITY_NETWORK=y | ||
3194 | CONFIG_SECURITY_NETWORK_XFRM=y | ||
3195 | CONFIG_SECURITY_FILE_CAPABILITIES=y | ||
3196 | # CONFIG_SECURITY_ROOTPLUG is not set | ||
3197 | CONFIG_SECURITY_DEFAULT_MMAP_MIN_ADDR=65536 | ||
3198 | CONFIG_SECURITY_SELINUX=y | ||
3199 | CONFIG_SECURITY_SELINUX_BOOTPARAM=y | ||
3200 | CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1 | ||
3201 | CONFIG_SECURITY_SELINUX_DISABLE=y | ||
3202 | CONFIG_SECURITY_SELINUX_DEVELOP=y | ||
3203 | CONFIG_SECURITY_SELINUX_AVC_STATS=y | ||
3204 | CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1 | ||
3205 | CONFIG_SECURITY_SELINUX_ENABLE_SECMARK_DEFAULT=y | ||
3206 | # CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set | ||
3207 | # CONFIG_SECURITY_SMACK is not set | ||
3208 | CONFIG_XOR_BLOCKS=m | ||
3209 | CONFIG_ASYNC_CORE=m | ||
3210 | CONFIG_ASYNC_MEMCPY=m | ||
3211 | CONFIG_ASYNC_XOR=m | ||
3212 | CONFIG_CRYPTO=y | ||
3213 | |||
3214 | # | ||
3215 | # Crypto core or helper | ||
3216 | # | ||
3217 | CONFIG_CRYPTO_ALGAPI=y | ||
3218 | CONFIG_CRYPTO_AEAD=m | ||
3219 | CONFIG_CRYPTO_BLKCIPHER=m | ||
3220 | CONFIG_CRYPTO_HASH=y | ||
3221 | CONFIG_CRYPTO_MANAGER=y | ||
3222 | CONFIG_CRYPTO_GF128MUL=m | ||
3223 | CONFIG_CRYPTO_NULL=m | ||
3224 | # CONFIG_CRYPTO_CRYPTD is not set | ||
3225 | CONFIG_CRYPTO_AUTHENC=m | ||
3226 | CONFIG_CRYPTO_TEST=m | ||
3227 | |||
3228 | # | ||
3229 | # Authenticated Encryption with Associated Data | ||
3230 | # | ||
3231 | CONFIG_CRYPTO_CCM=m | ||
3232 | CONFIG_CRYPTO_GCM=m | ||
3233 | CONFIG_CRYPTO_SEQIV=m | ||
3234 | |||
3235 | # | ||
3236 | # Block modes | ||
3237 | # | ||
3238 | CONFIG_CRYPTO_CBC=m | ||
3239 | CONFIG_CRYPTO_CTR=m | ||
3240 | CONFIG_CRYPTO_CTS=m | ||
3241 | CONFIG_CRYPTO_ECB=m | ||
3242 | CONFIG_CRYPTO_LRW=m | ||
3243 | CONFIG_CRYPTO_PCBC=m | ||
3244 | CONFIG_CRYPTO_XTS=m | ||
3245 | |||
3246 | # | ||
3247 | # Hash modes | ||
3248 | # | ||
3249 | CONFIG_CRYPTO_HMAC=y | ||
3250 | CONFIG_CRYPTO_XCBC=m | ||
3251 | |||
3252 | # | ||
3253 | # Digest | ||
3254 | # | ||
3255 | CONFIG_CRYPTO_CRC32C=m | ||
3256 | CONFIG_CRYPTO_MD4=m | ||
3257 | CONFIG_CRYPTO_MD5=y | ||
3258 | CONFIG_CRYPTO_MICHAEL_MIC=m | ||
3259 | CONFIG_CRYPTO_RMD128=m | ||
3260 | CONFIG_CRYPTO_RMD160=m | ||
3261 | CONFIG_CRYPTO_RMD256=m | ||
3262 | CONFIG_CRYPTO_RMD320=m | ||
3263 | CONFIG_CRYPTO_SHA1=y | ||
3264 | CONFIG_CRYPTO_SHA256=m | ||
3265 | CONFIG_CRYPTO_SHA512=m | ||
3266 | CONFIG_CRYPTO_TGR192=m | ||
3267 | CONFIG_CRYPTO_WP512=m | ||
3268 | |||
3269 | # | ||
3270 | # Ciphers | ||
3271 | # | ||
3272 | CONFIG_CRYPTO_AES=m | ||
3273 | CONFIG_CRYPTO_ANUBIS=m | ||
3274 | CONFIG_CRYPTO_ARC4=m | ||
3275 | CONFIG_CRYPTO_BLOWFISH=m | ||
3276 | CONFIG_CRYPTO_CAMELLIA=m | ||
3277 | CONFIG_CRYPTO_CAST5=m | ||
3278 | CONFIG_CRYPTO_CAST6=m | ||
3279 | CONFIG_CRYPTO_DES=m | ||
3280 | CONFIG_CRYPTO_FCRYPT=m | ||
3281 | CONFIG_CRYPTO_KHAZAD=m | ||
3282 | CONFIG_CRYPTO_SALSA20=m | ||
3283 | CONFIG_CRYPTO_SEED=m | ||
3284 | CONFIG_CRYPTO_SERPENT=m | ||
3285 | CONFIG_CRYPTO_TEA=m | ||
3286 | CONFIG_CRYPTO_TWOFISH=m | ||
3287 | CONFIG_CRYPTO_TWOFISH_COMMON=m | ||
3288 | |||
3289 | # | ||
3290 | # Compression | ||
3291 | # | ||
3292 | CONFIG_CRYPTO_DEFLATE=m | ||
3293 | CONFIG_CRYPTO_LZO=m | ||
3294 | CONFIG_CRYPTO_HW=y | ||
3295 | CONFIG_CRYPTO_DEV_HIFN_795X=m | ||
3296 | CONFIG_CRYPTO_DEV_HIFN_795X_RNG=y | ||
3297 | CONFIG_CRYPTO_DEV_TALITOS=m | ||
3298 | CONFIG_PPC_CLOCK=y | ||
3299 | CONFIG_PPC_LIB_RHEAP=y | ||
3300 | CONFIG_VIRTUALIZATION=y | ||
3301 | CONFIG_VIRTIO=m | ||
3302 | CONFIG_VIRTIO_RING=m | ||
3303 | CONFIG_VIRTIO_PCI=m | ||
3304 | CONFIG_VIRTIO_BALLOON=m | ||
diff --git a/arch/powerpc/configs/ps3_defconfig b/arch/powerpc/configs/ps3_defconfig index 71d79e428d20..f9a3d3b394cf 100644 --- a/arch/powerpc/configs/ps3_defconfig +++ b/arch/powerpc/configs/ps3_defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.25 | 3 | # Linux kernel version: 2.6.26 |
4 | # Mon Apr 28 12:39:10 2008 | 4 | # Wed Jul 16 13:59:24 2008 |
5 | # | 5 | # |
6 | CONFIG_PPC64=y | 6 | CONFIG_PPC64=y |
7 | 7 | ||
@@ -14,8 +14,9 @@ CONFIG_POWER4=y | |||
14 | CONFIG_TUNE_CELL=y | 14 | CONFIG_TUNE_CELL=y |
15 | CONFIG_PPC_FPU=y | 15 | CONFIG_PPC_FPU=y |
16 | CONFIG_ALTIVEC=y | 16 | CONFIG_ALTIVEC=y |
17 | # CONFIG_VSX is not set | ||
17 | CONFIG_PPC_STD_MMU=y | 18 | CONFIG_PPC_STD_MMU=y |
18 | # CONFIG_PPC_MM_SLICES is not set | 19 | CONFIG_PPC_MM_SLICES=y |
19 | CONFIG_VIRT_CPU_ACCOUNTING=y | 20 | CONFIG_VIRT_CPU_ACCOUNTING=y |
20 | CONFIG_SMP=y | 21 | CONFIG_SMP=y |
21 | CONFIG_NR_CPUS=2 | 22 | CONFIG_NR_CPUS=2 |
@@ -31,6 +32,7 @@ CONFIG_GENERIC_HARDIRQS=y | |||
31 | CONFIG_HAVE_SETUP_PER_CPU_AREA=y | 32 | CONFIG_HAVE_SETUP_PER_CPU_AREA=y |
32 | CONFIG_IRQ_PER_CPU=y | 33 | CONFIG_IRQ_PER_CPU=y |
33 | CONFIG_STACKTRACE_SUPPORT=y | 34 | CONFIG_STACKTRACE_SUPPORT=y |
35 | CONFIG_HAVE_LATENCYTOP_SUPPORT=y | ||
34 | CONFIG_TRACE_IRQFLAGS_SUPPORT=y | 36 | CONFIG_TRACE_IRQFLAGS_SUPPORT=y |
35 | CONFIG_LOCKDEP_SUPPORT=y | 37 | CONFIG_LOCKDEP_SUPPORT=y |
36 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | 38 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y |
@@ -90,6 +92,7 @@ CONFIG_CC_OPTIMIZE_FOR_SIZE=y | |||
90 | CONFIG_SYSCTL=y | 92 | CONFIG_SYSCTL=y |
91 | # CONFIG_EMBEDDED is not set | 93 | # CONFIG_EMBEDDED is not set |
92 | CONFIG_SYSCTL_SYSCALL=y | 94 | CONFIG_SYSCTL_SYSCALL=y |
95 | CONFIG_SYSCTL_SYSCALL_CHECK=y | ||
93 | CONFIG_KALLSYMS=y | 96 | CONFIG_KALLSYMS=y |
94 | CONFIG_KALLSYMS_ALL=y | 97 | CONFIG_KALLSYMS_ALL=y |
95 | CONFIG_KALLSYMS_EXTRA_PASS=y | 98 | CONFIG_KALLSYMS_EXTRA_PASS=y |
@@ -117,12 +120,15 @@ CONFIG_HAVE_OPROFILE=y | |||
117 | # CONFIG_KPROBES is not set | 120 | # CONFIG_KPROBES is not set |
118 | CONFIG_HAVE_KPROBES=y | 121 | CONFIG_HAVE_KPROBES=y |
119 | CONFIG_HAVE_KRETPROBES=y | 122 | CONFIG_HAVE_KRETPROBES=y |
123 | CONFIG_HAVE_DMA_ATTRS=y | ||
124 | CONFIG_USE_GENERIC_SMP_HELPERS=y | ||
120 | CONFIG_PROC_PAGE_MONITOR=y | 125 | CONFIG_PROC_PAGE_MONITOR=y |
121 | CONFIG_SLABINFO=y | 126 | CONFIG_SLABINFO=y |
122 | CONFIG_RT_MUTEXES=y | 127 | CONFIG_RT_MUTEXES=y |
123 | # CONFIG_TINY_SHMEM is not set | 128 | # CONFIG_TINY_SHMEM is not set |
124 | CONFIG_BASE_SMALL=0 | 129 | CONFIG_BASE_SMALL=0 |
125 | CONFIG_MODULES=y | 130 | CONFIG_MODULES=y |
131 | # CONFIG_MODULE_FORCE_LOAD is not set | ||
126 | CONFIG_MODULE_UNLOAD=y | 132 | CONFIG_MODULE_UNLOAD=y |
127 | # CONFIG_MODULE_FORCE_UNLOAD is not set | 133 | # CONFIG_MODULE_FORCE_UNLOAD is not set |
128 | # CONFIG_MODVERSIONS is not set | 134 | # CONFIG_MODVERSIONS is not set |
@@ -132,6 +138,7 @@ CONFIG_STOP_MACHINE=y | |||
132 | CONFIG_BLOCK=y | 138 | CONFIG_BLOCK=y |
133 | # CONFIG_BLK_DEV_IO_TRACE is not set | 139 | # CONFIG_BLK_DEV_IO_TRACE is not set |
134 | CONFIG_BLK_DEV_BSG=y | 140 | CONFIG_BLK_DEV_BSG=y |
141 | # CONFIG_BLK_DEV_INTEGRITY is not set | ||
135 | CONFIG_BLOCK_COMPAT=y | 142 | CONFIG_BLOCK_COMPAT=y |
136 | 143 | ||
137 | # | 144 | # |
@@ -152,13 +159,8 @@ CONFIG_CLASSIC_RCU=y | |||
152 | # Platform support | 159 | # Platform support |
153 | # | 160 | # |
154 | CONFIG_PPC_MULTIPLATFORM=y | 161 | CONFIG_PPC_MULTIPLATFORM=y |
155 | # CONFIG_PPC_82xx is not set | ||
156 | # CONFIG_PPC_83xx is not set | ||
157 | # CONFIG_PPC_86xx is not set | ||
158 | # CONFIG_PPC_PSERIES is not set | 162 | # CONFIG_PPC_PSERIES is not set |
159 | # CONFIG_PPC_ISERIES is not set | 163 | # CONFIG_PPC_ISERIES is not set |
160 | # CONFIG_PPC_MPC512x is not set | ||
161 | # CONFIG_PPC_MPC5121 is not set | ||
162 | # CONFIG_PPC_PMAC is not set | 164 | # CONFIG_PPC_PMAC is not set |
163 | # CONFIG_PPC_MAPLE is not set | 165 | # CONFIG_PPC_MAPLE is not set |
164 | # CONFIG_PPC_PASEMI is not set | 166 | # CONFIG_PPC_PASEMI is not set |
@@ -187,6 +189,7 @@ CONFIG_PPC_CELL=y | |||
187 | # Cell Broadband Engine options | 189 | # Cell Broadband Engine options |
188 | # | 190 | # |
189 | CONFIG_SPU_FS=y | 191 | CONFIG_SPU_FS=y |
192 | CONFIG_SPU_FS_64K_LS=y | ||
190 | CONFIG_SPU_BASE=y | 193 | CONFIG_SPU_BASE=y |
191 | # CONFIG_PQ2ADS is not set | 194 | # CONFIG_PQ2ADS is not set |
192 | # CONFIG_IPIC is not set | 195 | # CONFIG_IPIC is not set |
@@ -222,6 +225,7 @@ CONFIG_PREEMPT_NONE=y | |||
222 | CONFIG_BINFMT_ELF=y | 225 | CONFIG_BINFMT_ELF=y |
223 | CONFIG_COMPAT_BINFMT_ELF=y | 226 | CONFIG_COMPAT_BINFMT_ELF=y |
224 | CONFIG_BINFMT_MISC=y | 227 | CONFIG_BINFMT_MISC=y |
228 | CONFIG_HUGETLB_PAGE_SIZE_VARIABLE=y | ||
225 | # CONFIG_IOMMU_VMERGE is not set | 229 | # CONFIG_IOMMU_VMERGE is not set |
226 | CONFIG_IOMMU_HELPER=y | 230 | CONFIG_IOMMU_HELPER=y |
227 | CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y | 231 | CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y |
@@ -248,18 +252,22 @@ CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y | |||
248 | # CONFIG_SPARSEMEM_VMEMMAP is not set | 252 | # CONFIG_SPARSEMEM_VMEMMAP is not set |
249 | CONFIG_MEMORY_HOTPLUG=y | 253 | CONFIG_MEMORY_HOTPLUG=y |
250 | CONFIG_MEMORY_HOTPLUG_SPARSE=y | 254 | CONFIG_MEMORY_HOTPLUG_SPARSE=y |
255 | CONFIG_PAGEFLAGS_EXTENDED=y | ||
251 | CONFIG_SPLIT_PTLOCK_CPUS=4 | 256 | CONFIG_SPLIT_PTLOCK_CPUS=4 |
252 | CONFIG_RESOURCES_64BIT=y | 257 | CONFIG_RESOURCES_64BIT=y |
253 | CONFIG_ZONE_DMA_FLAG=1 | 258 | CONFIG_ZONE_DMA_FLAG=1 |
254 | CONFIG_BOUNCE=y | 259 | CONFIG_BOUNCE=y |
255 | CONFIG_ARCH_MEMORY_PROBE=y | 260 | CONFIG_ARCH_MEMORY_PROBE=y |
256 | # CONFIG_PPC_HAS_HASH_64K is not set | 261 | CONFIG_PPC_HAS_HASH_64K=y |
257 | # CONFIG_PPC_64K_PAGES is not set | 262 | # CONFIG_PPC_64K_PAGES is not set |
258 | CONFIG_FORCE_MAX_ZONEORDER=13 | 263 | CONFIG_FORCE_MAX_ZONEORDER=13 |
259 | # CONFIG_SCHED_SMT is not set | 264 | CONFIG_SCHED_SMT=y |
260 | CONFIG_PROC_DEVICETREE=y | 265 | CONFIG_PROC_DEVICETREE=y |
261 | # CONFIG_CMDLINE_BOOL is not set | 266 | # CONFIG_CMDLINE_BOOL is not set |
262 | # CONFIG_PM is not set | 267 | CONFIG_EXTRA_TARGETS="" |
268 | CONFIG_PM=y | ||
269 | CONFIG_PM_DEBUG=y | ||
270 | # CONFIG_PM_VERBOSE is not set | ||
263 | # CONFIG_SECCOMP is not set | 271 | # CONFIG_SECCOMP is not set |
264 | CONFIG_ISA_DMA_API=y | 272 | CONFIG_ISA_DMA_API=y |
265 | 273 | ||
@@ -273,6 +281,7 @@ CONFIG_GENERIC_ISA_DMA=y | |||
273 | # CONFIG_PCI_SYSCALL is not set | 281 | # CONFIG_PCI_SYSCALL is not set |
274 | # CONFIG_ARCH_SUPPORTS_MSI is not set | 282 | # CONFIG_ARCH_SUPPORTS_MSI is not set |
275 | # CONFIG_PCCARD is not set | 283 | # CONFIG_PCCARD is not set |
284 | # CONFIG_HAS_RAPIDIO is not set | ||
276 | CONFIG_PAGE_OFFSET=0xc000000000000000 | 285 | CONFIG_PAGE_OFFSET=0xc000000000000000 |
277 | CONFIG_KERNEL_START=0xc000000000000000 | 286 | CONFIG_KERNEL_START=0xc000000000000000 |
278 | CONFIG_PHYSICAL_START=0x00000000 | 287 | CONFIG_PHYSICAL_START=0x00000000 |
@@ -412,6 +421,8 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | |||
412 | CONFIG_STANDALONE=y | 421 | CONFIG_STANDALONE=y |
413 | CONFIG_PREVENT_FIRMWARE_BUILD=y | 422 | CONFIG_PREVENT_FIRMWARE_BUILD=y |
414 | CONFIG_FW_LOADER=m | 423 | CONFIG_FW_LOADER=m |
424 | # CONFIG_FIRMWARE_IN_KERNEL is not set | ||
425 | CONFIG_EXTRA_FIRMWARE="" | ||
415 | # CONFIG_DEBUG_DRIVER is not set | 426 | # CONFIG_DEBUG_DRIVER is not set |
416 | # CONFIG_DEBUG_DEVRES is not set | 427 | # CONFIG_DEBUG_DEVRES is not set |
417 | # CONFIG_SYS_HYPERVISOR is not set | 428 | # CONFIG_SYS_HYPERVISOR is not set |
@@ -478,6 +489,7 @@ CONFIG_SCSI_WAIT_SCAN=m | |||
478 | # CONFIG_SCSI_SAS_LIBSAS is not set | 489 | # CONFIG_SCSI_SAS_LIBSAS is not set |
479 | # CONFIG_SCSI_SRP_ATTRS is not set | 490 | # CONFIG_SCSI_SRP_ATTRS is not set |
480 | # CONFIG_SCSI_LOWLEVEL is not set | 491 | # CONFIG_SCSI_LOWLEVEL is not set |
492 | # CONFIG_SCSI_DH is not set | ||
481 | # CONFIG_ATA is not set | 493 | # CONFIG_ATA is not set |
482 | # CONFIG_MD is not set | 494 | # CONFIG_MD is not set |
483 | # CONFIG_MACINTOSH_DRIVERS is not set | 495 | # CONFIG_MACINTOSH_DRIVERS is not set |
@@ -533,8 +545,18 @@ CONFIG_USB_NET_MCS7830=m | |||
533 | # CONFIG_USB_NET_CDC_SUBSET is not set | 545 | # CONFIG_USB_NET_CDC_SUBSET is not set |
534 | # CONFIG_USB_NET_ZAURUS is not set | 546 | # CONFIG_USB_NET_ZAURUS is not set |
535 | # CONFIG_WAN is not set | 547 | # CONFIG_WAN is not set |
536 | # CONFIG_PPP is not set | 548 | CONFIG_PPP=m |
549 | CONFIG_PPP_MULTILINK=y | ||
550 | # CONFIG_PPP_FILTER is not set | ||
551 | CONFIG_PPP_ASYNC=m | ||
552 | # CONFIG_PPP_SYNC_TTY is not set | ||
553 | CONFIG_PPP_DEFLATE=m | ||
554 | # CONFIG_PPP_BSDCOMP is not set | ||
555 | # CONFIG_PPP_MPPE is not set | ||
556 | CONFIG_PPPOE=m | ||
557 | # CONFIG_PPPOL2TP is not set | ||
537 | # CONFIG_SLIP is not set | 558 | # CONFIG_SLIP is not set |
559 | CONFIG_SLHC=m | ||
538 | # CONFIG_NETCONSOLE is not set | 560 | # CONFIG_NETCONSOLE is not set |
539 | # CONFIG_NETPOLL is not set | 561 | # CONFIG_NETPOLL is not set |
540 | # CONFIG_NET_POLL_CONTROLLER is not set | 562 | # CONFIG_NET_POLL_CONTROLLER is not set |
@@ -603,6 +625,7 @@ CONFIG_VT=y | |||
603 | CONFIG_VT_CONSOLE=y | 625 | CONFIG_VT_CONSOLE=y |
604 | CONFIG_HW_CONSOLE=y | 626 | CONFIG_HW_CONSOLE=y |
605 | CONFIG_VT_HW_CONSOLE_BINDING=y | 627 | CONFIG_VT_HW_CONSOLE_BINDING=y |
628 | CONFIG_DEVKMEM=y | ||
606 | # CONFIG_SERIAL_NONSTANDARD is not set | 629 | # CONFIG_SERIAL_NONSTANDARD is not set |
607 | 630 | ||
608 | # | 631 | # |
@@ -618,23 +641,17 @@ CONFIG_LEGACY_PTYS=y | |||
618 | CONFIG_LEGACY_PTY_COUNT=16 | 641 | CONFIG_LEGACY_PTY_COUNT=16 |
619 | # CONFIG_IPMI_HANDLER is not set | 642 | # CONFIG_IPMI_HANDLER is not set |
620 | # CONFIG_HW_RANDOM is not set | 643 | # CONFIG_HW_RANDOM is not set |
621 | CONFIG_GEN_RTC=y | ||
622 | # CONFIG_GEN_RTC_X is not set | ||
623 | # CONFIG_R3964 is not set | 644 | # CONFIG_R3964 is not set |
624 | # CONFIG_RAW_DRIVER is not set | 645 | # CONFIG_RAW_DRIVER is not set |
625 | # CONFIG_HANGCHECK_TIMER is not set | 646 | # CONFIG_HANGCHECK_TIMER is not set |
626 | # CONFIG_TCG_TPM is not set | 647 | # CONFIG_TCG_TPM is not set |
627 | # CONFIG_I2C is not set | 648 | # CONFIG_I2C is not set |
628 | |||
629 | # | ||
630 | # SPI support | ||
631 | # | ||
632 | # CONFIG_SPI is not set | 649 | # CONFIG_SPI is not set |
633 | # CONFIG_SPI_MASTER is not set | ||
634 | # CONFIG_W1 is not set | 650 | # CONFIG_W1 is not set |
635 | # CONFIG_POWER_SUPPLY is not set | 651 | # CONFIG_POWER_SUPPLY is not set |
636 | # CONFIG_HWMON is not set | 652 | # CONFIG_HWMON is not set |
637 | # CONFIG_THERMAL is not set | 653 | # CONFIG_THERMAL is not set |
654 | # CONFIG_THERMAL_HWMON is not set | ||
638 | # CONFIG_WATCHDOG is not set | 655 | # CONFIG_WATCHDOG is not set |
639 | 656 | ||
640 | # | 657 | # |
@@ -652,8 +669,17 @@ CONFIG_SSB_POSSIBLE=y | |||
652 | # | 669 | # |
653 | # Multimedia devices | 670 | # Multimedia devices |
654 | # | 671 | # |
672 | |||
673 | # | ||
674 | # Multimedia core support | ||
675 | # | ||
655 | # CONFIG_VIDEO_DEV is not set | 676 | # CONFIG_VIDEO_DEV is not set |
656 | # CONFIG_DVB_CORE is not set | 677 | # CONFIG_DVB_CORE is not set |
678 | # CONFIG_VIDEO_MEDIA is not set | ||
679 | |||
680 | # | ||
681 | # Multimedia drivers | ||
682 | # | ||
657 | # CONFIG_DAB is not set | 683 | # CONFIG_DAB is not set |
658 | 684 | ||
659 | # | 685 | # |
@@ -671,8 +697,8 @@ CONFIG_FB=y | |||
671 | CONFIG_FB_SYS_FILLRECT=y | 697 | CONFIG_FB_SYS_FILLRECT=y |
672 | CONFIG_FB_SYS_COPYAREA=y | 698 | CONFIG_FB_SYS_COPYAREA=y |
673 | CONFIG_FB_SYS_IMAGEBLIT=y | 699 | CONFIG_FB_SYS_IMAGEBLIT=y |
700 | # CONFIG_FB_FOREIGN_ENDIAN is not set | ||
674 | CONFIG_FB_SYS_FOPS=y | 701 | CONFIG_FB_SYS_FOPS=y |
675 | CONFIG_FB_DEFERRED_IO=y | ||
676 | # CONFIG_FB_SVGALIB is not set | 702 | # CONFIG_FB_SVGALIB is not set |
677 | # CONFIG_FB_MACMODES is not set | 703 | # CONFIG_FB_MACMODES is not set |
678 | # CONFIG_FB_BACKLIGHT is not set | 704 | # CONFIG_FB_BACKLIGHT is not set |
@@ -712,18 +738,12 @@ CONFIG_FB_LOGO_EXTRA=y | |||
712 | # CONFIG_LOGO_LINUX_MONO is not set | 738 | # CONFIG_LOGO_LINUX_MONO is not set |
713 | # CONFIG_LOGO_LINUX_VGA16 is not set | 739 | # CONFIG_LOGO_LINUX_VGA16 is not set |
714 | CONFIG_LOGO_LINUX_CLUT224=y | 740 | CONFIG_LOGO_LINUX_CLUT224=y |
715 | |||
716 | # | ||
717 | # Sound | ||
718 | # | ||
719 | CONFIG_SOUND=m | 741 | CONFIG_SOUND=m |
720 | |||
721 | # | ||
722 | # Advanced Linux Sound Architecture | ||
723 | # | ||
724 | CONFIG_SND=m | 742 | CONFIG_SND=m |
725 | CONFIG_SND_TIMER=m | 743 | CONFIG_SND_TIMER=m |
726 | CONFIG_SND_PCM=m | 744 | CONFIG_SND_PCM=m |
745 | CONFIG_SND_HWDEP=m | ||
746 | CONFIG_SND_RAWMIDI=m | ||
727 | # CONFIG_SND_SEQUENCER is not set | 747 | # CONFIG_SND_SEQUENCER is not set |
728 | # CONFIG_SND_MIXER_OSS is not set | 748 | # CONFIG_SND_MIXER_OSS is not set |
729 | # CONFIG_SND_PCM_OSS is not set | 749 | # CONFIG_SND_PCM_OSS is not set |
@@ -732,53 +752,20 @@ CONFIG_SND_SUPPORT_OLD_API=y | |||
732 | CONFIG_SND_VERBOSE_PROCFS=y | 752 | CONFIG_SND_VERBOSE_PROCFS=y |
733 | # CONFIG_SND_VERBOSE_PRINTK is not set | 753 | # CONFIG_SND_VERBOSE_PRINTK is not set |
734 | # CONFIG_SND_DEBUG is not set | 754 | # CONFIG_SND_DEBUG is not set |
735 | 755 | # CONFIG_SND_DRIVERS is not set | |
736 | # | 756 | CONFIG_SND_PPC=y |
737 | # Generic devices | ||
738 | # | ||
739 | # CONFIG_SND_DUMMY is not set | ||
740 | # CONFIG_SND_MTPAV is not set | ||
741 | # CONFIG_SND_SERIAL_U16550 is not set | ||
742 | # CONFIG_SND_MPU401 is not set | ||
743 | |||
744 | # | ||
745 | # ALSA PowerMac devices | ||
746 | # | ||
747 | |||
748 | # | ||
749 | # ALSA PowerMac requires I2C | ||
750 | # | ||
751 | |||
752 | # | ||
753 | # ALSA PowerPC devices | ||
754 | # | ||
755 | CONFIG_SND_PS3=m | 757 | CONFIG_SND_PS3=m |
756 | CONFIG_SND_PS3_DEFAULT_START_DELAY=2000 | 758 | CONFIG_SND_PS3_DEFAULT_START_DELAY=2000 |
757 | 759 | CONFIG_SND_USB=y | |
758 | # | 760 | CONFIG_SND_USB_AUDIO=m |
759 | # USB devices | ||
760 | # | ||
761 | # CONFIG_SND_USB_AUDIO is not set | ||
762 | # CONFIG_SND_USB_USX2Y is not set | 761 | # CONFIG_SND_USB_USX2Y is not set |
763 | # CONFIG_SND_USB_CAIAQ is not set | 762 | # CONFIG_SND_USB_CAIAQ is not set |
764 | |||
765 | # | ||
766 | # System on Chip audio support | ||
767 | # | ||
768 | # CONFIG_SND_SOC is not set | 763 | # CONFIG_SND_SOC is not set |
769 | |||
770 | # | ||
771 | # ALSA SoC audio for Freescale SOCs | ||
772 | # | ||
773 | |||
774 | # | ||
775 | # Open Sound System | ||
776 | # | ||
777 | # CONFIG_SOUND_PRIME is not set | 764 | # CONFIG_SOUND_PRIME is not set |
778 | CONFIG_HID_SUPPORT=y | 765 | CONFIG_HID_SUPPORT=y |
779 | CONFIG_HID=y | 766 | CONFIG_HID=y |
780 | # CONFIG_HID_DEBUG is not set | 767 | # CONFIG_HID_DEBUG is not set |
781 | # CONFIG_HIDRAW is not set | 768 | CONFIG_HIDRAW=y |
782 | 769 | ||
783 | # | 770 | # |
784 | # USB Input Devices | 771 | # USB Input Devices |
@@ -807,17 +794,20 @@ CONFIG_USB=m | |||
807 | CONFIG_USB_DEVICEFS=y | 794 | CONFIG_USB_DEVICEFS=y |
808 | # CONFIG_USB_DEVICE_CLASS is not set | 795 | # CONFIG_USB_DEVICE_CLASS is not set |
809 | # CONFIG_USB_DYNAMIC_MINORS is not set | 796 | # CONFIG_USB_DYNAMIC_MINORS is not set |
797 | CONFIG_USB_SUSPEND=y | ||
810 | # CONFIG_USB_OTG is not set | 798 | # CONFIG_USB_OTG is not set |
811 | 799 | ||
812 | # | 800 | # |
813 | # USB Host Controller Drivers | 801 | # USB Host Controller Drivers |
814 | # | 802 | # |
803 | # CONFIG_USB_C67X00_HCD is not set | ||
815 | CONFIG_USB_EHCI_HCD=m | 804 | CONFIG_USB_EHCI_HCD=m |
816 | # CONFIG_USB_EHCI_ROOT_HUB_TT is not set | 805 | # CONFIG_USB_EHCI_ROOT_HUB_TT is not set |
817 | # CONFIG_USB_EHCI_TT_NEWSCHED is not set | 806 | # CONFIG_USB_EHCI_TT_NEWSCHED is not set |
818 | CONFIG_USB_EHCI_BIG_ENDIAN_MMIO=y | 807 | CONFIG_USB_EHCI_BIG_ENDIAN_MMIO=y |
819 | # CONFIG_USB_EHCI_HCD_PPC_OF is not set | 808 | # CONFIG_USB_EHCI_HCD_PPC_OF is not set |
820 | # CONFIG_USB_ISP116X_HCD is not set | 809 | # CONFIG_USB_ISP116X_HCD is not set |
810 | # CONFIG_USB_ISP1760_HCD is not set | ||
821 | CONFIG_USB_OHCI_HCD=m | 811 | CONFIG_USB_OHCI_HCD=m |
822 | # CONFIG_USB_OHCI_HCD_PPC_OF is not set | 812 | # CONFIG_USB_OHCI_HCD_PPC_OF is not set |
823 | # CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set | 813 | # CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set |
@@ -831,6 +821,7 @@ CONFIG_USB_OHCI_LITTLE_ENDIAN=y | |||
831 | # | 821 | # |
832 | # CONFIG_USB_ACM is not set | 822 | # CONFIG_USB_ACM is not set |
833 | # CONFIG_USB_PRINTER is not set | 823 | # CONFIG_USB_PRINTER is not set |
824 | # CONFIG_USB_WDM is not set | ||
834 | 825 | ||
835 | # | 826 | # |
836 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | 827 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' |
@@ -890,12 +881,45 @@ CONFIG_USB_MON=y | |||
890 | # CONFIG_USB_TRANCEVIBRATOR is not set | 881 | # CONFIG_USB_TRANCEVIBRATOR is not set |
891 | # CONFIG_USB_IOWARRIOR is not set | 882 | # CONFIG_USB_IOWARRIOR is not set |
892 | # CONFIG_USB_TEST is not set | 883 | # CONFIG_USB_TEST is not set |
884 | # CONFIG_USB_ISIGHTFW is not set | ||
893 | # CONFIG_USB_GADGET is not set | 885 | # CONFIG_USB_GADGET is not set |
894 | # CONFIG_MMC is not set | 886 | # CONFIG_MMC is not set |
895 | # CONFIG_MEMSTICK is not set | 887 | # CONFIG_MEMSTICK is not set |
896 | # CONFIG_NEW_LEDS is not set | 888 | # CONFIG_NEW_LEDS is not set |
889 | # CONFIG_ACCESSIBILITY is not set | ||
897 | # CONFIG_EDAC is not set | 890 | # CONFIG_EDAC is not set |
898 | # CONFIG_RTC_CLASS is not set | 891 | CONFIG_RTC_LIB=m |
892 | CONFIG_RTC_CLASS=m | ||
893 | |||
894 | # | ||
895 | # RTC interfaces | ||
896 | # | ||
897 | CONFIG_RTC_INTF_SYSFS=y | ||
898 | CONFIG_RTC_INTF_PROC=y | ||
899 | CONFIG_RTC_INTF_DEV=y | ||
900 | # CONFIG_RTC_INTF_DEV_UIE_EMUL is not set | ||
901 | # CONFIG_RTC_DRV_TEST is not set | ||
902 | |||
903 | # | ||
904 | # SPI RTC drivers | ||
905 | # | ||
906 | |||
907 | # | ||
908 | # Platform RTC drivers | ||
909 | # | ||
910 | # CONFIG_RTC_DRV_CMOS is not set | ||
911 | # CONFIG_RTC_DRV_DS1511 is not set | ||
912 | # CONFIG_RTC_DRV_DS1553 is not set | ||
913 | # CONFIG_RTC_DRV_DS1742 is not set | ||
914 | # CONFIG_RTC_DRV_STK17TA8 is not set | ||
915 | # CONFIG_RTC_DRV_M48T86 is not set | ||
916 | # CONFIG_RTC_DRV_M48T59 is not set | ||
917 | # CONFIG_RTC_DRV_V3020 is not set | ||
918 | |||
919 | # | ||
920 | # on-CPU RTC drivers | ||
921 | # | ||
922 | CONFIG_RTC_DRV_PPC=m | ||
899 | # CONFIG_DMADEVICES is not set | 923 | # CONFIG_DMADEVICES is not set |
900 | # CONFIG_UIO is not set | 924 | # CONFIG_UIO is not set |
901 | 925 | ||
@@ -911,6 +935,7 @@ CONFIG_EXT3_FS_XATTR=y | |||
911 | # CONFIG_EXT3_FS_SECURITY is not set | 935 | # CONFIG_EXT3_FS_SECURITY is not set |
912 | # CONFIG_EXT4DEV_FS is not set | 936 | # CONFIG_EXT4DEV_FS is not set |
913 | CONFIG_JBD=y | 937 | CONFIG_JBD=y |
938 | # CONFIG_JBD_DEBUG is not set | ||
914 | CONFIG_FS_MBCACHE=y | 939 | CONFIG_FS_MBCACHE=y |
915 | # CONFIG_REISERFS_FS is not set | 940 | # CONFIG_REISERFS_FS is not set |
916 | # CONFIG_JFS_FS is not set | 941 | # CONFIG_JFS_FS is not set |
@@ -959,8 +984,8 @@ CONFIG_PROC_SYSCTL=y | |||
959 | CONFIG_SYSFS=y | 984 | CONFIG_SYSFS=y |
960 | CONFIG_TMPFS=y | 985 | CONFIG_TMPFS=y |
961 | # CONFIG_TMPFS_POSIX_ACL is not set | 986 | # CONFIG_TMPFS_POSIX_ACL is not set |
962 | # CONFIG_HUGETLBFS is not set | 987 | CONFIG_HUGETLBFS=y |
963 | # CONFIG_HUGETLB_PAGE is not set | 988 | CONFIG_HUGETLB_PAGE=y |
964 | # CONFIG_CONFIGFS_FS is not set | 989 | # CONFIG_CONFIGFS_FS is not set |
965 | 990 | ||
966 | # | 991 | # |
@@ -1059,12 +1084,15 @@ CONFIG_NLS_ISO8859_1=y | |||
1059 | # | 1084 | # |
1060 | CONFIG_BITREVERSE=y | 1085 | CONFIG_BITREVERSE=y |
1061 | # CONFIG_GENERIC_FIND_FIRST_BIT is not set | 1086 | # CONFIG_GENERIC_FIND_FIRST_BIT is not set |
1062 | # CONFIG_CRC_CCITT is not set | 1087 | CONFIG_CRC_CCITT=m |
1063 | # CONFIG_CRC16 is not set | 1088 | # CONFIG_CRC16 is not set |
1089 | # CONFIG_CRC_T10DIF is not set | ||
1064 | CONFIG_CRC_ITU_T=m | 1090 | CONFIG_CRC_ITU_T=m |
1065 | CONFIG_CRC32=y | 1091 | CONFIG_CRC32=y |
1066 | # CONFIG_CRC7 is not set | 1092 | # CONFIG_CRC7 is not set |
1067 | # CONFIG_LIBCRC32C is not set | 1093 | # CONFIG_LIBCRC32C is not set |
1094 | CONFIG_ZLIB_INFLATE=m | ||
1095 | CONFIG_ZLIB_DEFLATE=m | ||
1068 | CONFIG_LZO_COMPRESS=m | 1096 | CONFIG_LZO_COMPRESS=m |
1069 | CONFIG_LZO_DECOMPRESS=m | 1097 | CONFIG_LZO_DECOMPRESS=m |
1070 | CONFIG_PLIST=y | 1098 | CONFIG_PLIST=y |
@@ -1082,7 +1110,7 @@ CONFIG_ENABLE_MUST_CHECK=y | |||
1082 | CONFIG_FRAME_WARN=2048 | 1110 | CONFIG_FRAME_WARN=2048 |
1083 | CONFIG_MAGIC_SYSRQ=y | 1111 | CONFIG_MAGIC_SYSRQ=y |
1084 | # CONFIG_UNUSED_SYMBOLS is not set | 1112 | # CONFIG_UNUSED_SYMBOLS is not set |
1085 | # CONFIG_DEBUG_FS is not set | 1113 | CONFIG_DEBUG_FS=y |
1086 | # CONFIG_HEADERS_CHECK is not set | 1114 | # CONFIG_HEADERS_CHECK is not set |
1087 | CONFIG_DEBUG_KERNEL=y | 1115 | CONFIG_DEBUG_KERNEL=y |
1088 | # CONFIG_DEBUG_SHIRQ is not set | 1116 | # CONFIG_DEBUG_SHIRQ is not set |
@@ -1090,33 +1118,49 @@ CONFIG_DETECT_SOFTLOCKUP=y | |||
1090 | CONFIG_SCHED_DEBUG=y | 1118 | CONFIG_SCHED_DEBUG=y |
1091 | # CONFIG_SCHEDSTATS is not set | 1119 | # CONFIG_SCHEDSTATS is not set |
1092 | # CONFIG_TIMER_STATS is not set | 1120 | # CONFIG_TIMER_STATS is not set |
1121 | # CONFIG_DEBUG_OBJECTS is not set | ||
1093 | # CONFIG_DEBUG_SLAB is not set | 1122 | # CONFIG_DEBUG_SLAB is not set |
1094 | # CONFIG_DEBUG_RT_MUTEXES is not set | 1123 | # CONFIG_DEBUG_RT_MUTEXES is not set |
1095 | # CONFIG_RT_MUTEX_TESTER is not set | 1124 | # CONFIG_RT_MUTEX_TESTER is not set |
1096 | CONFIG_DEBUG_SPINLOCK=y | 1125 | CONFIG_DEBUG_SPINLOCK=y |
1097 | CONFIG_DEBUG_MUTEXES=y | 1126 | CONFIG_DEBUG_MUTEXES=y |
1098 | # CONFIG_DEBUG_LOCK_ALLOC is not set | 1127 | CONFIG_DEBUG_LOCK_ALLOC=y |
1099 | # CONFIG_PROVE_LOCKING is not set | 1128 | CONFIG_PROVE_LOCKING=y |
1129 | CONFIG_LOCKDEP=y | ||
1100 | # CONFIG_LOCK_STAT is not set | 1130 | # CONFIG_LOCK_STAT is not set |
1131 | CONFIG_DEBUG_LOCKDEP=y | ||
1132 | CONFIG_TRACE_IRQFLAGS=y | ||
1101 | CONFIG_DEBUG_SPINLOCK_SLEEP=y | 1133 | CONFIG_DEBUG_SPINLOCK_SLEEP=y |
1102 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set | 1134 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set |
1135 | CONFIG_STACKTRACE=y | ||
1103 | # CONFIG_DEBUG_KOBJECT is not set | 1136 | # CONFIG_DEBUG_KOBJECT is not set |
1104 | CONFIG_DEBUG_BUGVERBOSE=y | 1137 | CONFIG_DEBUG_BUGVERBOSE=y |
1105 | CONFIG_DEBUG_INFO=y | 1138 | CONFIG_DEBUG_INFO=y |
1106 | # CONFIG_DEBUG_VM is not set | 1139 | # CONFIG_DEBUG_VM is not set |
1107 | # CONFIG_DEBUG_WRITECOUNT is not set | 1140 | CONFIG_DEBUG_WRITECOUNT=y |
1108 | CONFIG_DEBUG_LIST=y | 1141 | CONFIG_DEBUG_LIST=y |
1109 | # CONFIG_DEBUG_SG is not set | 1142 | # CONFIG_DEBUG_SG is not set |
1143 | CONFIG_FRAME_POINTER=y | ||
1110 | # CONFIG_BOOT_PRINTK_DELAY is not set | 1144 | # CONFIG_BOOT_PRINTK_DELAY is not set |
1111 | # CONFIG_RCU_TORTURE_TEST is not set | 1145 | # CONFIG_RCU_TORTURE_TEST is not set |
1112 | # CONFIG_BACKTRACE_SELF_TEST is not set | 1146 | # CONFIG_BACKTRACE_SELF_TEST is not set |
1113 | # CONFIG_FAULT_INJECTION is not set | 1147 | # CONFIG_FAULT_INJECTION is not set |
1148 | # CONFIG_LATENCYTOP is not set | ||
1149 | CONFIG_HAVE_FTRACE=y | ||
1150 | CONFIG_HAVE_DYNAMIC_FTRACE=y | ||
1151 | # CONFIG_FTRACE is not set | ||
1152 | # CONFIG_IRQSOFF_TRACER is not set | ||
1153 | # CONFIG_SCHED_TRACER is not set | ||
1154 | # CONFIG_CONTEXT_SWITCH_TRACER is not set | ||
1114 | # CONFIG_SAMPLES is not set | 1155 | # CONFIG_SAMPLES is not set |
1115 | CONFIG_DEBUG_STACKOVERFLOW=y | 1156 | CONFIG_DEBUG_STACKOVERFLOW=y |
1116 | # CONFIG_DEBUG_STACK_USAGE is not set | 1157 | # CONFIG_DEBUG_STACK_USAGE is not set |
1117 | # CONFIG_DEBUG_PAGEALLOC is not set | 1158 | # CONFIG_DEBUG_PAGEALLOC is not set |
1118 | # CONFIG_DEBUGGER is not set | 1159 | # CONFIG_DEBUGGER is not set |
1160 | # CONFIG_CODE_PATCHING_SELFTEST is not set | ||
1161 | # CONFIG_FTR_FIXUP_SELFTEST is not set | ||
1119 | CONFIG_IRQSTACKS=y | 1162 | CONFIG_IRQSTACKS=y |
1163 | # CONFIG_VIRQ_DEBUG is not set | ||
1120 | # CONFIG_BOOTX_TEXT is not set | 1164 | # CONFIG_BOOTX_TEXT is not set |
1121 | # CONFIG_PPC_EARLY_DEBUG is not set | 1165 | # CONFIG_PPC_EARLY_DEBUG is not set |
1122 | 1166 | ||
@@ -1172,6 +1216,10 @@ CONFIG_CRYPTO_PCBC=m | |||
1172 | # CONFIG_CRYPTO_MD4 is not set | 1216 | # CONFIG_CRYPTO_MD4 is not set |
1173 | CONFIG_CRYPTO_MD5=y | 1217 | CONFIG_CRYPTO_MD5=y |
1174 | CONFIG_CRYPTO_MICHAEL_MIC=m | 1218 | CONFIG_CRYPTO_MICHAEL_MIC=m |
1219 | # CONFIG_CRYPTO_RMD128 is not set | ||
1220 | # CONFIG_CRYPTO_RMD160 is not set | ||
1221 | # CONFIG_CRYPTO_RMD256 is not set | ||
1222 | # CONFIG_CRYPTO_RMD320 is not set | ||
1175 | # CONFIG_CRYPTO_SHA1 is not set | 1223 | # CONFIG_CRYPTO_SHA1 is not set |
1176 | # CONFIG_CRYPTO_SHA256 is not set | 1224 | # CONFIG_CRYPTO_SHA256 is not set |
1177 | # CONFIG_CRYPTO_SHA512 is not set | 1225 | # CONFIG_CRYPTO_SHA512 is not set |
diff --git a/arch/powerpc/kernel/cputable.c b/arch/powerpc/kernel/cputable.c index f7f3c215d06f..b936a1dd0a50 100644 --- a/arch/powerpc/kernel/cputable.c +++ b/arch/powerpc/kernel/cputable.c | |||
@@ -355,6 +355,7 @@ static struct cpu_spec __initdata cpu_specs[] = { | |||
355 | .icache_bsize = 128, | 355 | .icache_bsize = 128, |
356 | .dcache_bsize = 128, | 356 | .dcache_bsize = 128, |
357 | .machine_check = machine_check_generic, | 357 | .machine_check = machine_check_generic, |
358 | .oprofile_cpu_type = "ppc64/compat-power5+", | ||
358 | .platform = "power5+", | 359 | .platform = "power5+", |
359 | }, | 360 | }, |
360 | { /* Power6 */ | 361 | { /* Power6 */ |
@@ -386,6 +387,7 @@ static struct cpu_spec __initdata cpu_specs[] = { | |||
386 | .icache_bsize = 128, | 387 | .icache_bsize = 128, |
387 | .dcache_bsize = 128, | 388 | .dcache_bsize = 128, |
388 | .machine_check = machine_check_generic, | 389 | .machine_check = machine_check_generic, |
390 | .oprofile_cpu_type = "ppc64/compat-power6", | ||
389 | .platform = "power6", | 391 | .platform = "power6", |
390 | }, | 392 | }, |
391 | { /* 2.06-compliant processor, i.e. Power7 "architected" mode */ | 393 | { /* 2.06-compliant processor, i.e. Power7 "architected" mode */ |
@@ -397,6 +399,7 @@ static struct cpu_spec __initdata cpu_specs[] = { | |||
397 | .icache_bsize = 128, | 399 | .icache_bsize = 128, |
398 | .dcache_bsize = 128, | 400 | .dcache_bsize = 128, |
399 | .machine_check = machine_check_generic, | 401 | .machine_check = machine_check_generic, |
402 | .oprofile_cpu_type = "ppc64/compat-power7", | ||
400 | .platform = "power7", | 403 | .platform = "power7", |
401 | }, | 404 | }, |
402 | { /* Power7 */ | 405 | { /* Power7 */ |
@@ -1629,6 +1632,23 @@ struct cpu_spec * __init identify_cpu(unsigned long offset, unsigned int pvr) | |||
1629 | t->cpu_setup = s->cpu_setup; | 1632 | t->cpu_setup = s->cpu_setup; |
1630 | t->cpu_restore = s->cpu_restore; | 1633 | t->cpu_restore = s->cpu_restore; |
1631 | t->platform = s->platform; | 1634 | t->platform = s->platform; |
1635 | /* | ||
1636 | * If we have passed through this logic once | ||
1637 | * before and have pulled the default case | ||
1638 | * because the real PVR was not found inside | ||
1639 | * cpu_specs[], then we are possibly running in | ||
1640 | * compatibility mode. In that case, let the | ||
1641 | * oprofiler know which set of compatibility | ||
1642 | * counters to pull from by making sure the | ||
1643 | * oprofile_cpu_type string is set to that of | ||
1644 | * compatibility mode. If the oprofile_cpu_type | ||
1645 | * already has a value, then we are possibly | ||
1646 | * overriding a real PVR with a logical one, and, | ||
1647 | * in that case, keep the current value for | ||
1648 | * oprofile_cpu_type. | ||
1649 | */ | ||
1650 | if (t->oprofile_cpu_type == NULL) | ||
1651 | t->oprofile_cpu_type = s->oprofile_cpu_type; | ||
1632 | } else | 1652 | } else |
1633 | *t = *s; | 1653 | *t = *s; |
1634 | *PTRRELOC(&cur_cpu_spec) = &the_cpu_spec; | 1654 | *PTRRELOC(&cur_cpu_spec) = &the_cpu_spec; |
diff --git a/arch/powerpc/kernel/head_fsl_booke.S b/arch/powerpc/kernel/head_fsl_booke.S index c4268500e856..3cb52fa0eda3 100644 --- a/arch/powerpc/kernel/head_fsl_booke.S +++ b/arch/powerpc/kernel/head_fsl_booke.S | |||
@@ -151,16 +151,11 @@ skpinv: addi r6,r6,1 /* Increment */ | |||
151 | /* Invalidate TLB0 */ | 151 | /* Invalidate TLB0 */ |
152 | li r6,0x04 | 152 | li r6,0x04 |
153 | tlbivax 0,r6 | 153 | tlbivax 0,r6 |
154 | #ifdef CONFIG_SMP | 154 | TLBSYNC |
155 | tlbsync | ||
156 | #endif | ||
157 | /* Invalidate TLB1 */ | 155 | /* Invalidate TLB1 */ |
158 | li r6,0x0c | 156 | li r6,0x0c |
159 | tlbivax 0,r6 | 157 | tlbivax 0,r6 |
160 | #ifdef CONFIG_SMP | 158 | TLBSYNC |
161 | tlbsync | ||
162 | #endif | ||
163 | msync | ||
164 | 159 | ||
165 | /* 3. Setup a temp mapping and jump to it */ | 160 | /* 3. Setup a temp mapping and jump to it */ |
166 | andi. r5, r3, 0x1 /* Find an entry not used and is non-zero */ | 161 | andi. r5, r3, 0x1 /* Find an entry not used and is non-zero */ |
@@ -238,10 +233,7 @@ skpinv: addi r6,r6,1 /* Increment */ | |||
238 | /* Invalidate TLB1 */ | 233 | /* Invalidate TLB1 */ |
239 | li r9,0x0c | 234 | li r9,0x0c |
240 | tlbivax 0,r9 | 235 | tlbivax 0,r9 |
241 | #ifdef CONFIG_SMP | 236 | TLBSYNC |
242 | tlbsync | ||
243 | #endif | ||
244 | msync | ||
245 | 237 | ||
246 | /* 6. Setup KERNELBASE mapping in TLB1[0] */ | 238 | /* 6. Setup KERNELBASE mapping in TLB1[0] */ |
247 | lis r6,0x1000 /* Set MAS0(TLBSEL) = TLB1(1), ESEL = 0 */ | 239 | lis r6,0x1000 /* Set MAS0(TLBSEL) = TLB1(1), ESEL = 0 */ |
@@ -283,10 +275,7 @@ skpinv: addi r6,r6,1 /* Increment */ | |||
283 | /* Invalidate TLB1 */ | 275 | /* Invalidate TLB1 */ |
284 | li r9,0x0c | 276 | li r9,0x0c |
285 | tlbivax 0,r9 | 277 | tlbivax 0,r9 |
286 | #ifdef CONFIG_SMP | 278 | TLBSYNC |
287 | tlbsync | ||
288 | #endif | ||
289 | msync | ||
290 | 279 | ||
291 | /* Establish the interrupt vector offsets */ | 280 | /* Establish the interrupt vector offsets */ |
292 | SET_IVOR(0, CriticalInput); | 281 | SET_IVOR(0, CriticalInput); |
@@ -483,90 +472,16 @@ interrupt_base: | |||
483 | 472 | ||
484 | /* Data Storage Interrupt */ | 473 | /* Data Storage Interrupt */ |
485 | START_EXCEPTION(DataStorage) | 474 | START_EXCEPTION(DataStorage) |
486 | mtspr SPRN_SPRG0, r10 /* Save some working registers */ | 475 | NORMAL_EXCEPTION_PROLOG |
487 | mtspr SPRN_SPRG1, r11 | 476 | mfspr r5,SPRN_ESR /* Grab the ESR, save it, pass arg3 */ |
488 | mtspr SPRN_SPRG4W, r12 | 477 | stw r5,_ESR(r11) |
489 | mtspr SPRN_SPRG5W, r13 | 478 | mfspr r4,SPRN_DEAR /* Grab the DEAR, save it, pass arg2 */ |
490 | mfcr r11 | 479 | andis. r10,r5,(ESR_ILK|ESR_DLK)@h |
491 | mtspr SPRN_SPRG7W, r11 | 480 | bne 1f |
492 | 481 | EXC_XFER_EE_LITE(0x0300, handle_page_fault) | |
493 | /* | 482 | 1: |
494 | * Check if it was a store fault, if not then bail | 483 | addi r3,r1,STACK_FRAME_OVERHEAD |
495 | * because a user tried to access a kernel or | 484 | EXC_XFER_EE_LITE(0x0300, CacheLockingException) |
496 | * read-protected page. Otherwise, get the | ||
497 | * offending address and handle it. | ||
498 | */ | ||
499 | mfspr r10, SPRN_ESR | ||
500 | andis. r10, r10, ESR_ST@h | ||
501 | beq 2f | ||
502 | |||
503 | mfspr r10, SPRN_DEAR /* Get faulting address */ | ||
504 | |||
505 | /* If we are faulting a kernel address, we have to use the | ||
506 | * kernel page tables. | ||
507 | */ | ||
508 | lis r11, PAGE_OFFSET@h | ||
509 | cmplw 0, r10, r11 | ||
510 | bge 2f | ||
511 | |||
512 | /* Get the PGD for the current thread */ | ||
513 | 3: | ||
514 | mfspr r11,SPRN_SPRG3 | ||
515 | lwz r11,PGDIR(r11) | ||
516 | 4: | ||
517 | FIND_PTE | ||
518 | |||
519 | /* Are _PAGE_USER & _PAGE_RW set & _PAGE_HWWRITE not? */ | ||
520 | andi. r13, r11, _PAGE_RW|_PAGE_USER|_PAGE_HWWRITE | ||
521 | cmpwi 0, r13, _PAGE_RW|_PAGE_USER | ||
522 | bne 2f /* Bail if not */ | ||
523 | |||
524 | /* Update 'changed'. */ | ||
525 | ori r11, r11, _PAGE_DIRTY|_PAGE_ACCESSED|_PAGE_HWWRITE | ||
526 | stw r11, PTE_FLAGS_OFFSET(r12) /* Update Linux page table */ | ||
527 | |||
528 | /* MAS2 not updated as the entry does exist in the tlb, this | ||
529 | fault taken to detect state transition (eg: COW -> DIRTY) | ||
530 | */ | ||
531 | andi. r11, r11, _PAGE_HWEXEC | ||
532 | rlwimi r11, r11, 31, 27, 27 /* SX <- _PAGE_HWEXEC */ | ||
533 | ori r11, r11, (MAS3_UW|MAS3_SW|MAS3_UR|MAS3_SR)@l /* set static perms */ | ||
534 | |||
535 | /* update search PID in MAS6, AS = 0 */ | ||
536 | mfspr r12, SPRN_PID0 | ||
537 | slwi r12, r12, 16 | ||
538 | mtspr SPRN_MAS6, r12 | ||
539 | |||
540 | /* find the TLB index that caused the fault. It has to be here. */ | ||
541 | tlbsx 0, r10 | ||
542 | |||
543 | /* only update the perm bits, assume the RPN is fine */ | ||
544 | mfspr r12, SPRN_MAS3 | ||
545 | rlwimi r12, r11, 0, 20, 31 | ||
546 | mtspr SPRN_MAS3,r12 | ||
547 | tlbwe | ||
548 | |||
549 | /* Done...restore registers and get out of here. */ | ||
550 | mfspr r11, SPRN_SPRG7R | ||
551 | mtcr r11 | ||
552 | mfspr r13, SPRN_SPRG5R | ||
553 | mfspr r12, SPRN_SPRG4R | ||
554 | mfspr r11, SPRN_SPRG1 | ||
555 | mfspr r10, SPRN_SPRG0 | ||
556 | rfi /* Force context change */ | ||
557 | |||
558 | 2: | ||
559 | /* | ||
560 | * The bailout. Restore registers to pre-exception conditions | ||
561 | * and call the heavyweights to help us out. | ||
562 | */ | ||
563 | mfspr r11, SPRN_SPRG7R | ||
564 | mtcr r11 | ||
565 | mfspr r13, SPRN_SPRG5R | ||
566 | mfspr r12, SPRN_SPRG4R | ||
567 | mfspr r11, SPRN_SPRG1 | ||
568 | mfspr r10, SPRN_SPRG0 | ||
569 | b data_access | ||
570 | 485 | ||
571 | /* Instruction Storage Interrupt */ | 486 | /* Instruction Storage Interrupt */ |
572 | INSTRUCTION_STORAGE_EXCEPTION | 487 | INSTRUCTION_STORAGE_EXCEPTION |
@@ -645,15 +560,30 @@ interrupt_base: | |||
645 | lwz r11,PGDIR(r11) | 560 | lwz r11,PGDIR(r11) |
646 | 561 | ||
647 | 4: | 562 | 4: |
563 | /* Mask of required permission bits. Note that while we | ||
564 | * do copy ESR:ST to _PAGE_RW position as trying to write | ||
565 | * to an RO page is pretty common, we don't do it with | ||
566 | * _PAGE_DIRTY. We could do it, but it's a fairly rare | ||
567 | * event so I'd rather take the overhead when it happens | ||
568 | * rather than adding an instruction here. We should measure | ||
569 | * whether the whole thing is worth it in the first place | ||
570 | * as we could avoid loading SPRN_ESR completely in the first | ||
571 | * place... | ||
572 | * | ||
573 | * TODO: Is it worth doing that mfspr & rlwimi in the first | ||
574 | * place or can we save a couple of instructions here ? | ||
575 | */ | ||
576 | mfspr r12,SPRN_ESR | ||
577 | li r13,_PAGE_PRESENT|_PAGE_ACCESSED | ||
578 | rlwimi r13,r12,11,29,29 | ||
579 | |||
648 | FIND_PTE | 580 | FIND_PTE |
649 | andi. r13, r11, _PAGE_PRESENT /* Is the page present? */ | 581 | andc. r13,r13,r11 /* Check permission */ |
650 | beq 2f /* Bail if not present */ | 582 | bne 2f /* Bail if permission mismach */ |
651 | 583 | ||
652 | #ifdef CONFIG_PTE_64BIT | 584 | #ifdef CONFIG_PTE_64BIT |
653 | lwz r13, 0(r12) | 585 | lwz r13, 0(r12) |
654 | #endif | 586 | #endif |
655 | ori r11, r11, _PAGE_ACCESSED | ||
656 | stw r11, PTE_FLAGS_OFFSET(r12) | ||
657 | 587 | ||
658 | /* Jump to common tlb load */ | 588 | /* Jump to common tlb load */ |
659 | b finish_tlb_load | 589 | b finish_tlb_load |
@@ -667,7 +597,7 @@ interrupt_base: | |||
667 | mfspr r12, SPRN_SPRG4R | 597 | mfspr r12, SPRN_SPRG4R |
668 | mfspr r11, SPRN_SPRG1 | 598 | mfspr r11, SPRN_SPRG1 |
669 | mfspr r10, SPRN_SPRG0 | 599 | mfspr r10, SPRN_SPRG0 |
670 | b data_access | 600 | b DataStorage |
671 | 601 | ||
672 | /* Instruction TLB Error Interrupt */ | 602 | /* Instruction TLB Error Interrupt */ |
673 | /* | 603 | /* |
@@ -705,15 +635,16 @@ interrupt_base: | |||
705 | lwz r11,PGDIR(r11) | 635 | lwz r11,PGDIR(r11) |
706 | 636 | ||
707 | 4: | 637 | 4: |
638 | /* Make up the required permissions */ | ||
639 | li r13,_PAGE_PRESENT | _PAGE_ACCESSED | _PAGE_HWEXEC | ||
640 | |||
708 | FIND_PTE | 641 | FIND_PTE |
709 | andi. r13, r11, _PAGE_PRESENT /* Is the page present? */ | 642 | andc. r13,r13,r11 /* Check permission */ |
710 | beq 2f /* Bail if not present */ | 643 | bne 2f /* Bail if permission mismach */ |
711 | 644 | ||
712 | #ifdef CONFIG_PTE_64BIT | 645 | #ifdef CONFIG_PTE_64BIT |
713 | lwz r13, 0(r12) | 646 | lwz r13, 0(r12) |
714 | #endif | 647 | #endif |
715 | ori r11, r11, _PAGE_ACCESSED | ||
716 | stw r11, PTE_FLAGS_OFFSET(r12) | ||
717 | 648 | ||
718 | /* Jump to common TLB load point */ | 649 | /* Jump to common TLB load point */ |
719 | b finish_tlb_load | 650 | b finish_tlb_load |
@@ -768,29 +699,13 @@ interrupt_base: | |||
768 | * Local functions | 699 | * Local functions |
769 | */ | 700 | */ |
770 | 701 | ||
771 | /* | ||
772 | * Data TLB exceptions will bail out to this point | ||
773 | * if they can't resolve the lightweight TLB fault. | ||
774 | */ | ||
775 | data_access: | ||
776 | NORMAL_EXCEPTION_PROLOG | ||
777 | mfspr r5,SPRN_ESR /* Grab the ESR, save it, pass arg3 */ | ||
778 | stw r5,_ESR(r11) | ||
779 | mfspr r4,SPRN_DEAR /* Grab the DEAR, save it, pass arg2 */ | ||
780 | andis. r10,r5,(ESR_ILK|ESR_DLK)@h | ||
781 | bne 1f | ||
782 | EXC_XFER_EE_LITE(0x0300, handle_page_fault) | ||
783 | 1: | ||
784 | addi r3,r1,STACK_FRAME_OVERHEAD | ||
785 | EXC_XFER_EE_LITE(0x0300, CacheLockingException) | ||
786 | |||
787 | /* | 702 | /* |
788 | |||
789 | * Both the instruction and data TLB miss get to this | 703 | * Both the instruction and data TLB miss get to this |
790 | * point to load the TLB. | 704 | * point to load the TLB. |
791 | * r10 - EA of fault | 705 | * r10 - EA of fault |
792 | * r11 - TLB (info from Linux PTE) | 706 | * r11 - TLB (info from Linux PTE) |
793 | * r12, r13 - available to use | 707 | * r12 - available to use |
708 | * r13 - upper bits of PTE (if PTE_64BIT) or available to use | ||
794 | * CR5 - results of addr >= PAGE_OFFSET | 709 | * CR5 - results of addr >= PAGE_OFFSET |
795 | * MAS0, MAS1 - loaded with proper value when we get here | 710 | * MAS0, MAS1 - loaded with proper value when we get here |
796 | * MAS2, MAS3 - will need additional info from Linux PTE | 711 | * MAS2, MAS3 - will need additional info from Linux PTE |
@@ -812,20 +727,14 @@ finish_tlb_load: | |||
812 | #endif | 727 | #endif |
813 | mtspr SPRN_MAS2, r12 | 728 | mtspr SPRN_MAS2, r12 |
814 | 729 | ||
815 | bge 5, 1f | 730 | li r10, (_PAGE_HWEXEC | _PAGE_PRESENT) |
816 | 731 | rlwimi r10, r11, 31, 29, 29 /* extract _PAGE_DIRTY into SW */ | |
817 | /* is user addr */ | 732 | and r12, r11, r10 |
818 | andi. r12, r11, (_PAGE_USER | _PAGE_HWWRITE | _PAGE_HWEXEC) | ||
819 | andi. r10, r11, _PAGE_USER /* Test for _PAGE_USER */ | 733 | andi. r10, r11, _PAGE_USER /* Test for _PAGE_USER */ |
820 | srwi r10, r12, 1 | 734 | slwi r10, r12, 1 |
821 | or r12, r12, r10 /* Copy user perms into supervisor */ | 735 | or r10, r10, r12 |
822 | iseleq r12, 0, r12 | 736 | iseleq r12, r12, r10 |
823 | b 2f | 737 | |
824 | |||
825 | /* is kernel addr */ | ||
826 | 1: rlwinm r12, r11, 31, 29, 29 /* Extract _PAGE_HWWRITE into SW */ | ||
827 | ori r12, r12, (MAS3_SX | MAS3_SR) | ||
828 | |||
829 | #ifdef CONFIG_PTE_64BIT | 738 | #ifdef CONFIG_PTE_64BIT |
830 | 2: rlwimi r12, r13, 24, 0, 7 /* grab RPN[32:39] */ | 739 | 2: rlwimi r12, r13, 24, 0, 7 /* grab RPN[32:39] */ |
831 | rlwimi r12, r11, 24, 8, 19 /* grab RPN[40:51] */ | 740 | rlwimi r12, r11, 24, 8, 19 /* grab RPN[40:51] */ |
diff --git a/arch/powerpc/kernel/iommu.c b/arch/powerpc/kernel/iommu.c index 8c68ee9e5d1c..2385f68c1751 100644 --- a/arch/powerpc/kernel/iommu.c +++ b/arch/powerpc/kernel/iommu.c | |||
@@ -186,7 +186,8 @@ static unsigned long iommu_range_alloc(struct device *dev, | |||
186 | static dma_addr_t iommu_alloc(struct device *dev, struct iommu_table *tbl, | 186 | static dma_addr_t iommu_alloc(struct device *dev, struct iommu_table *tbl, |
187 | void *page, unsigned int npages, | 187 | void *page, unsigned int npages, |
188 | enum dma_data_direction direction, | 188 | enum dma_data_direction direction, |
189 | unsigned long mask, unsigned int align_order) | 189 | unsigned long mask, unsigned int align_order, |
190 | struct dma_attrs *attrs) | ||
190 | { | 191 | { |
191 | unsigned long entry, flags; | 192 | unsigned long entry, flags; |
192 | dma_addr_t ret = DMA_ERROR_CODE; | 193 | dma_addr_t ret = DMA_ERROR_CODE; |
@@ -205,7 +206,7 @@ static dma_addr_t iommu_alloc(struct device *dev, struct iommu_table *tbl, | |||
205 | 206 | ||
206 | /* Put the TCEs in the HW table */ | 207 | /* Put the TCEs in the HW table */ |
207 | ppc_md.tce_build(tbl, entry, npages, (unsigned long)page & IOMMU_PAGE_MASK, | 208 | ppc_md.tce_build(tbl, entry, npages, (unsigned long)page & IOMMU_PAGE_MASK, |
208 | direction); | 209 | direction, attrs); |
209 | 210 | ||
210 | 211 | ||
211 | /* Flush/invalidate TLB caches if necessary */ | 212 | /* Flush/invalidate TLB caches if necessary */ |
@@ -336,7 +337,8 @@ int iommu_map_sg(struct device *dev, struct iommu_table *tbl, | |||
336 | npages, entry, dma_addr); | 337 | npages, entry, dma_addr); |
337 | 338 | ||
338 | /* Insert into HW table */ | 339 | /* Insert into HW table */ |
339 | ppc_md.tce_build(tbl, entry, npages, vaddr & IOMMU_PAGE_MASK, direction); | 340 | ppc_md.tce_build(tbl, entry, npages, vaddr & IOMMU_PAGE_MASK, |
341 | direction, attrs); | ||
340 | 342 | ||
341 | /* If we are in an open segment, try merging */ | 343 | /* If we are in an open segment, try merging */ |
342 | if (segstart != s) { | 344 | if (segstart != s) { |
@@ -573,7 +575,8 @@ dma_addr_t iommu_map_single(struct device *dev, struct iommu_table *tbl, | |||
573 | align = PAGE_SHIFT - IOMMU_PAGE_SHIFT; | 575 | align = PAGE_SHIFT - IOMMU_PAGE_SHIFT; |
574 | 576 | ||
575 | dma_handle = iommu_alloc(dev, tbl, vaddr, npages, direction, | 577 | dma_handle = iommu_alloc(dev, tbl, vaddr, npages, direction, |
576 | mask >> IOMMU_PAGE_SHIFT, align); | 578 | mask >> IOMMU_PAGE_SHIFT, align, |
579 | attrs); | ||
577 | if (dma_handle == DMA_ERROR_CODE) { | 580 | if (dma_handle == DMA_ERROR_CODE) { |
578 | if (printk_ratelimit()) { | 581 | if (printk_ratelimit()) { |
579 | printk(KERN_INFO "iommu_alloc failed, " | 582 | printk(KERN_INFO "iommu_alloc failed, " |
@@ -642,7 +645,7 @@ void *iommu_alloc_coherent(struct device *dev, struct iommu_table *tbl, | |||
642 | nio_pages = size >> IOMMU_PAGE_SHIFT; | 645 | nio_pages = size >> IOMMU_PAGE_SHIFT; |
643 | io_order = get_iommu_order(size); | 646 | io_order = get_iommu_order(size); |
644 | mapping = iommu_alloc(dev, tbl, ret, nio_pages, DMA_BIDIRECTIONAL, | 647 | mapping = iommu_alloc(dev, tbl, ret, nio_pages, DMA_BIDIRECTIONAL, |
645 | mask >> IOMMU_PAGE_SHIFT, io_order); | 648 | mask >> IOMMU_PAGE_SHIFT, io_order, NULL); |
646 | if (mapping == DMA_ERROR_CODE) { | 649 | if (mapping == DMA_ERROR_CODE) { |
647 | free_pages((unsigned long)ret, order); | 650 | free_pages((unsigned long)ret, order); |
648 | return NULL; | 651 | return NULL; |
diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c index 063cdd413049..224e9a11765c 100644 --- a/arch/powerpc/kernel/pci-common.c +++ b/arch/powerpc/kernel/pci-common.c | |||
@@ -598,6 +598,7 @@ void __devinit pci_process_bridge_OF_ranges(struct pci_controller *hose, | |||
598 | res->start = pci_addr; | 598 | res->start = pci_addr; |
599 | break; | 599 | break; |
600 | case 2: /* PCI Memory space */ | 600 | case 2: /* PCI Memory space */ |
601 | case 3: /* PCI 64 bits Memory space */ | ||
601 | printk(KERN_INFO | 602 | printk(KERN_INFO |
602 | " MEM 0x%016llx..0x%016llx -> 0x%016llx %s\n", | 603 | " MEM 0x%016llx..0x%016llx -> 0x%016llx %s\n", |
603 | cpu_addr, cpu_addr + size - 1, pci_addr, | 604 | cpu_addr, cpu_addr + size - 1, pci_addr, |
diff --git a/arch/powerpc/kernel/prom_parse.c b/arch/powerpc/kernel/prom_parse.c index 90eb3a3e383e..bc1fb27368af 100644 --- a/arch/powerpc/kernel/prom_parse.c +++ b/arch/powerpc/kernel/prom_parse.c | |||
@@ -128,12 +128,35 @@ static void of_bus_pci_count_cells(struct device_node *np, | |||
128 | *sizec = 2; | 128 | *sizec = 2; |
129 | } | 129 | } |
130 | 130 | ||
131 | static unsigned int of_bus_pci_get_flags(const u32 *addr) | ||
132 | { | ||
133 | unsigned int flags = 0; | ||
134 | u32 w = addr[0]; | ||
135 | |||
136 | switch((w >> 24) & 0x03) { | ||
137 | case 0x01: | ||
138 | flags |= IORESOURCE_IO; | ||
139 | break; | ||
140 | case 0x02: /* 32 bits */ | ||
141 | case 0x03: /* 64 bits */ | ||
142 | flags |= IORESOURCE_MEM; | ||
143 | break; | ||
144 | } | ||
145 | if (w & 0x40000000) | ||
146 | flags |= IORESOURCE_PREFETCH; | ||
147 | return flags; | ||
148 | } | ||
149 | |||
131 | static u64 of_bus_pci_map(u32 *addr, const u32 *range, int na, int ns, int pna) | 150 | static u64 of_bus_pci_map(u32 *addr, const u32 *range, int na, int ns, int pna) |
132 | { | 151 | { |
133 | u64 cp, s, da; | 152 | u64 cp, s, da; |
153 | unsigned int af, rf; | ||
154 | |||
155 | af = of_bus_pci_get_flags(addr); | ||
156 | rf = of_bus_pci_get_flags(range); | ||
134 | 157 | ||
135 | /* Check address type match */ | 158 | /* Check address type match */ |
136 | if ((addr[0] ^ range[0]) & 0x03000000) | 159 | if ((af ^ rf) & (IORESOURCE_MEM | IORESOURCE_IO)) |
137 | return OF_BAD_ADDR; | 160 | return OF_BAD_ADDR; |
138 | 161 | ||
139 | /* Read address values, skipping high cell */ | 162 | /* Read address values, skipping high cell */ |
@@ -153,25 +176,6 @@ static int of_bus_pci_translate(u32 *addr, u64 offset, int na) | |||
153 | return of_bus_default_translate(addr + 1, offset, na - 1); | 176 | return of_bus_default_translate(addr + 1, offset, na - 1); |
154 | } | 177 | } |
155 | 178 | ||
156 | static unsigned int of_bus_pci_get_flags(const u32 *addr) | ||
157 | { | ||
158 | unsigned int flags = 0; | ||
159 | u32 w = addr[0]; | ||
160 | |||
161 | switch((w >> 24) & 0x03) { | ||
162 | case 0x01: | ||
163 | flags |= IORESOURCE_IO; | ||
164 | break; | ||
165 | case 0x02: /* 32 bits */ | ||
166 | case 0x03: /* 64 bits */ | ||
167 | flags |= IORESOURCE_MEM; | ||
168 | break; | ||
169 | } | ||
170 | if (w & 0x40000000) | ||
171 | flags |= IORESOURCE_PREFETCH; | ||
172 | return flags; | ||
173 | } | ||
174 | |||
175 | const u32 *of_get_pci_address(struct device_node *dev, int bar_no, u64 *size, | 179 | const u32 *of_get_pci_address(struct device_node *dev, int bar_no, u64 *size, |
176 | unsigned int *flags) | 180 | unsigned int *flags) |
177 | { | 181 | { |
diff --git a/arch/powerpc/kernel/stacktrace.c b/arch/powerpc/kernel/stacktrace.c index 071bee3ec749..f2589645870a 100644 --- a/arch/powerpc/kernel/stacktrace.c +++ b/arch/powerpc/kernel/stacktrace.c | |||
@@ -59,6 +59,6 @@ EXPORT_SYMBOL_GPL(save_stack_trace); | |||
59 | 59 | ||
60 | void save_stack_trace_tsk(struct task_struct *tsk, struct stack_trace *trace) | 60 | void save_stack_trace_tsk(struct task_struct *tsk, struct stack_trace *trace) |
61 | { | 61 | { |
62 | save_context_stack(trace, tsk->thread.regs->gpr[1], tsk, 0); | 62 | save_context_stack(trace, tsk->thread.ksp, tsk, 0); |
63 | } | 63 | } |
64 | EXPORT_SYMBOL_GPL(save_stack_trace_tsk); | 64 | EXPORT_SYMBOL_GPL(save_stack_trace_tsk); |
diff --git a/arch/powerpc/kernel/sysfs.c b/arch/powerpc/kernel/sysfs.c index c8127f832df0..aba0ba95f062 100644 --- a/arch/powerpc/kernel/sysfs.c +++ b/arch/powerpc/kernel/sysfs.c | |||
@@ -28,7 +28,9 @@ static DEFINE_PER_CPU(struct cpu, cpu_devices); | |||
28 | /* Time in microseconds we delay before sleeping in the idle loop */ | 28 | /* Time in microseconds we delay before sleeping in the idle loop */ |
29 | DEFINE_PER_CPU(unsigned long, smt_snooze_delay) = { 100 }; | 29 | DEFINE_PER_CPU(unsigned long, smt_snooze_delay) = { 100 }; |
30 | 30 | ||
31 | static ssize_t store_smt_snooze_delay(struct sys_device *dev, const char *buf, | 31 | static ssize_t store_smt_snooze_delay(struct sys_device *dev, |
32 | struct sysdev_attribute *attr, | ||
33 | const char *buf, | ||
32 | size_t count) | 34 | size_t count) |
33 | { | 35 | { |
34 | struct cpu *cpu = container_of(dev, struct cpu, sysdev); | 36 | struct cpu *cpu = container_of(dev, struct cpu, sysdev); |
@@ -44,7 +46,9 @@ static ssize_t store_smt_snooze_delay(struct sys_device *dev, const char *buf, | |||
44 | return count; | 46 | return count; |
45 | } | 47 | } |
46 | 48 | ||
47 | static ssize_t show_smt_snooze_delay(struct sys_device *dev, char *buf) | 49 | static ssize_t show_smt_snooze_delay(struct sys_device *dev, |
50 | struct sysdev_attribute *attr, | ||
51 | char *buf) | ||
48 | { | 52 | { |
49 | struct cpu *cpu = container_of(dev, struct cpu, sysdev); | 53 | struct cpu *cpu = container_of(dev, struct cpu, sysdev); |
50 | 54 | ||
@@ -152,14 +156,17 @@ static unsigned long write_##NAME(unsigned long val) \ | |||
152 | mtspr(ADDRESS, val); \ | 156 | mtspr(ADDRESS, val); \ |
153 | return 0; \ | 157 | return 0; \ |
154 | } \ | 158 | } \ |
155 | static ssize_t show_##NAME(struct sys_device *dev, char *buf) \ | 159 | static ssize_t show_##NAME(struct sys_device *dev, \ |
160 | struct sysdev_attribute *attr, \ | ||
161 | char *buf) \ | ||
156 | { \ | 162 | { \ |
157 | struct cpu *cpu = container_of(dev, struct cpu, sysdev); \ | 163 | struct cpu *cpu = container_of(dev, struct cpu, sysdev); \ |
158 | unsigned long val = run_on_cpu(cpu->sysdev.id, read_##NAME, 0); \ | 164 | unsigned long val = run_on_cpu(cpu->sysdev.id, read_##NAME, 0); \ |
159 | return sprintf(buf, "%lx\n", val); \ | 165 | return sprintf(buf, "%lx\n", val); \ |
160 | } \ | 166 | } \ |
161 | static ssize_t __used \ | 167 | static ssize_t __used \ |
162 | store_##NAME(struct sys_device *dev, const char *buf, size_t count) \ | 168 | store_##NAME(struct sys_device *dev, struct sysdev_attribute *attr, \ |
169 | const char *buf, size_t count) \ | ||
163 | { \ | 170 | { \ |
164 | struct cpu *cpu = container_of(dev, struct cpu, sysdev); \ | 171 | struct cpu *cpu = container_of(dev, struct cpu, sysdev); \ |
165 | unsigned long val; \ | 172 | unsigned long val; \ |
diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S index 87a72c66ce27..a914411bced5 100644 --- a/arch/powerpc/kernel/vmlinux.lds.S +++ b/arch/powerpc/kernel/vmlinux.lds.S | |||
@@ -9,6 +9,25 @@ | |||
9 | 9 | ||
10 | ENTRY(_stext) | 10 | ENTRY(_stext) |
11 | 11 | ||
12 | PHDRS { | ||
13 | kernel PT_LOAD FLAGS(7); /* RWX */ | ||
14 | notes PT_NOTE FLAGS(0); | ||
15 | dummy PT_NOTE FLAGS(0); | ||
16 | |||
17 | /* binutils < 2.18 has a bug that makes it misbehave when taking an | ||
18 | ELF file with all segments at load address 0 as input. This | ||
19 | happens when running "strip" on vmlinux, because of the AT() magic | ||
20 | in this linker script. People using GCC >= 4.2 won't run into | ||
21 | this problem, because the "build-id" support will put some data | ||
22 | into the "notes" segment (at a non-zero load address). | ||
23 | |||
24 | To work around this, we force some data into both the "dummy" | ||
25 | segment and the kernel segment, so the dummy segment will get a | ||
26 | non-zero load address. It's not enough to always create the | ||
27 | "notes" segment, since if nothing gets assigned to it, its load | ||
28 | address will be zero. */ | ||
29 | } | ||
30 | |||
12 | #ifdef CONFIG_PPC64 | 31 | #ifdef CONFIG_PPC64 |
13 | OUTPUT_ARCH(powerpc:common64) | 32 | OUTPUT_ARCH(powerpc:common64) |
14 | jiffies = jiffies_64; | 33 | jiffies = jiffies_64; |
@@ -50,7 +69,7 @@ SECTIONS | |||
50 | . = ALIGN(PAGE_SIZE); | 69 | . = ALIGN(PAGE_SIZE); |
51 | _etext = .; | 70 | _etext = .; |
52 | PROVIDE32 (etext = .); | 71 | PROVIDE32 (etext = .); |
53 | } | 72 | } :kernel |
54 | 73 | ||
55 | /* Read-only data */ | 74 | /* Read-only data */ |
56 | RODATA | 75 | RODATA |
@@ -62,7 +81,13 @@ SECTIONS | |||
62 | __stop___ex_table = .; | 81 | __stop___ex_table = .; |
63 | } | 82 | } |
64 | 83 | ||
65 | NOTES | 84 | NOTES :kernel :notes |
85 | |||
86 | /* The dummy segment contents for the bug workaround mentioned above | ||
87 | near PHDRS. */ | ||
88 | .dummy : { | ||
89 | LONG(0xf177) | ||
90 | } :kernel :dummy | ||
66 | 91 | ||
67 | /* | 92 | /* |
68 | * Init sections discarded at runtime | 93 | * Init sections discarded at runtime |
@@ -74,7 +99,7 @@ SECTIONS | |||
74 | _sinittext = .; | 99 | _sinittext = .; |
75 | INIT_TEXT | 100 | INIT_TEXT |
76 | _einittext = .; | 101 | _einittext = .; |
77 | } | 102 | } :kernel |
78 | 103 | ||
79 | /* .exit.text is discarded at runtime, not link time, | 104 | /* .exit.text is discarded at runtime, not link time, |
80 | * to deal with references from __bug_table | 105 | * to deal with references from __bug_table |
diff --git a/arch/powerpc/lib/feature-fixups.c b/arch/powerpc/lib/feature-fixups.c index 4e43702b9813..8c5a03be31e0 100644 --- a/arch/powerpc/lib/feature-fixups.c +++ b/arch/powerpc/lib/feature-fixups.c | |||
@@ -99,7 +99,7 @@ void do_feature_fixups(unsigned long value, void *fixup_start, void *fixup_end) | |||
99 | 99 | ||
100 | for (; fcur < fend; fcur++) { | 100 | for (; fcur < fend; fcur++) { |
101 | if (patch_feature_section(value, fcur)) { | 101 | if (patch_feature_section(value, fcur)) { |
102 | __WARN(); | 102 | WARN_ON(1); |
103 | printk("Unable to patch feature section at %p - %p" \ | 103 | printk("Unable to patch feature section at %p - %p" \ |
104 | " with %p - %p\n", | 104 | " with %p - %p\n", |
105 | calc_addr(fcur, fcur->start_off), | 105 | calc_addr(fcur, fcur->start_off), |
diff --git a/arch/powerpc/lib/string.S b/arch/powerpc/lib/string.S index 49eb1f1a2bb4..64e2e499e32a 100644 --- a/arch/powerpc/lib/string.S +++ b/arch/powerpc/lib/string.S | |||
@@ -13,13 +13,7 @@ | |||
13 | #include <asm/ppc_asm.h> | 13 | #include <asm/ppc_asm.h> |
14 | 14 | ||
15 | .section __ex_table,"a" | 15 | .section __ex_table,"a" |
16 | #ifdef CONFIG_PPC64 | 16 | PPC_LONG_ALIGN |
17 | .align 3 | ||
18 | #define EXTBL .llong | ||
19 | #else | ||
20 | .align 2 | ||
21 | #define EXTBL .long | ||
22 | #endif | ||
23 | .text | 17 | .text |
24 | 18 | ||
25 | _GLOBAL(strcpy) | 19 | _GLOBAL(strcpy) |
@@ -160,9 +154,9 @@ _GLOBAL(__clear_user) | |||
160 | blr | 154 | blr |
161 | 155 | ||
162 | .section __ex_table,"a" | 156 | .section __ex_table,"a" |
163 | EXTBL 11b,90b | 157 | PPC_LONG 11b,90b |
164 | EXTBL 1b,91b | 158 | PPC_LONG 1b,91b |
165 | EXTBL 8b,92b | 159 | PPC_LONG 8b,92b |
166 | .text | 160 | .text |
167 | 161 | ||
168 | _GLOBAL(__strncpy_from_user) | 162 | _GLOBAL(__strncpy_from_user) |
@@ -183,7 +177,7 @@ _GLOBAL(__strncpy_from_user) | |||
183 | blr | 177 | blr |
184 | 178 | ||
185 | .section __ex_table,"a" | 179 | .section __ex_table,"a" |
186 | EXTBL 1b,99b | 180 | PPC_LONG 1b,99b |
187 | .text | 181 | .text |
188 | 182 | ||
189 | /* r3 = str, r4 = len (> 0), r5 = top (highest addr) */ | 183 | /* r3 = str, r4 = len (> 0), r5 = top (highest addr) */ |
@@ -208,4 +202,4 @@ _GLOBAL(__strnlen_user) | |||
208 | blr | 202 | blr |
209 | 203 | ||
210 | .section __ex_table,"a" | 204 | .section __ex_table,"a" |
211 | EXTBL 1b,99b | 205 | PPC_LONG 1b,99b |
diff --git a/arch/powerpc/platforms/52xx/Kconfig b/arch/powerpc/platforms/52xx/Kconfig index acd2fc8cf492..d664b1bce381 100644 --- a/arch/powerpc/platforms/52xx/Kconfig +++ b/arch/powerpc/platforms/52xx/Kconfig | |||
@@ -3,6 +3,7 @@ config PPC_MPC52xx | |||
3 | depends on PPC_MULTIPLATFORM && PPC32 | 3 | depends on PPC_MULTIPLATFORM && PPC32 |
4 | select FSL_SOC | 4 | select FSL_SOC |
5 | select PPC_CLOCK | 5 | select PPC_CLOCK |
6 | select PPC_PCI_CHOICE | ||
6 | 7 | ||
7 | config PPC_MPC5200_SIMPLE | 8 | config PPC_MPC5200_SIMPLE |
8 | bool "Generic support for simple MPC5200 based boards" | 9 | bool "Generic support for simple MPC5200 based boards" |
diff --git a/arch/powerpc/platforms/82xx/Kconfig b/arch/powerpc/platforms/82xx/Kconfig index 1c8034bfa796..75eb1ede5497 100644 --- a/arch/powerpc/platforms/82xx/Kconfig +++ b/arch/powerpc/platforms/82xx/Kconfig | |||
@@ -30,6 +30,7 @@ config EP8248E | |||
30 | select 8272 | 30 | select 8272 |
31 | select 8260 | 31 | select 8260 |
32 | select FSL_SOC | 32 | select FSL_SOC |
33 | select PHYLIB | ||
33 | select MDIO_BITBANG | 34 | select MDIO_BITBANG |
34 | help | 35 | help |
35 | This enables support for the Embedded Planet EP8248E board. | 36 | This enables support for the Embedded Planet EP8248E board. |
diff --git a/arch/powerpc/platforms/82xx/ep8248e.c b/arch/powerpc/platforms/82xx/ep8248e.c index 373e993a5ed5..d5770fdf7f09 100644 --- a/arch/powerpc/platforms/82xx/ep8248e.c +++ b/arch/powerpc/platforms/82xx/ep8248e.c | |||
@@ -59,7 +59,6 @@ static void __init ep8248e_pic_init(void) | |||
59 | of_node_put(np); | 59 | of_node_put(np); |
60 | } | 60 | } |
61 | 61 | ||
62 | #ifdef CONFIG_FS_ENET_MDIO_FCC | ||
63 | static void ep8248e_set_mdc(struct mdiobb_ctrl *ctrl, int level) | 62 | static void ep8248e_set_mdc(struct mdiobb_ctrl *ctrl, int level) |
64 | { | 63 | { |
65 | if (level) | 64 | if (level) |
@@ -165,7 +164,6 @@ static struct of_platform_driver ep8248e_mdio_driver = { | |||
165 | .probe = ep8248e_mdio_probe, | 164 | .probe = ep8248e_mdio_probe, |
166 | .remove = ep8248e_mdio_remove, | 165 | .remove = ep8248e_mdio_remove, |
167 | }; | 166 | }; |
168 | #endif | ||
169 | 167 | ||
170 | struct cpm_pin { | 168 | struct cpm_pin { |
171 | int port, pin, flags; | 169 | int port, pin, flags; |
@@ -298,9 +296,7 @@ static __initdata struct of_device_id of_bus_ids[] = { | |||
298 | static int __init declare_of_platform_devices(void) | 296 | static int __init declare_of_platform_devices(void) |
299 | { | 297 | { |
300 | of_platform_bus_probe(NULL, of_bus_ids, NULL); | 298 | of_platform_bus_probe(NULL, of_bus_ids, NULL); |
301 | #ifdef CONFIG_FS_ENET_MDIO_FCC | ||
302 | of_register_platform_driver(&ep8248e_mdio_driver); | 299 | of_register_platform_driver(&ep8248e_mdio_driver); |
303 | #endif | ||
304 | 300 | ||
305 | return 0; | 301 | return 0; |
306 | } | 302 | } |
diff --git a/arch/powerpc/platforms/83xx/Kconfig b/arch/powerpc/platforms/83xx/Kconfig index 27d9bf86de01..6159c5d4e5f1 100644 --- a/arch/powerpc/platforms/83xx/Kconfig +++ b/arch/powerpc/platforms/83xx/Kconfig | |||
@@ -2,7 +2,8 @@ menuconfig PPC_83xx | |||
2 | bool "83xx-based boards" | 2 | bool "83xx-based boards" |
3 | depends on 6xx && PPC_MULTIPLATFORM | 3 | depends on 6xx && PPC_MULTIPLATFORM |
4 | select PPC_UDBG_16550 | 4 | select PPC_UDBG_16550 |
5 | select PPC_INDIRECT_PCI | 5 | select PPC_PCI_CHOICE |
6 | select FSL_PCI if PCI | ||
6 | select FSL_SOC | 7 | select FSL_SOC |
7 | select IPIC | 8 | select IPIC |
8 | 9 | ||
diff --git a/arch/powerpc/platforms/83xx/Makefile b/arch/powerpc/platforms/83xx/Makefile index f331fd7dd836..ba5028e29890 100644 --- a/arch/powerpc/platforms/83xx/Makefile +++ b/arch/powerpc/platforms/83xx/Makefile | |||
@@ -2,7 +2,7 @@ | |||
2 | # Makefile for the PowerPC 83xx linux kernel. | 2 | # Makefile for the PowerPC 83xx linux kernel. |
3 | # | 3 | # |
4 | obj-y := misc.o usb.o | 4 | obj-y := misc.o usb.o |
5 | obj-$(CONFIG_PCI) += pci.o | 5 | obj-$(CONFIG_SUSPEND) += suspend.o suspend-asm.o |
6 | obj-$(CONFIG_MPC831x_RDB) += mpc831x_rdb.o | 6 | obj-$(CONFIG_MPC831x_RDB) += mpc831x_rdb.o |
7 | obj-$(CONFIG_MPC832x_RDB) += mpc832x_rdb.o | 7 | obj-$(CONFIG_MPC832x_RDB) += mpc832x_rdb.o |
8 | obj-$(CONFIG_MPC834x_MDS) += mpc834x_mds.o | 8 | obj-$(CONFIG_MPC834x_MDS) += mpc834x_mds.o |
diff --git a/arch/powerpc/platforms/83xx/mpc831x_rdb.c b/arch/powerpc/platforms/83xx/mpc831x_rdb.c index c4db5172b27a..a428f8d1ac80 100644 --- a/arch/powerpc/platforms/83xx/mpc831x_rdb.c +++ b/arch/powerpc/platforms/83xx/mpc831x_rdb.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <asm/time.h> | 19 | #include <asm/time.h> |
20 | #include <asm/ipic.h> | 20 | #include <asm/ipic.h> |
21 | #include <asm/udbg.h> | 21 | #include <asm/udbg.h> |
22 | #include <sysdev/fsl_pci.h> | ||
22 | 23 | ||
23 | #include "mpc83xx.h" | 24 | #include "mpc83xx.h" |
24 | 25 | ||
diff --git a/arch/powerpc/platforms/83xx/mpc832x_mds.c b/arch/powerpc/platforms/83xx/mpc832x_mds.c index 6dbc6eabcb02..dd4be4aee314 100644 --- a/arch/powerpc/platforms/83xx/mpc832x_mds.c +++ b/arch/powerpc/platforms/83xx/mpc832x_mds.c | |||
@@ -36,6 +36,7 @@ | |||
36 | #include <asm/prom.h> | 36 | #include <asm/prom.h> |
37 | #include <asm/udbg.h> | 37 | #include <asm/udbg.h> |
38 | #include <sysdev/fsl_soc.h> | 38 | #include <sysdev/fsl_soc.h> |
39 | #include <sysdev/fsl_pci.h> | ||
39 | #include <asm/qe.h> | 40 | #include <asm/qe.h> |
40 | #include <asm/qe_ic.h> | 41 | #include <asm/qe_ic.h> |
41 | 42 | ||
diff --git a/arch/powerpc/platforms/83xx/mpc832x_rdb.c b/arch/powerpc/platforms/83xx/mpc832x_rdb.c index e7f706b624fe..f049d692d4c8 100644 --- a/arch/powerpc/platforms/83xx/mpc832x_rdb.c +++ b/arch/powerpc/platforms/83xx/mpc832x_rdb.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <asm/qe.h> | 27 | #include <asm/qe.h> |
28 | #include <asm/qe_ic.h> | 28 | #include <asm/qe_ic.h> |
29 | #include <sysdev/fsl_soc.h> | 29 | #include <sysdev/fsl_soc.h> |
30 | #include <sysdev/fsl_pci.h> | ||
30 | 31 | ||
31 | #include "mpc83xx.h" | 32 | #include "mpc83xx.h" |
32 | 33 | ||
diff --git a/arch/powerpc/platforms/83xx/mpc834x_itx.c b/arch/powerpc/platforms/83xx/mpc834x_itx.c index 50e8f632061c..7301d77a08ee 100644 --- a/arch/powerpc/platforms/83xx/mpc834x_itx.c +++ b/arch/powerpc/platforms/83xx/mpc834x_itx.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <asm/prom.h> | 35 | #include <asm/prom.h> |
36 | #include <asm/udbg.h> | 36 | #include <asm/udbg.h> |
37 | #include <sysdev/fsl_soc.h> | 37 | #include <sysdev/fsl_soc.h> |
38 | #include <sysdev/fsl_pci.h> | ||
38 | 39 | ||
39 | #include "mpc83xx.h" | 40 | #include "mpc83xx.h" |
40 | 41 | ||
diff --git a/arch/powerpc/platforms/83xx/mpc834x_mds.c b/arch/powerpc/platforms/83xx/mpc834x_mds.c index 2b8a0a3f8557..30d509aa9f08 100644 --- a/arch/powerpc/platforms/83xx/mpc834x_mds.c +++ b/arch/powerpc/platforms/83xx/mpc834x_mds.c | |||
@@ -35,6 +35,7 @@ | |||
35 | #include <asm/prom.h> | 35 | #include <asm/prom.h> |
36 | #include <asm/udbg.h> | 36 | #include <asm/udbg.h> |
37 | #include <sysdev/fsl_soc.h> | 37 | #include <sysdev/fsl_soc.h> |
38 | #include <sysdev/fsl_pci.h> | ||
38 | 39 | ||
39 | #include "mpc83xx.h" | 40 | #include "mpc83xx.h" |
40 | 41 | ||
diff --git a/arch/powerpc/platforms/83xx/mpc836x_mds.c b/arch/powerpc/platforms/83xx/mpc836x_mds.c index c2e5de60c055..75b80e836576 100644 --- a/arch/powerpc/platforms/83xx/mpc836x_mds.c +++ b/arch/powerpc/platforms/83xx/mpc836x_mds.c | |||
@@ -42,6 +42,7 @@ | |||
42 | #include <asm/prom.h> | 42 | #include <asm/prom.h> |
43 | #include <asm/udbg.h> | 43 | #include <asm/udbg.h> |
44 | #include <sysdev/fsl_soc.h> | 44 | #include <sysdev/fsl_soc.h> |
45 | #include <sysdev/fsl_pci.h> | ||
45 | #include <asm/qe.h> | 46 | #include <asm/qe.h> |
46 | #include <asm/qe_ic.h> | 47 | #include <asm/qe_ic.h> |
47 | 48 | ||
diff --git a/arch/powerpc/platforms/83xx/mpc836x_rdk.c b/arch/powerpc/platforms/83xx/mpc836x_rdk.c index c10dec4bf178..a5273bb28e1b 100644 --- a/arch/powerpc/platforms/83xx/mpc836x_rdk.c +++ b/arch/powerpc/platforms/83xx/mpc836x_rdk.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <asm/qe.h> | 23 | #include <asm/qe.h> |
24 | #include <asm/qe_ic.h> | 24 | #include <asm/qe_ic.h> |
25 | #include <sysdev/fsl_soc.h> | 25 | #include <sysdev/fsl_soc.h> |
26 | #include <sysdev/fsl_pci.h> | ||
26 | 27 | ||
27 | #include "mpc83xx.h" | 28 | #include "mpc83xx.h" |
28 | 29 | ||
diff --git a/arch/powerpc/platforms/83xx/mpc837x_mds.c b/arch/powerpc/platforms/83xx/mpc837x_mds.c index 64d17b0d6455..be62de23bead 100644 --- a/arch/powerpc/platforms/83xx/mpc837x_mds.c +++ b/arch/powerpc/platforms/83xx/mpc837x_mds.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <asm/ipic.h> | 19 | #include <asm/ipic.h> |
20 | #include <asm/udbg.h> | 20 | #include <asm/udbg.h> |
21 | #include <asm/prom.h> | 21 | #include <asm/prom.h> |
22 | #include <sysdev/fsl_pci.h> | ||
22 | 23 | ||
23 | #include "mpc83xx.h" | 24 | #include "mpc83xx.h" |
24 | 25 | ||
diff --git a/arch/powerpc/platforms/83xx/mpc837x_rdb.c b/arch/powerpc/platforms/83xx/mpc837x_rdb.c index c00356bdb1dd..da030afa2e2c 100644 --- a/arch/powerpc/platforms/83xx/mpc837x_rdb.c +++ b/arch/powerpc/platforms/83xx/mpc837x_rdb.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <asm/time.h> | 17 | #include <asm/time.h> |
18 | #include <asm/ipic.h> | 18 | #include <asm/ipic.h> |
19 | #include <asm/udbg.h> | 19 | #include <asm/udbg.h> |
20 | #include <sysdev/fsl_pci.h> | ||
20 | 21 | ||
21 | #include "mpc83xx.h" | 22 | #include "mpc83xx.h" |
22 | 23 | ||
diff --git a/arch/powerpc/platforms/83xx/mpc83xx.h b/arch/powerpc/platforms/83xx/mpc83xx.h index 88a3b5cabb18..2a7cbabb410a 100644 --- a/arch/powerpc/platforms/83xx/mpc83xx.h +++ b/arch/powerpc/platforms/83xx/mpc83xx.h | |||
@@ -26,6 +26,8 @@ | |||
26 | #define MPC834X_SICRL_USB1 0x20000000 | 26 | #define MPC834X_SICRL_USB1 0x20000000 |
27 | #define MPC831X_SICRL_USB_MASK 0x00000c00 | 27 | #define MPC831X_SICRL_USB_MASK 0x00000c00 |
28 | #define MPC831X_SICRL_USB_ULPI 0x00000800 | 28 | #define MPC831X_SICRL_USB_ULPI 0x00000800 |
29 | #define MPC8315_SICRL_USB_MASK 0x000000fc | ||
30 | #define MPC8315_SICRL_USB_ULPI 0x00000054 | ||
29 | #define MPC837X_SICRL_USB_MASK 0xf0000000 | 31 | #define MPC837X_SICRL_USB_MASK 0xf0000000 |
30 | #define MPC837X_SICRL_USB_ULPI 0x50000000 | 32 | #define MPC837X_SICRL_USB_ULPI 0x50000000 |
31 | 33 | ||
@@ -34,6 +36,8 @@ | |||
34 | #define MPC834X_SICRH_USB_UTMI 0x00020000 | 36 | #define MPC834X_SICRH_USB_UTMI 0x00020000 |
35 | #define MPC831X_SICRH_USB_MASK 0x000000e0 | 37 | #define MPC831X_SICRH_USB_MASK 0x000000e0 |
36 | #define MPC831X_SICRH_USB_ULPI 0x000000a0 | 38 | #define MPC831X_SICRH_USB_ULPI 0x000000a0 |
39 | #define MPC8315_SICRH_USB_MASK 0x0000ff00 | ||
40 | #define MPC8315_SICRH_USB_ULPI 0x00000000 | ||
37 | 41 | ||
38 | /* USB Control Register */ | 42 | /* USB Control Register */ |
39 | #define FSL_USB2_CONTROL_OFFS 0x500 | 43 | #define FSL_USB2_CONTROL_OFFS 0x500 |
@@ -55,7 +59,6 @@ | |||
55 | * mpc83xx_* files. Mostly for use by mpc83xx_setup | 59 | * mpc83xx_* files. Mostly for use by mpc83xx_setup |
56 | */ | 60 | */ |
57 | 61 | ||
58 | extern int mpc83xx_add_bridge(struct device_node *dev); | ||
59 | extern void mpc83xx_restart(char *cmd); | 62 | extern void mpc83xx_restart(char *cmd); |
60 | extern long mpc83xx_time_init(void); | 63 | extern long mpc83xx_time_init(void); |
61 | extern int mpc834x_usb_cfg(void); | 64 | extern int mpc834x_usb_cfg(void); |
diff --git a/arch/powerpc/platforms/83xx/pci.c b/arch/powerpc/platforms/83xx/pci.c deleted file mode 100644 index 14f1080c6c9d..000000000000 --- a/arch/powerpc/platforms/83xx/pci.c +++ /dev/null | |||
@@ -1,91 +0,0 @@ | |||
1 | /* | ||
2 | * FSL SoC setup code | ||
3 | * | ||
4 | * Maintained by Kumar Gala (see MAINTAINERS for contact information) | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify it | ||
7 | * under the terms of the GNU General Public License as published by the | ||
8 | * Free Software Foundation; either version 2 of the License, or (at your | ||
9 | * option) any later version. | ||
10 | */ | ||
11 | |||
12 | #include <linux/stddef.h> | ||
13 | #include <linux/kernel.h> | ||
14 | #include <linux/init.h> | ||
15 | #include <linux/errno.h> | ||
16 | #include <linux/pci.h> | ||
17 | #include <linux/delay.h> | ||
18 | #include <linux/irq.h> | ||
19 | #include <linux/module.h> | ||
20 | |||
21 | #include <asm/system.h> | ||
22 | #include <asm/atomic.h> | ||
23 | #include <asm/io.h> | ||
24 | #include <asm/pci-bridge.h> | ||
25 | #include <asm/prom.h> | ||
26 | #include <sysdev/fsl_soc.h> | ||
27 | |||
28 | #undef DEBUG | ||
29 | |||
30 | #ifdef DEBUG | ||
31 | #define DBG(x...) printk(x) | ||
32 | #else | ||
33 | #define DBG(x...) | ||
34 | #endif | ||
35 | |||
36 | int __init mpc83xx_add_bridge(struct device_node *dev) | ||
37 | { | ||
38 | int len; | ||
39 | struct pci_controller *hose; | ||
40 | struct resource rsrc; | ||
41 | const int *bus_range; | ||
42 | int primary = 1, has_address = 0; | ||
43 | phys_addr_t immr = get_immrbase(); | ||
44 | |||
45 | DBG("Adding PCI host bridge %s\n", dev->full_name); | ||
46 | |||
47 | /* Fetch host bridge registers address */ | ||
48 | has_address = (of_address_to_resource(dev, 0, &rsrc) == 0); | ||
49 | |||
50 | /* Get bus range if any */ | ||
51 | bus_range = of_get_property(dev, "bus-range", &len); | ||
52 | if (bus_range == NULL || len < 2 * sizeof(int)) { | ||
53 | printk(KERN_WARNING "Can't get bus-range for %s, assume" | ||
54 | " bus 0\n", dev->full_name); | ||
55 | } | ||
56 | |||
57 | ppc_pci_flags |= PPC_PCI_REASSIGN_ALL_BUS; | ||
58 | hose = pcibios_alloc_controller(dev); | ||
59 | if (!hose) | ||
60 | return -ENOMEM; | ||
61 | |||
62 | hose->first_busno = bus_range ? bus_range[0] : 0; | ||
63 | hose->last_busno = bus_range ? bus_range[1] : 0xff; | ||
64 | |||
65 | /* MPC83xx supports up to two host controllers one at 0x8500 from immrbar | ||
66 | * the other at 0x8600, we consider the 0x8500 the primary controller | ||
67 | */ | ||
68 | /* PCI 1 */ | ||
69 | if ((rsrc.start & 0xfffff) == 0x8500) { | ||
70 | setup_indirect_pci(hose, immr + 0x8300, immr + 0x8304, 0); | ||
71 | } | ||
72 | /* PCI 2 */ | ||
73 | if ((rsrc.start & 0xfffff) == 0x8600) { | ||
74 | setup_indirect_pci(hose, immr + 0x8380, immr + 0x8384, 0); | ||
75 | primary = 0; | ||
76 | } | ||
77 | |||
78 | printk(KERN_INFO "Found MPC83xx PCI host bridge at 0x%016llx. " | ||
79 | "Firmware bus number: %d->%d\n", | ||
80 | (unsigned long long)rsrc.start, hose->first_busno, | ||
81 | hose->last_busno); | ||
82 | |||
83 | DBG(" ->Hose at 0x%p, cfg_addr=0x%p,cfg_data=0x%p\n", | ||
84 | hose, hose->cfg_addr, hose->cfg_data); | ||
85 | |||
86 | /* Interpret the "ranges" property */ | ||
87 | /* This also maps the I/O region and sets isa_io/mem_base */ | ||
88 | pci_process_bridge_OF_ranges(hose, dev, primary); | ||
89 | |||
90 | return 0; | ||
91 | } | ||
diff --git a/arch/powerpc/platforms/83xx/sbc834x.c b/arch/powerpc/platforms/83xx/sbc834x.c index cf382474a83d..fc21f5c15bab 100644 --- a/arch/powerpc/platforms/83xx/sbc834x.c +++ b/arch/powerpc/platforms/83xx/sbc834x.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <asm/prom.h> | 37 | #include <asm/prom.h> |
38 | #include <asm/udbg.h> | 38 | #include <asm/udbg.h> |
39 | #include <sysdev/fsl_soc.h> | 39 | #include <sysdev/fsl_soc.h> |
40 | #include <sysdev/fsl_pci.h> | ||
40 | 41 | ||
41 | #include "mpc83xx.h" | 42 | #include "mpc83xx.h" |
42 | 43 | ||
diff --git a/arch/powerpc/platforms/83xx/suspend-asm.S b/arch/powerpc/platforms/83xx/suspend-asm.S new file mode 100644 index 000000000000..1930543c98d3 --- /dev/null +++ b/arch/powerpc/platforms/83xx/suspend-asm.S | |||
@@ -0,0 +1,533 @@ | |||
1 | /* | ||
2 | * Enter and leave deep sleep state on MPC83xx | ||
3 | * | ||
4 | * Copyright (c) 2006-2008 Freescale Semiconductor, Inc. | ||
5 | * Author: Scott Wood <scottwood@freescale.com> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify it | ||
8 | * under the terms of the GNU General Public License version 2 as published | ||
9 | * by the Free Software Foundation. | ||
10 | */ | ||
11 | |||
12 | #include <asm/page.h> | ||
13 | #include <asm/ppc_asm.h> | ||
14 | #include <asm/reg.h> | ||
15 | #include <asm/asm-offsets.h> | ||
16 | |||
17 | #define SS_MEMSAVE 0x00 /* First 8 bytes of RAM */ | ||
18 | #define SS_HID 0x08 /* 3 HIDs */ | ||
19 | #define SS_IABR 0x14 /* 2 IABRs */ | ||
20 | #define SS_IBCR 0x1c | ||
21 | #define SS_DABR 0x20 /* 2 DABRs */ | ||
22 | #define SS_DBCR 0x28 | ||
23 | #define SS_SP 0x2c | ||
24 | #define SS_SR 0x30 /* 16 segment registers */ | ||
25 | #define SS_R2 0x70 | ||
26 | #define SS_MSR 0x74 | ||
27 | #define SS_SDR1 0x78 | ||
28 | #define SS_LR 0x7c | ||
29 | #define SS_SPRG 0x80 /* 4 SPRGs */ | ||
30 | #define SS_DBAT 0x90 /* 8 DBATs */ | ||
31 | #define SS_IBAT 0xd0 /* 8 IBATs */ | ||
32 | #define SS_TB 0x110 | ||
33 | #define SS_CR 0x118 | ||
34 | #define SS_GPREG 0x11c /* r12-r31 */ | ||
35 | #define STATE_SAVE_SIZE 0x16c | ||
36 | |||
37 | .section .data | ||
38 | .align 5 | ||
39 | |||
40 | mpc83xx_sleep_save_area: | ||
41 | .space STATE_SAVE_SIZE | ||
42 | immrbase: | ||
43 | .long 0 | ||
44 | |||
45 | .section .text | ||
46 | .align 5 | ||
47 | |||
48 | /* r3 = physical address of IMMR */ | ||
49 | _GLOBAL(mpc83xx_enter_deep_sleep) | ||
50 | lis r4, immrbase@ha | ||
51 | stw r3, immrbase@l(r4) | ||
52 | |||
53 | /* The first 2 words of memory are used to communicate with the | ||
54 | * bootloader, to tell it how to resume. | ||
55 | * | ||
56 | * The first word is the magic number 0xf5153ae5, and the second | ||
57 | * is the pointer to mpc83xx_deep_resume. | ||
58 | * | ||
59 | * The original content of these two words is saved in SS_MEMSAVE. | ||
60 | */ | ||
61 | |||
62 | lis r3, mpc83xx_sleep_save_area@h | ||
63 | ori r3, r3, mpc83xx_sleep_save_area@l | ||
64 | |||
65 | lis r4, KERNELBASE@h | ||
66 | lwz r5, 0(r4) | ||
67 | lwz r6, 4(r4) | ||
68 | |||
69 | stw r5, SS_MEMSAVE+0(r3) | ||
70 | stw r6, SS_MEMSAVE+4(r3) | ||
71 | |||
72 | mfspr r5, SPRN_HID0 | ||
73 | mfspr r6, SPRN_HID1 | ||
74 | mfspr r7, SPRN_HID2 | ||
75 | |||
76 | stw r5, SS_HID+0(r3) | ||
77 | stw r6, SS_HID+4(r3) | ||
78 | stw r7, SS_HID+8(r3) | ||
79 | |||
80 | mfspr r4, SPRN_IABR | ||
81 | mfspr r5, SPRN_IABR2 | ||
82 | mfspr r6, SPRN_IBCR | ||
83 | mfspr r7, SPRN_DABR | ||
84 | mfspr r8, SPRN_DABR2 | ||
85 | mfspr r9, SPRN_DBCR | ||
86 | |||
87 | stw r4, SS_IABR+0(r3) | ||
88 | stw r5, SS_IABR+4(r3) | ||
89 | stw r6, SS_IBCR(r3) | ||
90 | stw r7, SS_DABR+0(r3) | ||
91 | stw r8, SS_DABR+4(r3) | ||
92 | stw r9, SS_DBCR(r3) | ||
93 | |||
94 | mfspr r4, SPRN_SPRG0 | ||
95 | mfspr r5, SPRN_SPRG1 | ||
96 | mfspr r6, SPRN_SPRG2 | ||
97 | mfspr r7, SPRN_SPRG3 | ||
98 | mfsdr1 r8 | ||
99 | |||
100 | stw r4, SS_SPRG+0(r3) | ||
101 | stw r5, SS_SPRG+4(r3) | ||
102 | stw r6, SS_SPRG+8(r3) | ||
103 | stw r7, SS_SPRG+12(r3) | ||
104 | stw r8, SS_SDR1(r3) | ||
105 | |||
106 | mfspr r4, SPRN_DBAT0U | ||
107 | mfspr r5, SPRN_DBAT0L | ||
108 | mfspr r6, SPRN_DBAT1U | ||
109 | mfspr r7, SPRN_DBAT1L | ||
110 | |||
111 | stw r4, SS_DBAT+0x00(r3) | ||
112 | stw r5, SS_DBAT+0x04(r3) | ||
113 | stw r6, SS_DBAT+0x08(r3) | ||
114 | stw r7, SS_DBAT+0x0c(r3) | ||
115 | |||
116 | mfspr r4, SPRN_DBAT2U | ||
117 | mfspr r5, SPRN_DBAT2L | ||
118 | mfspr r6, SPRN_DBAT3U | ||
119 | mfspr r7, SPRN_DBAT3L | ||
120 | |||
121 | stw r4, SS_DBAT+0x10(r3) | ||
122 | stw r5, SS_DBAT+0x14(r3) | ||
123 | stw r6, SS_DBAT+0x18(r3) | ||
124 | stw r7, SS_DBAT+0x1c(r3) | ||
125 | |||
126 | mfspr r4, SPRN_DBAT4U | ||
127 | mfspr r5, SPRN_DBAT4L | ||
128 | mfspr r6, SPRN_DBAT5U | ||
129 | mfspr r7, SPRN_DBAT5L | ||
130 | |||
131 | stw r4, SS_DBAT+0x20(r3) | ||
132 | stw r5, SS_DBAT+0x24(r3) | ||
133 | stw r6, SS_DBAT+0x28(r3) | ||
134 | stw r7, SS_DBAT+0x2c(r3) | ||
135 | |||
136 | mfspr r4, SPRN_DBAT6U | ||
137 | mfspr r5, SPRN_DBAT6L | ||
138 | mfspr r6, SPRN_DBAT7U | ||
139 | mfspr r7, SPRN_DBAT7L | ||
140 | |||
141 | stw r4, SS_DBAT+0x30(r3) | ||
142 | stw r5, SS_DBAT+0x34(r3) | ||
143 | stw r6, SS_DBAT+0x38(r3) | ||
144 | stw r7, SS_DBAT+0x3c(r3) | ||
145 | |||
146 | mfspr r4, SPRN_IBAT0U | ||
147 | mfspr r5, SPRN_IBAT0L | ||
148 | mfspr r6, SPRN_IBAT1U | ||
149 | mfspr r7, SPRN_IBAT1L | ||
150 | |||
151 | stw r4, SS_IBAT+0x00(r3) | ||
152 | stw r5, SS_IBAT+0x04(r3) | ||
153 | stw r6, SS_IBAT+0x08(r3) | ||
154 | stw r7, SS_IBAT+0x0c(r3) | ||
155 | |||
156 | mfspr r4, SPRN_IBAT2U | ||
157 | mfspr r5, SPRN_IBAT2L | ||
158 | mfspr r6, SPRN_IBAT3U | ||
159 | mfspr r7, SPRN_IBAT3L | ||
160 | |||
161 | stw r4, SS_IBAT+0x10(r3) | ||
162 | stw r5, SS_IBAT+0x14(r3) | ||
163 | stw r6, SS_IBAT+0x18(r3) | ||
164 | stw r7, SS_IBAT+0x1c(r3) | ||
165 | |||
166 | mfspr r4, SPRN_IBAT4U | ||
167 | mfspr r5, SPRN_IBAT4L | ||
168 | mfspr r6, SPRN_IBAT5U | ||
169 | mfspr r7, SPRN_IBAT5L | ||
170 | |||
171 | stw r4, SS_IBAT+0x20(r3) | ||
172 | stw r5, SS_IBAT+0x24(r3) | ||
173 | stw r6, SS_IBAT+0x28(r3) | ||
174 | stw r7, SS_IBAT+0x2c(r3) | ||
175 | |||
176 | mfspr r4, SPRN_IBAT6U | ||
177 | mfspr r5, SPRN_IBAT6L | ||
178 | mfspr r6, SPRN_IBAT7U | ||
179 | mfspr r7, SPRN_IBAT7L | ||
180 | |||
181 | stw r4, SS_IBAT+0x30(r3) | ||
182 | stw r5, SS_IBAT+0x34(r3) | ||
183 | stw r6, SS_IBAT+0x38(r3) | ||
184 | stw r7, SS_IBAT+0x3c(r3) | ||
185 | |||
186 | mfmsr r4 | ||
187 | mflr r5 | ||
188 | mfcr r6 | ||
189 | |||
190 | stw r4, SS_MSR(r3) | ||
191 | stw r5, SS_LR(r3) | ||
192 | stw r6, SS_CR(r3) | ||
193 | stw r1, SS_SP(r3) | ||
194 | stw r2, SS_R2(r3) | ||
195 | |||
196 | 1: mftbu r4 | ||
197 | mftb r5 | ||
198 | mftbu r6 | ||
199 | cmpw r4, r6 | ||
200 | bne 1b | ||
201 | |||
202 | stw r4, SS_TB+0(r3) | ||
203 | stw r5, SS_TB+4(r3) | ||
204 | |||
205 | stmw r12, SS_GPREG(r3) | ||
206 | |||
207 | li r4, 0 | ||
208 | addi r6, r3, SS_SR-4 | ||
209 | 1: mfsrin r5, r4 | ||
210 | stwu r5, 4(r6) | ||
211 | addis r4, r4, 0x1000 | ||
212 | cmpwi r4, 0 | ||
213 | bne 1b | ||
214 | |||
215 | /* Disable machine checks and critical exceptions */ | ||
216 | mfmsr r4 | ||
217 | rlwinm r4, r4, 0, ~MSR_CE | ||
218 | rlwinm r4, r4, 0, ~MSR_ME | ||
219 | mtmsr r4 | ||
220 | isync | ||
221 | |||
222 | #define TMP_VIRT_IMMR 0xf0000000 | ||
223 | #define DEFAULT_IMMR_VALUE 0xff400000 | ||
224 | #define IMMRBAR_BASE 0x0000 | ||
225 | |||
226 | lis r4, immrbase@ha | ||
227 | lwz r4, immrbase@l(r4) | ||
228 | |||
229 | /* Use DBAT0 to address the current IMMR space */ | ||
230 | |||
231 | ori r4, r4, 0x002a | ||
232 | mtspr SPRN_DBAT0L, r4 | ||
233 | lis r8, TMP_VIRT_IMMR@h | ||
234 | ori r4, r8, 0x001e /* 1 MByte accessable from Kernel Space only */ | ||
235 | mtspr SPRN_DBAT0U, r4 | ||
236 | isync | ||
237 | |||
238 | /* Use DBAT1 to address the original IMMR space */ | ||
239 | |||
240 | lis r4, DEFAULT_IMMR_VALUE@h | ||
241 | ori r4, r4, 0x002a | ||
242 | mtspr SPRN_DBAT1L, r4 | ||
243 | lis r9, (TMP_VIRT_IMMR + 0x01000000)@h | ||
244 | ori r4, r9, 0x001e /* 1 MByte accessable from Kernel Space only */ | ||
245 | mtspr SPRN_DBAT1U, r4 | ||
246 | isync | ||
247 | |||
248 | /* Use DBAT2 to address the beginning of RAM. This isn't done | ||
249 | * using the normal virtual mapping, because with page debugging | ||
250 | * enabled it will be read-only. | ||
251 | */ | ||
252 | |||
253 | li r4, 0x0002 | ||
254 | mtspr SPRN_DBAT2L, r4 | ||
255 | lis r4, KERNELBASE@h | ||
256 | ori r4, r4, 0x001e /* 1 MByte accessable from Kernel Space only */ | ||
257 | mtspr SPRN_DBAT2U, r4 | ||
258 | isync | ||
259 | |||
260 | /* Flush the cache with our BAT, as there will be TLB misses | ||
261 | * otherwise if page debugging is enabled, and these misses | ||
262 | * will disturb the PLRU algorithm. | ||
263 | */ | ||
264 | |||
265 | bl __flush_disable_L1 | ||
266 | |||
267 | /* Keep the i-cache enabled, so the hack below for low-boot | ||
268 | * flash will work. | ||
269 | */ | ||
270 | mfspr r3, SPRN_HID0 | ||
271 | ori r3, r3, HID0_ICE | ||
272 | mtspr SPRN_HID0, r3 | ||
273 | isync | ||
274 | |||
275 | lis r6, 0xf515 | ||
276 | ori r6, r6, 0x3ae5 | ||
277 | |||
278 | lis r7, mpc83xx_deep_resume@h | ||
279 | ori r7, r7, mpc83xx_deep_resume@l | ||
280 | tophys(r7, r7) | ||
281 | |||
282 | lis r5, KERNELBASE@h | ||
283 | stw r6, 0(r5) | ||
284 | stw r7, 4(r5) | ||
285 | |||
286 | /* Reset BARs */ | ||
287 | |||
288 | li r4, 0 | ||
289 | stw r4, 0x0024(r8) | ||
290 | stw r4, 0x002c(r8) | ||
291 | stw r4, 0x0034(r8) | ||
292 | stw r4, 0x003c(r8) | ||
293 | stw r4, 0x0064(r8) | ||
294 | stw r4, 0x006c(r8) | ||
295 | |||
296 | /* Rev 1 of the 8313 has problems with wakeup events that are | ||
297 | * pending during the transition to deep sleep state (such as if | ||
298 | * the PCI host sets the state to D3 and then D0 in rapid | ||
299 | * succession). This check shrinks the race window somewhat. | ||
300 | * | ||
301 | * See erratum PCI23, though the problem is not limited | ||
302 | * to PCI. | ||
303 | */ | ||
304 | |||
305 | lwz r3, 0x0b04(r8) | ||
306 | andi. r3, r3, 1 | ||
307 | bne- mpc83xx_deep_resume | ||
308 | |||
309 | /* Move IMMR back to the default location, following the | ||
310 | * procedure specified in the MPC8313 manual. | ||
311 | */ | ||
312 | lwz r4, IMMRBAR_BASE(r8) | ||
313 | isync | ||
314 | lis r4, DEFAULT_IMMR_VALUE@h | ||
315 | stw r4, IMMRBAR_BASE(r8) | ||
316 | lis r4, KERNELBASE@h | ||
317 | lwz r4, 0(r4) | ||
318 | isync | ||
319 | lwz r4, IMMRBAR_BASE(r9) | ||
320 | mr r8, r9 | ||
321 | isync | ||
322 | |||
323 | /* Check the Reset Configuration Word to see whether flash needs | ||
324 | * to be mapped at a low address or a high address. | ||
325 | */ | ||
326 | |||
327 | lwz r4, 0x0904(r8) | ||
328 | andis. r4, r4, 0x0400 | ||
329 | li r4, 0 | ||
330 | beq boot_low | ||
331 | lis r4, 0xff80 | ||
332 | boot_low: | ||
333 | stw r4, 0x0020(r8) | ||
334 | lis r7, 0x8000 | ||
335 | ori r7, r7, 0x0016 | ||
336 | |||
337 | mfspr r5, SPRN_HID0 | ||
338 | rlwinm r5, r5, 0, ~(HID0_DOZE | HID0_NAP) | ||
339 | oris r5, r5, HID0_SLEEP@h | ||
340 | mtspr SPRN_HID0, r5 | ||
341 | isync | ||
342 | |||
343 | mfmsr r5 | ||
344 | oris r5, r5, MSR_POW@h | ||
345 | |||
346 | /* Enable the flash mapping at the appropriate address. This | ||
347 | * mapping will override the RAM mapping if booting low, so there's | ||
348 | * no need to disable the latter. This must be done inside the same | ||
349 | * cache line as setting MSR_POW, so that no instruction fetches | ||
350 | * from RAM happen after the flash mapping is turned on. | ||
351 | */ | ||
352 | |||
353 | .align 5 | ||
354 | stw r7, 0x0024(r8) | ||
355 | sync | ||
356 | isync | ||
357 | mtmsr r5 | ||
358 | isync | ||
359 | 1: b 1b | ||
360 | |||
361 | mpc83xx_deep_resume: | ||
362 | lis r4, 1f@h | ||
363 | ori r4, r4, 1f@l | ||
364 | tophys(r4, r4) | ||
365 | mtsrr0 r4 | ||
366 | |||
367 | mfmsr r4 | ||
368 | rlwinm r4, r4, 0, ~(MSR_IR | MSR_DR) | ||
369 | mtsrr1 r4 | ||
370 | |||
371 | rfi | ||
372 | |||
373 | 1: tlbia | ||
374 | bl __inval_enable_L1 | ||
375 | |||
376 | lis r3, mpc83xx_sleep_save_area@h | ||
377 | ori r3, r3, mpc83xx_sleep_save_area@l | ||
378 | tophys(r3, r3) | ||
379 | |||
380 | lwz r5, SS_MEMSAVE+0(r3) | ||
381 | lwz r6, SS_MEMSAVE+4(r3) | ||
382 | |||
383 | stw r5, 0(0) | ||
384 | stw r6, 4(0) | ||
385 | |||
386 | lwz r5, SS_HID+0(r3) | ||
387 | lwz r6, SS_HID+4(r3) | ||
388 | lwz r7, SS_HID+8(r3) | ||
389 | |||
390 | mtspr SPRN_HID0, r5 | ||
391 | mtspr SPRN_HID1, r6 | ||
392 | mtspr SPRN_HID2, r7 | ||
393 | |||
394 | lwz r4, SS_IABR+0(r3) | ||
395 | lwz r5, SS_IABR+4(r3) | ||
396 | lwz r6, SS_IBCR(r3) | ||
397 | lwz r7, SS_DABR+0(r3) | ||
398 | lwz r8, SS_DABR+4(r3) | ||
399 | lwz r9, SS_DBCR(r3) | ||
400 | |||
401 | mtspr SPRN_IABR, r4 | ||
402 | mtspr SPRN_IABR2, r5 | ||
403 | mtspr SPRN_IBCR, r6 | ||
404 | mtspr SPRN_DABR, r7 | ||
405 | mtspr SPRN_DABR2, r8 | ||
406 | mtspr SPRN_DBCR, r9 | ||
407 | |||
408 | li r4, 0 | ||
409 | addi r6, r3, SS_SR-4 | ||
410 | 1: lwzu r5, 4(r6) | ||
411 | mtsrin r5, r4 | ||
412 | addis r4, r4, 0x1000 | ||
413 | cmpwi r4, 0 | ||
414 | bne 1b | ||
415 | |||
416 | lwz r4, SS_DBAT+0x00(r3) | ||
417 | lwz r5, SS_DBAT+0x04(r3) | ||
418 | lwz r6, SS_DBAT+0x08(r3) | ||
419 | lwz r7, SS_DBAT+0x0c(r3) | ||
420 | |||
421 | mtspr SPRN_DBAT0U, r4 | ||
422 | mtspr SPRN_DBAT0L, r5 | ||
423 | mtspr SPRN_DBAT1U, r6 | ||
424 | mtspr SPRN_DBAT1L, r7 | ||
425 | |||
426 | lwz r4, SS_DBAT+0x10(r3) | ||
427 | lwz r5, SS_DBAT+0x14(r3) | ||
428 | lwz r6, SS_DBAT+0x18(r3) | ||
429 | lwz r7, SS_DBAT+0x1c(r3) | ||
430 | |||
431 | mtspr SPRN_DBAT2U, r4 | ||
432 | mtspr SPRN_DBAT2L, r5 | ||
433 | mtspr SPRN_DBAT3U, r6 | ||
434 | mtspr SPRN_DBAT3L, r7 | ||
435 | |||
436 | lwz r4, SS_DBAT+0x20(r3) | ||
437 | lwz r5, SS_DBAT+0x24(r3) | ||
438 | lwz r6, SS_DBAT+0x28(r3) | ||
439 | lwz r7, SS_DBAT+0x2c(r3) | ||
440 | |||
441 | mtspr SPRN_DBAT4U, r4 | ||
442 | mtspr SPRN_DBAT4L, r5 | ||
443 | mtspr SPRN_DBAT5U, r6 | ||
444 | mtspr SPRN_DBAT5L, r7 | ||
445 | |||
446 | lwz r4, SS_DBAT+0x30(r3) | ||
447 | lwz r5, SS_DBAT+0x34(r3) | ||
448 | lwz r6, SS_DBAT+0x38(r3) | ||
449 | lwz r7, SS_DBAT+0x3c(r3) | ||
450 | |||
451 | mtspr SPRN_DBAT6U, r4 | ||
452 | mtspr SPRN_DBAT6L, r5 | ||
453 | mtspr SPRN_DBAT7U, r6 | ||
454 | mtspr SPRN_DBAT7L, r7 | ||
455 | |||
456 | lwz r4, SS_IBAT+0x00(r3) | ||
457 | lwz r5, SS_IBAT+0x04(r3) | ||
458 | lwz r6, SS_IBAT+0x08(r3) | ||
459 | lwz r7, SS_IBAT+0x0c(r3) | ||
460 | |||
461 | mtspr SPRN_IBAT0U, r4 | ||
462 | mtspr SPRN_IBAT0L, r5 | ||
463 | mtspr SPRN_IBAT1U, r6 | ||
464 | mtspr SPRN_IBAT1L, r7 | ||
465 | |||
466 | lwz r4, SS_IBAT+0x10(r3) | ||
467 | lwz r5, SS_IBAT+0x14(r3) | ||
468 | lwz r6, SS_IBAT+0x18(r3) | ||
469 | lwz r7, SS_IBAT+0x1c(r3) | ||
470 | |||
471 | mtspr SPRN_IBAT2U, r4 | ||
472 | mtspr SPRN_IBAT2L, r5 | ||
473 | mtspr SPRN_IBAT3U, r6 | ||
474 | mtspr SPRN_IBAT3L, r7 | ||
475 | |||
476 | lwz r4, SS_IBAT+0x20(r3) | ||
477 | lwz r5, SS_IBAT+0x24(r3) | ||
478 | lwz r6, SS_IBAT+0x28(r3) | ||
479 | lwz r7, SS_IBAT+0x2c(r3) | ||
480 | |||
481 | mtspr SPRN_IBAT4U, r4 | ||
482 | mtspr SPRN_IBAT4L, r5 | ||
483 | mtspr SPRN_IBAT5U, r6 | ||
484 | mtspr SPRN_IBAT5L, r7 | ||
485 | |||
486 | lwz r4, SS_IBAT+0x30(r3) | ||
487 | lwz r5, SS_IBAT+0x34(r3) | ||
488 | lwz r6, SS_IBAT+0x38(r3) | ||
489 | lwz r7, SS_IBAT+0x3c(r3) | ||
490 | |||
491 | mtspr SPRN_IBAT6U, r4 | ||
492 | mtspr SPRN_IBAT6L, r5 | ||
493 | mtspr SPRN_IBAT7U, r6 | ||
494 | mtspr SPRN_IBAT7L, r7 | ||
495 | |||
496 | lwz r4, SS_SPRG+0(r3) | ||
497 | lwz r5, SS_SPRG+4(r3) | ||
498 | lwz r6, SS_SPRG+8(r3) | ||
499 | lwz r7, SS_SPRG+12(r3) | ||
500 | lwz r8, SS_SDR1(r3) | ||
501 | |||
502 | mtspr SPRN_SPRG0, r4 | ||
503 | mtspr SPRN_SPRG1, r5 | ||
504 | mtspr SPRN_SPRG2, r6 | ||
505 | mtspr SPRN_SPRG3, r7 | ||
506 | mtsdr1 r8 | ||
507 | |||
508 | lwz r4, SS_MSR(r3) | ||
509 | lwz r5, SS_LR(r3) | ||
510 | lwz r6, SS_CR(r3) | ||
511 | lwz r1, SS_SP(r3) | ||
512 | lwz r2, SS_R2(r3) | ||
513 | |||
514 | mtsrr1 r4 | ||
515 | mtsrr0 r5 | ||
516 | mtcr r6 | ||
517 | |||
518 | li r4, 0 | ||
519 | mtspr SPRN_TBWL, r4 | ||
520 | |||
521 | lwz r4, SS_TB+0(r3) | ||
522 | lwz r5, SS_TB+4(r3) | ||
523 | |||
524 | mtspr SPRN_TBWU, r4 | ||
525 | mtspr SPRN_TBWL, r5 | ||
526 | |||
527 | lmw r12, SS_GPREG(r3) | ||
528 | |||
529 | /* Kick decrementer */ | ||
530 | li r0, 1 | ||
531 | mtdec r0 | ||
532 | |||
533 | rfi | ||
diff --git a/arch/powerpc/platforms/83xx/suspend.c b/arch/powerpc/platforms/83xx/suspend.c new file mode 100644 index 000000000000..08e65fc8b98c --- /dev/null +++ b/arch/powerpc/platforms/83xx/suspend.c | |||
@@ -0,0 +1,388 @@ | |||
1 | /* | ||
2 | * MPC83xx suspend support | ||
3 | * | ||
4 | * Author: Scott Wood <scottwood@freescale.com> | ||
5 | * | ||
6 | * Copyright (c) 2006-2007 Freescale Semiconductor, Inc. | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify it | ||
9 | * under the terms of the GNU General Public License version 2 as published | ||
10 | * by the Free Software Foundation. | ||
11 | */ | ||
12 | |||
13 | #include <linux/init.h> | ||
14 | #include <linux/pm.h> | ||
15 | #include <linux/types.h> | ||
16 | #include <linux/ioport.h> | ||
17 | #include <linux/interrupt.h> | ||
18 | #include <linux/wait.h> | ||
19 | #include <linux/kthread.h> | ||
20 | #include <linux/freezer.h> | ||
21 | #include <linux/suspend.h> | ||
22 | #include <linux/fsl_devices.h> | ||
23 | #include <linux/of_platform.h> | ||
24 | |||
25 | #include <asm/reg.h> | ||
26 | #include <asm/io.h> | ||
27 | #include <asm/time.h> | ||
28 | #include <asm/mpc6xx.h> | ||
29 | |||
30 | #include <sysdev/fsl_soc.h> | ||
31 | |||
32 | #define PMCCR1_NEXT_STATE 0x0C /* Next state for power management */ | ||
33 | #define PMCCR1_NEXT_STATE_SHIFT 2 | ||
34 | #define PMCCR1_CURR_STATE 0x03 /* Current state for power management*/ | ||
35 | #define IMMR_RCW_OFFSET 0x900 | ||
36 | #define RCW_PCI_HOST 0x80000000 | ||
37 | |||
38 | void mpc83xx_enter_deep_sleep(phys_addr_t immrbase); | ||
39 | |||
40 | struct mpc83xx_pmc { | ||
41 | u32 config; | ||
42 | #define PMCCR_DLPEN 2 /* DDR SDRAM low power enable */ | ||
43 | #define PMCCR_SLPEN 1 /* System low power enable */ | ||
44 | |||
45 | u32 event; | ||
46 | u32 mask; | ||
47 | /* All but PMCI are deep-sleep only */ | ||
48 | #define PMCER_GPIO 0x100 | ||
49 | #define PMCER_PCI 0x080 | ||
50 | #define PMCER_USB 0x040 | ||
51 | #define PMCER_ETSEC1 0x020 | ||
52 | #define PMCER_ETSEC2 0x010 | ||
53 | #define PMCER_TIMER 0x008 | ||
54 | #define PMCER_INT1 0x004 | ||
55 | #define PMCER_INT2 0x002 | ||
56 | #define PMCER_PMCI 0x001 | ||
57 | #define PMCER_ALL 0x1FF | ||
58 | |||
59 | /* deep-sleep only */ | ||
60 | u32 config1; | ||
61 | #define PMCCR1_USE_STATE 0x80000000 | ||
62 | #define PMCCR1_PME_EN 0x00000080 | ||
63 | #define PMCCR1_ASSERT_PME 0x00000040 | ||
64 | #define PMCCR1_POWER_OFF 0x00000020 | ||
65 | |||
66 | /* deep-sleep only */ | ||
67 | u32 config2; | ||
68 | }; | ||
69 | |||
70 | struct mpc83xx_rcw { | ||
71 | u32 rcwlr; | ||
72 | u32 rcwhr; | ||
73 | }; | ||
74 | |||
75 | struct mpc83xx_clock { | ||
76 | u32 spmr; | ||
77 | u32 occr; | ||
78 | u32 sccr; | ||
79 | }; | ||
80 | |||
81 | struct pmc_type { | ||
82 | int has_deep_sleep; | ||
83 | }; | ||
84 | |||
85 | static struct of_device *pmc_dev; | ||
86 | static int has_deep_sleep, deep_sleeping; | ||
87 | static int pmc_irq; | ||
88 | static struct mpc83xx_pmc __iomem *pmc_regs; | ||
89 | static struct mpc83xx_clock __iomem *clock_regs; | ||
90 | static int is_pci_agent, wake_from_pci; | ||
91 | static phys_addr_t immrbase; | ||
92 | static int pci_pm_state; | ||
93 | static DECLARE_WAIT_QUEUE_HEAD(agent_wq); | ||
94 | |||
95 | int fsl_deep_sleep(void) | ||
96 | { | ||
97 | return deep_sleeping; | ||
98 | } | ||
99 | |||
100 | static int mpc83xx_change_state(void) | ||
101 | { | ||
102 | u32 curr_state; | ||
103 | u32 reg_cfg1 = in_be32(&pmc_regs->config1); | ||
104 | |||
105 | if (is_pci_agent) { | ||
106 | pci_pm_state = (reg_cfg1 & PMCCR1_NEXT_STATE) >> | ||
107 | PMCCR1_NEXT_STATE_SHIFT; | ||
108 | curr_state = reg_cfg1 & PMCCR1_CURR_STATE; | ||
109 | |||
110 | if (curr_state != pci_pm_state) { | ||
111 | reg_cfg1 &= ~PMCCR1_CURR_STATE; | ||
112 | reg_cfg1 |= pci_pm_state; | ||
113 | out_be32(&pmc_regs->config1, reg_cfg1); | ||
114 | |||
115 | wake_up(&agent_wq); | ||
116 | return 1; | ||
117 | } | ||
118 | } | ||
119 | |||
120 | return 0; | ||
121 | } | ||
122 | |||
123 | static irqreturn_t pmc_irq_handler(int irq, void *dev_id) | ||
124 | { | ||
125 | u32 event = in_be32(&pmc_regs->event); | ||
126 | int ret = IRQ_NONE; | ||
127 | |||
128 | if (mpc83xx_change_state()) | ||
129 | ret = IRQ_HANDLED; | ||
130 | |||
131 | if (event) { | ||
132 | out_be32(&pmc_regs->event, event); | ||
133 | ret = IRQ_HANDLED; | ||
134 | } | ||
135 | |||
136 | return ret; | ||
137 | } | ||
138 | |||
139 | static int mpc83xx_suspend_enter(suspend_state_t state) | ||
140 | { | ||
141 | int ret = -EAGAIN; | ||
142 | |||
143 | /* Don't go to sleep if there's a race where pci_pm_state changes | ||
144 | * between the agent thread checking it and the PM code disabling | ||
145 | * interrupts. | ||
146 | */ | ||
147 | if (wake_from_pci) { | ||
148 | if (pci_pm_state != (deep_sleeping ? 3 : 2)) | ||
149 | goto out; | ||
150 | |||
151 | out_be32(&pmc_regs->config1, | ||
152 | in_be32(&pmc_regs->config1) | PMCCR1_PME_EN); | ||
153 | } | ||
154 | |||
155 | /* Put the system into low-power mode and the RAM | ||
156 | * into self-refresh mode once the core goes to | ||
157 | * sleep. | ||
158 | */ | ||
159 | |||
160 | out_be32(&pmc_regs->config, PMCCR_SLPEN | PMCCR_DLPEN); | ||
161 | |||
162 | /* If it has deep sleep (i.e. it's an 831x or compatible), | ||
163 | * disable power to the core upon entering sleep mode. This will | ||
164 | * require going through the boot firmware upon a wakeup event. | ||
165 | */ | ||
166 | |||
167 | if (deep_sleeping) { | ||
168 | out_be32(&pmc_regs->mask, PMCER_ALL); | ||
169 | |||
170 | out_be32(&pmc_regs->config1, | ||
171 | in_be32(&pmc_regs->config1) | PMCCR1_POWER_OFF); | ||
172 | |||
173 | enable_kernel_fp(); | ||
174 | |||
175 | mpc83xx_enter_deep_sleep(immrbase); | ||
176 | |||
177 | out_be32(&pmc_regs->config1, | ||
178 | in_be32(&pmc_regs->config1) & ~PMCCR1_POWER_OFF); | ||
179 | |||
180 | out_be32(&pmc_regs->mask, PMCER_PMCI); | ||
181 | } else { | ||
182 | out_be32(&pmc_regs->mask, PMCER_PMCI); | ||
183 | |||
184 | mpc6xx_enter_standby(); | ||
185 | } | ||
186 | |||
187 | ret = 0; | ||
188 | |||
189 | out: | ||
190 | out_be32(&pmc_regs->config1, | ||
191 | in_be32(&pmc_regs->config1) & ~PMCCR1_PME_EN); | ||
192 | |||
193 | return ret; | ||
194 | } | ||
195 | |||
196 | static void mpc83xx_suspend_finish(void) | ||
197 | { | ||
198 | deep_sleeping = 0; | ||
199 | } | ||
200 | |||
201 | static int mpc83xx_suspend_valid(suspend_state_t state) | ||
202 | { | ||
203 | return state == PM_SUSPEND_STANDBY || state == PM_SUSPEND_MEM; | ||
204 | } | ||
205 | |||
206 | static int mpc83xx_suspend_begin(suspend_state_t state) | ||
207 | { | ||
208 | switch (state) { | ||
209 | case PM_SUSPEND_STANDBY: | ||
210 | deep_sleeping = 0; | ||
211 | return 0; | ||
212 | |||
213 | case PM_SUSPEND_MEM: | ||
214 | if (has_deep_sleep) | ||
215 | deep_sleeping = 1; | ||
216 | |||
217 | return 0; | ||
218 | |||
219 | default: | ||
220 | return -EINVAL; | ||
221 | } | ||
222 | } | ||
223 | |||
224 | static int agent_thread_fn(void *data) | ||
225 | { | ||
226 | while (1) { | ||
227 | wait_event_interruptible(agent_wq, pci_pm_state >= 2); | ||
228 | try_to_freeze(); | ||
229 | |||
230 | if (signal_pending(current) || pci_pm_state < 2) | ||
231 | continue; | ||
232 | |||
233 | /* With a preemptible kernel (or SMP), this could race with | ||
234 | * a userspace-driven suspend request. It's probably best | ||
235 | * to avoid mixing the two with such a configuration (or | ||
236 | * else fix it by adding a mutex to state_store that we can | ||
237 | * synchronize with). | ||
238 | */ | ||
239 | |||
240 | wake_from_pci = 1; | ||
241 | |||
242 | pm_suspend(pci_pm_state == 3 ? PM_SUSPEND_MEM : | ||
243 | PM_SUSPEND_STANDBY); | ||
244 | |||
245 | wake_from_pci = 0; | ||
246 | } | ||
247 | |||
248 | return 0; | ||
249 | } | ||
250 | |||
251 | static void mpc83xx_set_agent(void) | ||
252 | { | ||
253 | out_be32(&pmc_regs->config1, PMCCR1_USE_STATE); | ||
254 | out_be32(&pmc_regs->mask, PMCER_PMCI); | ||
255 | |||
256 | kthread_run(agent_thread_fn, NULL, "PCI power mgt"); | ||
257 | } | ||
258 | |||
259 | static int mpc83xx_is_pci_agent(void) | ||
260 | { | ||
261 | struct mpc83xx_rcw __iomem *rcw_regs; | ||
262 | int ret; | ||
263 | |||
264 | rcw_regs = ioremap(get_immrbase() + IMMR_RCW_OFFSET, | ||
265 | sizeof(struct mpc83xx_rcw)); | ||
266 | |||
267 | if (!rcw_regs) | ||
268 | return -ENOMEM; | ||
269 | |||
270 | ret = !(in_be32(&rcw_regs->rcwhr) & RCW_PCI_HOST); | ||
271 | |||
272 | iounmap(rcw_regs); | ||
273 | return ret; | ||
274 | } | ||
275 | |||
276 | static struct platform_suspend_ops mpc83xx_suspend_ops = { | ||
277 | .valid = mpc83xx_suspend_valid, | ||
278 | .begin = mpc83xx_suspend_begin, | ||
279 | .enter = mpc83xx_suspend_enter, | ||
280 | .finish = mpc83xx_suspend_finish, | ||
281 | }; | ||
282 | |||
283 | static int pmc_probe(struct of_device *ofdev, | ||
284 | const struct of_device_id *match) | ||
285 | { | ||
286 | struct device_node *np = ofdev->node; | ||
287 | struct resource res; | ||
288 | struct pmc_type *type = match->data; | ||
289 | int ret = 0; | ||
290 | |||
291 | if (!of_device_is_available(np)) | ||
292 | return -ENODEV; | ||
293 | |||
294 | has_deep_sleep = type->has_deep_sleep; | ||
295 | immrbase = get_immrbase(); | ||
296 | pmc_dev = ofdev; | ||
297 | |||
298 | is_pci_agent = mpc83xx_is_pci_agent(); | ||
299 | if (is_pci_agent < 0) | ||
300 | return is_pci_agent; | ||
301 | |||
302 | ret = of_address_to_resource(np, 0, &res); | ||
303 | if (ret) | ||
304 | return -ENODEV; | ||
305 | |||
306 | pmc_irq = irq_of_parse_and_map(np, 0); | ||
307 | if (pmc_irq != NO_IRQ) { | ||
308 | ret = request_irq(pmc_irq, pmc_irq_handler, IRQF_SHARED, | ||
309 | "pmc", ofdev); | ||
310 | |||
311 | if (ret) | ||
312 | return -EBUSY; | ||
313 | } | ||
314 | |||
315 | pmc_regs = ioremap(res.start, sizeof(struct mpc83xx_pmc)); | ||
316 | |||
317 | if (!pmc_regs) { | ||
318 | ret = -ENOMEM; | ||
319 | goto out; | ||
320 | } | ||
321 | |||
322 | ret = of_address_to_resource(np, 1, &res); | ||
323 | if (ret) { | ||
324 | ret = -ENODEV; | ||
325 | goto out_pmc; | ||
326 | } | ||
327 | |||
328 | clock_regs = ioremap(res.start, sizeof(struct mpc83xx_pmc)); | ||
329 | |||
330 | if (!clock_regs) { | ||
331 | ret = -ENOMEM; | ||
332 | goto out_pmc; | ||
333 | } | ||
334 | |||
335 | if (is_pci_agent) | ||
336 | mpc83xx_set_agent(); | ||
337 | |||
338 | suspend_set_ops(&mpc83xx_suspend_ops); | ||
339 | return 0; | ||
340 | |||
341 | out_pmc: | ||
342 | iounmap(pmc_regs); | ||
343 | out: | ||
344 | if (pmc_irq != NO_IRQ) | ||
345 | free_irq(pmc_irq, ofdev); | ||
346 | |||
347 | return ret; | ||
348 | } | ||
349 | |||
350 | static int pmc_remove(struct of_device *ofdev) | ||
351 | { | ||
352 | return -EPERM; | ||
353 | }; | ||
354 | |||
355 | static struct pmc_type pmc_types[] = { | ||
356 | { | ||
357 | .has_deep_sleep = 1, | ||
358 | }, | ||
359 | { | ||
360 | .has_deep_sleep = 0, | ||
361 | } | ||
362 | }; | ||
363 | |||
364 | static struct of_device_id pmc_match[] = { | ||
365 | { | ||
366 | .compatible = "fsl,mpc8313-pmc", | ||
367 | .data = &pmc_types[0], | ||
368 | }, | ||
369 | { | ||
370 | .compatible = "fsl,mpc8349-pmc", | ||
371 | .data = &pmc_types[1], | ||
372 | }, | ||
373 | {} | ||
374 | }; | ||
375 | |||
376 | static struct of_platform_driver pmc_driver = { | ||
377 | .name = "mpc83xx-pmc", | ||
378 | .match_table = pmc_match, | ||
379 | .probe = pmc_probe, | ||
380 | .remove = pmc_remove | ||
381 | }; | ||
382 | |||
383 | static int pmc_init(void) | ||
384 | { | ||
385 | return of_register_platform_driver(&pmc_driver); | ||
386 | } | ||
387 | |||
388 | module_init(pmc_init); | ||
diff --git a/arch/powerpc/platforms/83xx/usb.c b/arch/powerpc/platforms/83xx/usb.c index 64bcf0a33c71..cc99c280aad9 100644 --- a/arch/powerpc/platforms/83xx/usb.c +++ b/arch/powerpc/platforms/83xx/usb.c | |||
@@ -137,15 +137,21 @@ int mpc831x_usb_cfg(void) | |||
137 | 137 | ||
138 | /* Configure pin mux for ULPI. There is no pin mux for UTMI */ | 138 | /* Configure pin mux for ULPI. There is no pin mux for UTMI */ |
139 | if (prop && !strcmp(prop, "ulpi")) { | 139 | if (prop && !strcmp(prop, "ulpi")) { |
140 | temp = in_be32(immap + MPC83XX_SICRL_OFFS); | 140 | if (of_device_is_compatible(immr_node, "fsl,mpc8315-immr")) { |
141 | temp &= ~MPC831X_SICRL_USB_MASK; | 141 | clrsetbits_be32(immap + MPC83XX_SICRL_OFFS, |
142 | temp |= MPC831X_SICRL_USB_ULPI; | 142 | MPC8315_SICRL_USB_MASK, |
143 | out_be32(immap + MPC83XX_SICRL_OFFS, temp); | 143 | MPC8315_SICRL_USB_ULPI); |
144 | 144 | clrsetbits_be32(immap + MPC83XX_SICRH_OFFS, | |
145 | temp = in_be32(immap + MPC83XX_SICRH_OFFS); | 145 | MPC8315_SICRH_USB_MASK, |
146 | temp &= ~MPC831X_SICRH_USB_MASK; | 146 | MPC8315_SICRH_USB_ULPI); |
147 | temp |= MPC831X_SICRH_USB_ULPI; | 147 | } else { |
148 | out_be32(immap + MPC83XX_SICRH_OFFS, temp); | 148 | clrsetbits_be32(immap + MPC83XX_SICRL_OFFS, |
149 | MPC831X_SICRL_USB_MASK, | ||
150 | MPC831X_SICRL_USB_ULPI); | ||
151 | clrsetbits_be32(immap + MPC83XX_SICRH_OFFS, | ||
152 | MPC831X_SICRH_USB_MASK, | ||
153 | MPC831X_SICRH_USB_ULPI); | ||
154 | } | ||
149 | } | 155 | } |
150 | 156 | ||
151 | iounmap(immap); | 157 | iounmap(immap); |
diff --git a/arch/powerpc/platforms/85xx/Kconfig b/arch/powerpc/platforms/85xx/Kconfig index cebea5cadbc1..291675b0097a 100644 --- a/arch/powerpc/platforms/85xx/Kconfig +++ b/arch/powerpc/platforms/85xx/Kconfig | |||
@@ -2,8 +2,8 @@ menuconfig MPC85xx | |||
2 | bool "Machine Type" | 2 | bool "Machine Type" |
3 | depends on PPC_85xx | 3 | depends on PPC_85xx |
4 | select PPC_UDBG_16550 | 4 | select PPC_UDBG_16550 |
5 | select PPC_INDIRECT_PCI if PCI | ||
6 | select MPIC | 5 | select MPIC |
6 | select PPC_PCI_CHOICE | ||
7 | select FSL_PCI if PCI | 7 | select FSL_PCI if PCI |
8 | select SERIAL_8250_SHARE_IRQ if SERIAL_8250 | 8 | select SERIAL_8250_SHARE_IRQ if SERIAL_8250 |
9 | default y | 9 | default y |
@@ -86,7 +86,6 @@ config TQM8548 | |||
86 | help | 86 | help |
87 | This option enables support for the TQ Components TQM8548 board. | 87 | This option enables support for the TQ Components TQM8548 board. |
88 | select DEFAULT_UIMAGE | 88 | select DEFAULT_UIMAGE |
89 | select PPC_CPM_NEW_BINDING | ||
90 | select TQM85xx | 89 | select TQM85xx |
91 | 90 | ||
92 | config TQM8555 | 91 | config TQM8555 |
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ds.c b/arch/powerpc/platforms/85xx/mpc85xx_ds.c index 25f41cd2d33a..00c535806647 100644 --- a/arch/powerpc/platforms/85xx/mpc85xx_ds.c +++ b/arch/powerpc/platforms/85xx/mpc85xx_ds.c | |||
@@ -115,7 +115,6 @@ void __init mpc85xx_ds_pic_init(void) | |||
115 | 115 | ||
116 | #ifdef CONFIG_PCI | 116 | #ifdef CONFIG_PCI |
117 | static int primary_phb_addr; | 117 | static int primary_phb_addr; |
118 | extern int uses_fsl_uli_m1575; | ||
119 | extern int uli_exclude_device(struct pci_controller *hose, | 118 | extern int uli_exclude_device(struct pci_controller *hose, |
120 | u_char bus, u_char devfn); | 119 | u_char bus, u_char devfn); |
121 | 120 | ||
@@ -161,7 +160,6 @@ static void __init mpc85xx_ds_setup_arch(void) | |||
161 | } | 160 | } |
162 | } | 161 | } |
163 | 162 | ||
164 | uses_fsl_uli_m1575 = 1; | ||
165 | ppc_md.pci_exclude_device = mpc85xx_exclude_device; | 163 | ppc_md.pci_exclude_device = mpc85xx_exclude_device; |
166 | #endif | 164 | #endif |
167 | 165 | ||
diff --git a/arch/powerpc/platforms/86xx/Kconfig b/arch/powerpc/platforms/86xx/Kconfig index 80a81e02bb55..9355a5269431 100644 --- a/arch/powerpc/platforms/86xx/Kconfig +++ b/arch/powerpc/platforms/86xx/Kconfig | |||
@@ -27,6 +27,7 @@ config SBC8641D | |||
27 | config MPC8610_HPCD | 27 | config MPC8610_HPCD |
28 | bool "Freescale MPC8610 HPCD" | 28 | bool "Freescale MPC8610 HPCD" |
29 | select DEFAULT_UIMAGE | 29 | select DEFAULT_UIMAGE |
30 | select FSL_ULI1575 | ||
30 | help | 31 | help |
31 | This option enables support for the MPC8610 HPCD board. | 32 | This option enables support for the MPC8610 HPCD board. |
32 | 33 | ||
@@ -34,6 +35,7 @@ endif | |||
34 | 35 | ||
35 | config MPC8641 | 36 | config MPC8641 |
36 | bool | 37 | bool |
38 | select PPC_PCI_CHOICE | ||
37 | select FSL_PCI if PCI | 39 | select FSL_PCI if PCI |
38 | select PPC_UDBG_16550 | 40 | select PPC_UDBG_16550 |
39 | select MPIC | 41 | select MPIC |
@@ -41,6 +43,7 @@ config MPC8641 | |||
41 | 43 | ||
42 | config MPC8610 | 44 | config MPC8610 |
43 | bool | 45 | bool |
46 | select PPC_PCI_CHOICE | ||
44 | select FSL_PCI if PCI | 47 | select FSL_PCI if PCI |
45 | select PPC_UDBG_16550 | 48 | select PPC_UDBG_16550 |
46 | select MPIC | 49 | select MPIC |
diff --git a/arch/powerpc/platforms/86xx/mpc8610_hpcd.c b/arch/powerpc/platforms/86xx/mpc8610_hpcd.c index 30725302884a..5eedb710896e 100644 --- a/arch/powerpc/platforms/86xx/mpc8610_hpcd.c +++ b/arch/powerpc/platforms/86xx/mpc8610_hpcd.c | |||
@@ -58,93 +58,6 @@ static int __init mpc8610_declare_of_platform_devices(void) | |||
58 | } | 58 | } |
59 | machine_device_initcall(mpc86xx_hpcd, mpc8610_declare_of_platform_devices); | 59 | machine_device_initcall(mpc86xx_hpcd, mpc8610_declare_of_platform_devices); |
60 | 60 | ||
61 | #ifdef CONFIG_PCI | ||
62 | static void __devinit quirk_uli1575(struct pci_dev *dev) | ||
63 | { | ||
64 | u32 temp32; | ||
65 | |||
66 | /* Disable INTx */ | ||
67 | pci_read_config_dword(dev, 0x48, &temp32); | ||
68 | pci_write_config_dword(dev, 0x48, (temp32 | 1<<26)); | ||
69 | |||
70 | /* Enable sideband interrupt */ | ||
71 | pci_read_config_dword(dev, 0x90, &temp32); | ||
72 | pci_write_config_dword(dev, 0x90, (temp32 | 1<<22)); | ||
73 | } | ||
74 | |||
75 | static void __devinit quirk_uli5288(struct pci_dev *dev) | ||
76 | { | ||
77 | unsigned char c; | ||
78 | unsigned short temp; | ||
79 | |||
80 | /* Interrupt Disable, Needed when SATA disabled */ | ||
81 | pci_read_config_word(dev, PCI_COMMAND, &temp); | ||
82 | temp |= 1<<10; | ||
83 | pci_write_config_word(dev, PCI_COMMAND, temp); | ||
84 | |||
85 | pci_read_config_byte(dev, 0x83, &c); | ||
86 | c |= 0x80; | ||
87 | pci_write_config_byte(dev, 0x83, c); | ||
88 | |||
89 | pci_write_config_byte(dev, PCI_CLASS_PROG, 0x01); | ||
90 | pci_write_config_byte(dev, PCI_CLASS_DEVICE, 0x06); | ||
91 | |||
92 | pci_read_config_byte(dev, 0x83, &c); | ||
93 | c &= 0x7f; | ||
94 | pci_write_config_byte(dev, 0x83, c); | ||
95 | } | ||
96 | |||
97 | /* | ||
98 | * Since 8259PIC was disabled on the board, the IDE device can not | ||
99 | * use the legacy IRQ, we need to let the IDE device work under | ||
100 | * native mode and use the interrupt line like other PCI devices. | ||
101 | * IRQ14 is a sideband interrupt from IDE device to CPU and we use this | ||
102 | * as the interrupt for IDE device. | ||
103 | */ | ||
104 | static void __devinit quirk_uli5229(struct pci_dev *dev) | ||
105 | { | ||
106 | unsigned char c; | ||
107 | |||
108 | pci_read_config_byte(dev, 0x4b, &c); | ||
109 | c |= 0x10; | ||
110 | pci_write_config_byte(dev, 0x4b, c); | ||
111 | } | ||
112 | |||
113 | /* | ||
114 | * SATA interrupt pin bug fix | ||
115 | * There's a chip bug for 5288, The interrupt pin should be 2, | ||
116 | * not the read only value 1, So it use INTB#, not INTA# which | ||
117 | * actually used by the IDE device 5229. | ||
118 | * As of this bug, during the PCI initialization, 5288 read the | ||
119 | * irq of IDE device from the device tree, this function fix this | ||
120 | * bug by re-assigning a correct irq to 5288. | ||
121 | * | ||
122 | */ | ||
123 | static void __devinit final_uli5288(struct pci_dev *dev) | ||
124 | { | ||
125 | struct pci_controller *hose = pci_bus_to_host(dev->bus); | ||
126 | struct device_node *hosenode = hose ? hose->dn : NULL; | ||
127 | struct of_irq oirq; | ||
128 | int virq, pin = 2; | ||
129 | u32 laddr[3]; | ||
130 | |||
131 | if (!hosenode) | ||
132 | return; | ||
133 | |||
134 | laddr[0] = (hose->first_busno << 16) | (PCI_DEVFN(31, 0) << 8); | ||
135 | laddr[1] = laddr[2] = 0; | ||
136 | of_irq_map_raw(hosenode, &pin, 1, laddr, &oirq); | ||
137 | virq = irq_create_of_mapping(oirq.controller, oirq.specifier, | ||
138 | oirq.size); | ||
139 | dev->irq = virq; | ||
140 | } | ||
141 | |||
142 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x1575, quirk_uli1575); | ||
143 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x5288, quirk_uli5288); | ||
144 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x5229, quirk_uli5229); | ||
145 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AL, 0x5288, final_uli5288); | ||
146 | #endif /* CONFIG_PCI */ | ||
147 | |||
148 | #if defined(CONFIG_FB_FSL_DIU) || defined(CONFIG_FB_FSL_DIU_MODULE) | 61 | #if defined(CONFIG_FB_FSL_DIU) || defined(CONFIG_FB_FSL_DIU_MODULE) |
149 | 62 | ||
150 | static u32 get_busfreq(void) | 63 | static u32 get_busfreq(void) |
diff --git a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c index 7916599c9126..f712d9c0991b 100644 --- a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c +++ b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c | |||
@@ -45,7 +45,6 @@ | |||
45 | #endif | 45 | #endif |
46 | 46 | ||
47 | #ifdef CONFIG_PCI | 47 | #ifdef CONFIG_PCI |
48 | extern int uses_fsl_uli_m1575; | ||
49 | extern int uli_exclude_device(struct pci_controller *hose, | 48 | extern int uli_exclude_device(struct pci_controller *hose, |
50 | u_char bus, u_char devfn); | 49 | u_char bus, u_char devfn); |
51 | 50 | ||
@@ -87,7 +86,6 @@ mpc86xx_hpcn_setup_arch(void) | |||
87 | fsl_add_bridge(np, 0); | 86 | fsl_add_bridge(np, 0); |
88 | } | 87 | } |
89 | 88 | ||
90 | uses_fsl_uli_m1575 = 1; | ||
91 | ppc_md.pci_exclude_device = mpc86xx_exclude_device; | 89 | ppc_md.pci_exclude_device = mpc86xx_exclude_device; |
92 | 90 | ||
93 | #endif | 91 | #endif |
diff --git a/arch/powerpc/platforms/Kconfig b/arch/powerpc/platforms/Kconfig index 690c1f46e698..1d0968775c0a 100644 --- a/arch/powerpc/platforms/Kconfig +++ b/arch/powerpc/platforms/Kconfig | |||
@@ -253,17 +253,13 @@ config CPM2 | |||
253 | depends on MPC85xx || 8260 | 253 | depends on MPC85xx || 8260 |
254 | select CPM | 254 | select CPM |
255 | select PPC_LIB_RHEAP | 255 | select PPC_LIB_RHEAP |
256 | select PPC_PCI_CHOICE | ||
256 | help | 257 | help |
257 | The CPM2 (Communications Processor Module) is a coprocessor on | 258 | The CPM2 (Communications Processor Module) is a coprocessor on |
258 | embedded CPUs made by Freescale. Selecting this option means that | 259 | embedded CPUs made by Freescale. Selecting this option means that |
259 | you wish to build a kernel for a machine with a CPM2 coprocessor | 260 | you wish to build a kernel for a machine with a CPM2 coprocessor |
260 | on it (826x, 827x, 8560). | 261 | on it (826x, 827x, 8560). |
261 | 262 | ||
262 | config PPC_CPM_NEW_BINDING | ||
263 | bool | ||
264 | depends on CPM1 || CPM2 | ||
265 | default y | ||
266 | |||
267 | config AXON_RAM | 263 | config AXON_RAM |
268 | tristate "Axon DDR2 memory device driver" | 264 | tristate "Axon DDR2 memory device driver" |
269 | depends on PPC_IBM_CELL_BLADE | 265 | depends on PPC_IBM_CELL_BLADE |
diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype index 5bc4b611ff88..7f6512733862 100644 --- a/arch/powerpc/platforms/Kconfig.cputype +++ b/arch/powerpc/platforms/Kconfig.cputype | |||
@@ -42,12 +42,14 @@ config 40x | |||
42 | select PPC_DCR_NATIVE | 42 | select PPC_DCR_NATIVE |
43 | select PPC_UDBG_16550 | 43 | select PPC_UDBG_16550 |
44 | select 4xx_SOC | 44 | select 4xx_SOC |
45 | select PPC_PCI_CHOICE | ||
45 | 46 | ||
46 | config 44x | 47 | config 44x |
47 | bool "AMCC 44x" | 48 | bool "AMCC 44x" |
48 | select PPC_DCR_NATIVE | 49 | select PPC_DCR_NATIVE |
49 | select PPC_UDBG_16550 | 50 | select PPC_UDBG_16550 |
50 | select 4xx_SOC | 51 | select 4xx_SOC |
52 | select PPC_PCI_CHOICE | ||
51 | 53 | ||
52 | config E200 | 54 | config E200 |
53 | bool "Freescale e200" | 55 | bool "Freescale e200" |
@@ -84,9 +86,6 @@ config TUNE_CELL | |||
84 | machines. When building a kernel that is supposed to run only | 86 | machines. When building a kernel that is supposed to run only |
85 | on Cell, you should also select the POWER4_ONLY option. | 87 | on Cell, you should also select the POWER4_ONLY option. |
86 | 88 | ||
87 | config 6xx | ||
88 | bool | ||
89 | |||
90 | # this is temp to handle compat with arch=ppc | 89 | # this is temp to handle compat with arch=ppc |
91 | config 8xx | 90 | config 8xx |
92 | bool | 91 | bool |
diff --git a/arch/powerpc/platforms/cell/Kconfig b/arch/powerpc/platforms/cell/Kconfig index 3959fcfe731c..c14d7d8d96c8 100644 --- a/arch/powerpc/platforms/cell/Kconfig +++ b/arch/powerpc/platforms/cell/Kconfig | |||
@@ -83,6 +83,22 @@ config CBE_RAS | |||
83 | depends on PPC_CELL_NATIVE | 83 | depends on PPC_CELL_NATIVE |
84 | default y | 84 | default y |
85 | 85 | ||
86 | config PPC_IBM_CELL_RESETBUTTON | ||
87 | bool "IBM Cell Blade Pinhole reset button" | ||
88 | depends on CBE_RAS && PPC_IBM_CELL_BLADE | ||
89 | default y | ||
90 | help | ||
91 | Support Pinhole Resetbutton on IBM Cell blades. | ||
92 | This adds a method to trigger system reset via front panel pinhole button. | ||
93 | |||
94 | config PPC_IBM_CELL_POWERBUTTON | ||
95 | tristate "IBM Cell Blade power button" | ||
96 | depends on PPC_IBM_CELL_BLADE && PPC_PMI && INPUT_EVDEV | ||
97 | default y | ||
98 | help | ||
99 | Support Powerbutton on IBM Cell blades. | ||
100 | This will enable the powerbutton as an input device. | ||
101 | |||
86 | config CBE_THERM | 102 | config CBE_THERM |
87 | tristate "CBE thermal support" | 103 | tristate "CBE thermal support" |
88 | default m | 104 | default m |
@@ -107,6 +123,15 @@ config CBE_CPUFREQ_PMI | |||
107 | processor will not only be able to run at lower speed, | 123 | processor will not only be able to run at lower speed, |
108 | but also at lower core voltage. | 124 | but also at lower core voltage. |
109 | 125 | ||
126 | config CBE_CPUFREQ_SPU_GOVERNOR | ||
127 | tristate "CBE frequency scaling based on SPU usage" | ||
128 | depends on SPU_FS && CPU_FREQ | ||
129 | default m | ||
130 | help | ||
131 | This governor checks for spu usage to adjust the cpu frequency. | ||
132 | If no spu is running on a given cpu, that cpu will be throttled to | ||
133 | the minimal possible frequency. | ||
134 | |||
110 | endmenu | 135 | endmenu |
111 | 136 | ||
112 | config OPROFILE_CELL | 137 | config OPROFILE_CELL |
diff --git a/arch/powerpc/platforms/cell/Makefile b/arch/powerpc/platforms/cell/Makefile index c2a7e4e5ddf9..7fd830872c43 100644 --- a/arch/powerpc/platforms/cell/Makefile +++ b/arch/powerpc/platforms/cell/Makefile | |||
@@ -8,6 +8,9 @@ obj-$(CONFIG_CBE_THERM) += cbe_thermal.o | |||
8 | obj-$(CONFIG_CBE_CPUFREQ_PMI) += cbe_cpufreq_pmi.o | 8 | obj-$(CONFIG_CBE_CPUFREQ_PMI) += cbe_cpufreq_pmi.o |
9 | obj-$(CONFIG_CBE_CPUFREQ) += cbe-cpufreq.o | 9 | obj-$(CONFIG_CBE_CPUFREQ) += cbe-cpufreq.o |
10 | cbe-cpufreq-y += cbe_cpufreq_pervasive.o cbe_cpufreq.o | 10 | cbe-cpufreq-y += cbe_cpufreq_pervasive.o cbe_cpufreq.o |
11 | obj-$(CONFIG_CBE_CPUFREQ_SPU_GOVERNOR) += cpufreq_spudemand.o | ||
12 | |||
13 | obj-$(CONFIG_PPC_IBM_CELL_POWERBUTTON) += cbe_powerbutton.o | ||
11 | 14 | ||
12 | ifeq ($(CONFIG_SMP),y) | 15 | ifeq ($(CONFIG_SMP),y) |
13 | obj-$(CONFIG_PPC_CELL_NATIVE) += smp.o | 16 | obj-$(CONFIG_PPC_CELL_NATIVE) += smp.o |
diff --git a/arch/powerpc/platforms/cell/cbe_powerbutton.c b/arch/powerpc/platforms/cell/cbe_powerbutton.c new file mode 100644 index 000000000000..dcddaa5fcb66 --- /dev/null +++ b/arch/powerpc/platforms/cell/cbe_powerbutton.c | |||
@@ -0,0 +1,117 @@ | |||
1 | /* | ||
2 | * driver for powerbutton on IBM cell blades | ||
3 | * | ||
4 | * (C) Copyright IBM Corp. 2005-2008 | ||
5 | * | ||
6 | * Author: Christian Krafft <krafft@de.ibm.com> | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License as published by | ||
10 | * the Free Software Foundation; either version 2, or (at your option) | ||
11 | * any later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program; if not, write to the Free Software | ||
20 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
21 | */ | ||
22 | |||
23 | #include <linux/input.h> | ||
24 | #include <linux/platform_device.h> | ||
25 | #include <asm/pmi.h> | ||
26 | #include <asm/prom.h> | ||
27 | |||
28 | static struct input_dev *button_dev; | ||
29 | static struct platform_device *button_pdev; | ||
30 | |||
31 | static void cbe_powerbutton_handle_pmi(pmi_message_t pmi_msg) | ||
32 | { | ||
33 | BUG_ON(pmi_msg.type != PMI_TYPE_POWER_BUTTON); | ||
34 | |||
35 | input_report_key(button_dev, KEY_POWER, 1); | ||
36 | input_sync(button_dev); | ||
37 | input_report_key(button_dev, KEY_POWER, 0); | ||
38 | input_sync(button_dev); | ||
39 | } | ||
40 | |||
41 | static struct pmi_handler cbe_pmi_handler = { | ||
42 | .type = PMI_TYPE_POWER_BUTTON, | ||
43 | .handle_pmi_message = cbe_powerbutton_handle_pmi, | ||
44 | }; | ||
45 | |||
46 | static int __init cbe_powerbutton_init(void) | ||
47 | { | ||
48 | int ret = 0; | ||
49 | struct input_dev *dev; | ||
50 | |||
51 | if (!machine_is_compatible("IBM,CBPLUS-1.0")) { | ||
52 | printk(KERN_ERR "%s: Not a cell blade.\n", __func__); | ||
53 | ret = -ENODEV; | ||
54 | goto out; | ||
55 | } | ||
56 | |||
57 | dev = input_allocate_device(); | ||
58 | if (!dev) { | ||
59 | ret = -ENOMEM; | ||
60 | printk(KERN_ERR "%s: Not enough memory.\n", __func__); | ||
61 | goto out; | ||
62 | } | ||
63 | |||
64 | set_bit(EV_KEY, dev->evbit); | ||
65 | set_bit(KEY_POWER, dev->keybit); | ||
66 | |||
67 | dev->name = "Power Button"; | ||
68 | dev->id.bustype = BUS_HOST; | ||
69 | |||
70 | /* this makes the button look like an acpi power button | ||
71 | * no clue whether anyone relies on that though */ | ||
72 | dev->id.product = 0x02; | ||
73 | dev->phys = "LNXPWRBN/button/input0"; | ||
74 | |||
75 | button_pdev = platform_device_register_simple("power_button", 0, NULL, 0); | ||
76 | if (IS_ERR(button_pdev)) { | ||
77 | ret = PTR_ERR(button_pdev); | ||
78 | goto out_free_input; | ||
79 | } | ||
80 | |||
81 | dev->dev.parent = &button_pdev->dev; | ||
82 | ret = input_register_device(dev); | ||
83 | if (ret) { | ||
84 | printk(KERN_ERR "%s: Failed to register device\n", __func__); | ||
85 | goto out_free_pdev; | ||
86 | } | ||
87 | |||
88 | button_dev = dev; | ||
89 | |||
90 | ret = pmi_register_handler(&cbe_pmi_handler); | ||
91 | if (ret) { | ||
92 | printk(KERN_ERR "%s: Failed to register with pmi.\n", __func__); | ||
93 | goto out_free_pdev; | ||
94 | } | ||
95 | |||
96 | goto out; | ||
97 | |||
98 | out_free_pdev: | ||
99 | platform_device_unregister(button_pdev); | ||
100 | out_free_input: | ||
101 | input_free_device(dev); | ||
102 | out: | ||
103 | return ret; | ||
104 | } | ||
105 | |||
106 | static void __exit cbe_powerbutton_exit(void) | ||
107 | { | ||
108 | pmi_unregister_handler(&cbe_pmi_handler); | ||
109 | platform_device_unregister(button_pdev); | ||
110 | input_free_device(button_dev); | ||
111 | } | ||
112 | |||
113 | module_init(cbe_powerbutton_init); | ||
114 | module_exit(cbe_powerbutton_exit); | ||
115 | |||
116 | MODULE_LICENSE("GPL"); | ||
117 | MODULE_AUTHOR("Christian Krafft <krafft@de.ibm.com>"); | ||
diff --git a/arch/powerpc/platforms/cell/cbe_thermal.c b/arch/powerpc/platforms/cell/cbe_thermal.c index 4852bf312d83..4d4c8c169124 100644 --- a/arch/powerpc/platforms/cell/cbe_thermal.c +++ b/arch/powerpc/platforms/cell/cbe_thermal.c | |||
@@ -97,7 +97,8 @@ static u8 spu_read_register_value(struct sys_device *sysdev, union spe_reg __iom | |||
97 | return value.spe[spu->spe_id]; | 97 | return value.spe[spu->spe_id]; |
98 | } | 98 | } |
99 | 99 | ||
100 | static ssize_t spu_show_temp(struct sys_device *sysdev, char *buf) | 100 | static ssize_t spu_show_temp(struct sys_device *sysdev, struct sysdev_attribute *attr, |
101 | char *buf) | ||
101 | { | 102 | { |
102 | u8 value; | 103 | u8 value; |
103 | struct cbe_pmd_regs __iomem *pmd_regs; | 104 | struct cbe_pmd_regs __iomem *pmd_regs; |
@@ -146,32 +147,38 @@ static ssize_t store_throttle(struct cbe_pmd_regs __iomem *pmd_regs, const char | |||
146 | return size; | 147 | return size; |
147 | } | 148 | } |
148 | 149 | ||
149 | static ssize_t spu_show_throttle_end(struct sys_device *sysdev, char *buf) | 150 | static ssize_t spu_show_throttle_end(struct sys_device *sysdev, |
151 | struct sysdev_attribute *attr, char *buf) | ||
150 | { | 152 | { |
151 | return show_throttle(get_pmd_regs(sysdev), buf, 0); | 153 | return show_throttle(get_pmd_regs(sysdev), buf, 0); |
152 | } | 154 | } |
153 | 155 | ||
154 | static ssize_t spu_show_throttle_begin(struct sys_device *sysdev, char *buf) | 156 | static ssize_t spu_show_throttle_begin(struct sys_device *sysdev, |
157 | struct sysdev_attribute *attr, char *buf) | ||
155 | { | 158 | { |
156 | return show_throttle(get_pmd_regs(sysdev), buf, 8); | 159 | return show_throttle(get_pmd_regs(sysdev), buf, 8); |
157 | } | 160 | } |
158 | 161 | ||
159 | static ssize_t spu_show_throttle_full_stop(struct sys_device *sysdev, char *buf) | 162 | static ssize_t spu_show_throttle_full_stop(struct sys_device *sysdev, |
163 | struct sysdev_attribute *attr, char *buf) | ||
160 | { | 164 | { |
161 | return show_throttle(get_pmd_regs(sysdev), buf, 16); | 165 | return show_throttle(get_pmd_regs(sysdev), buf, 16); |
162 | } | 166 | } |
163 | 167 | ||
164 | static ssize_t spu_store_throttle_end(struct sys_device *sysdev, const char *buf, size_t size) | 168 | static ssize_t spu_store_throttle_end(struct sys_device *sysdev, |
169 | struct sysdev_attribute *attr, const char *buf, size_t size) | ||
165 | { | 170 | { |
166 | return store_throttle(get_pmd_regs(sysdev), buf, size, 0); | 171 | return store_throttle(get_pmd_regs(sysdev), buf, size, 0); |
167 | } | 172 | } |
168 | 173 | ||
169 | static ssize_t spu_store_throttle_begin(struct sys_device *sysdev, const char *buf, size_t size) | 174 | static ssize_t spu_store_throttle_begin(struct sys_device *sysdev, |
175 | struct sysdev_attribute *attr, const char *buf, size_t size) | ||
170 | { | 176 | { |
171 | return store_throttle(get_pmd_regs(sysdev), buf, size, 8); | 177 | return store_throttle(get_pmd_regs(sysdev), buf, size, 8); |
172 | } | 178 | } |
173 | 179 | ||
174 | static ssize_t spu_store_throttle_full_stop(struct sys_device *sysdev, const char *buf, size_t size) | 180 | static ssize_t spu_store_throttle_full_stop(struct sys_device *sysdev, |
181 | struct sysdev_attribute *attr, const char *buf, size_t size) | ||
175 | { | 182 | { |
176 | return store_throttle(get_pmd_regs(sysdev), buf, size, 16); | 183 | return store_throttle(get_pmd_regs(sysdev), buf, size, 16); |
177 | } | 184 | } |
@@ -192,43 +199,51 @@ static ssize_t ppe_show_temp(struct sys_device *sysdev, char *buf, int pos) | |||
192 | 199 | ||
193 | /* shows the temperature of the DTS on the PPE, | 200 | /* shows the temperature of the DTS on the PPE, |
194 | * located near the linear thermal sensor */ | 201 | * located near the linear thermal sensor */ |
195 | static ssize_t ppe_show_temp0(struct sys_device *sysdev, char *buf) | 202 | static ssize_t ppe_show_temp0(struct sys_device *sysdev, |
203 | struct sysdev_attribute *attr, char *buf) | ||
196 | { | 204 | { |
197 | return ppe_show_temp(sysdev, buf, 32); | 205 | return ppe_show_temp(sysdev, buf, 32); |
198 | } | 206 | } |
199 | 207 | ||
200 | /* shows the temperature of the second DTS on the PPE */ | 208 | /* shows the temperature of the second DTS on the PPE */ |
201 | static ssize_t ppe_show_temp1(struct sys_device *sysdev, char *buf) | 209 | static ssize_t ppe_show_temp1(struct sys_device *sysdev, |
210 | struct sysdev_attribute *attr, char *buf) | ||
202 | { | 211 | { |
203 | return ppe_show_temp(sysdev, buf, 0); | 212 | return ppe_show_temp(sysdev, buf, 0); |
204 | } | 213 | } |
205 | 214 | ||
206 | static ssize_t ppe_show_throttle_end(struct sys_device *sysdev, char *buf) | 215 | static ssize_t ppe_show_throttle_end(struct sys_device *sysdev, |
216 | struct sysdev_attribute *attr, char *buf) | ||
207 | { | 217 | { |
208 | return show_throttle(cbe_get_cpu_pmd_regs(sysdev->id), buf, 32); | 218 | return show_throttle(cbe_get_cpu_pmd_regs(sysdev->id), buf, 32); |
209 | } | 219 | } |
210 | 220 | ||
211 | static ssize_t ppe_show_throttle_begin(struct sys_device *sysdev, char *buf) | 221 | static ssize_t ppe_show_throttle_begin(struct sys_device *sysdev, |
222 | struct sysdev_attribute *attr, char *buf) | ||
212 | { | 223 | { |
213 | return show_throttle(cbe_get_cpu_pmd_regs(sysdev->id), buf, 40); | 224 | return show_throttle(cbe_get_cpu_pmd_regs(sysdev->id), buf, 40); |
214 | } | 225 | } |
215 | 226 | ||
216 | static ssize_t ppe_show_throttle_full_stop(struct sys_device *sysdev, char *buf) | 227 | static ssize_t ppe_show_throttle_full_stop(struct sys_device *sysdev, |
228 | struct sysdev_attribute *attr, char *buf) | ||
217 | { | 229 | { |
218 | return show_throttle(cbe_get_cpu_pmd_regs(sysdev->id), buf, 48); | 230 | return show_throttle(cbe_get_cpu_pmd_regs(sysdev->id), buf, 48); |
219 | } | 231 | } |
220 | 232 | ||
221 | static ssize_t ppe_store_throttle_end(struct sys_device *sysdev, const char *buf, size_t size) | 233 | static ssize_t ppe_store_throttle_end(struct sys_device *sysdev, |
234 | struct sysdev_attribute *attr, const char *buf, size_t size) | ||
222 | { | 235 | { |
223 | return store_throttle(cbe_get_cpu_pmd_regs(sysdev->id), buf, size, 32); | 236 | return store_throttle(cbe_get_cpu_pmd_regs(sysdev->id), buf, size, 32); |
224 | } | 237 | } |
225 | 238 | ||
226 | static ssize_t ppe_store_throttle_begin(struct sys_device *sysdev, const char *buf, size_t size) | 239 | static ssize_t ppe_store_throttle_begin(struct sys_device *sysdev, |
240 | struct sysdev_attribute *attr, const char *buf, size_t size) | ||
227 | { | 241 | { |
228 | return store_throttle(cbe_get_cpu_pmd_regs(sysdev->id), buf, size, 40); | 242 | return store_throttle(cbe_get_cpu_pmd_regs(sysdev->id), buf, size, 40); |
229 | } | 243 | } |
230 | 244 | ||
231 | static ssize_t ppe_store_throttle_full_stop(struct sys_device *sysdev, const char *buf, size_t size) | 245 | static ssize_t ppe_store_throttle_full_stop(struct sys_device *sysdev, |
246 | struct sysdev_attribute *attr, const char *buf, size_t size) | ||
232 | { | 247 | { |
233 | return store_throttle(cbe_get_cpu_pmd_regs(sysdev->id), buf, size, 48); | 248 | return store_throttle(cbe_get_cpu_pmd_regs(sysdev->id), buf, size, 48); |
234 | } | 249 | } |
diff --git a/arch/powerpc/platforms/cell/cpufreq_spudemand.c b/arch/powerpc/platforms/cell/cpufreq_spudemand.c new file mode 100644 index 000000000000..a3c6c01bd6db --- /dev/null +++ b/arch/powerpc/platforms/cell/cpufreq_spudemand.c | |||
@@ -0,0 +1,184 @@ | |||
1 | /* | ||
2 | * spu aware cpufreq governor for the cell processor | ||
3 | * | ||
4 | * © Copyright IBM Corporation 2006-2008 | ||
5 | * | ||
6 | * Author: Christian Krafft <krafft@de.ibm.com> | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License as published by | ||
10 | * the Free Software Foundation; either version 2, or (at your option) | ||
11 | * any later version. | ||
12 | * | ||
13 | * This program is distributed in the hope that it will be useful, | ||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
16 | * GNU General Public License for more details. | ||
17 | * | ||
18 | * You should have received a copy of the GNU General Public License | ||
19 | * along with this program; if not, write to the Free Software | ||
20 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
21 | */ | ||
22 | |||
23 | #include <linux/cpufreq.h> | ||
24 | #include <linux/sched.h> | ||
25 | #include <linux/timer.h> | ||
26 | #include <linux/workqueue.h> | ||
27 | #include <asm/atomic.h> | ||
28 | #include <asm/machdep.h> | ||
29 | #include <asm/spu.h> | ||
30 | |||
31 | #define POLL_TIME 100000 /* in µs */ | ||
32 | #define EXP 753 /* exp(-1) in fixed-point */ | ||
33 | |||
34 | struct spu_gov_info_struct { | ||
35 | unsigned long busy_spus; /* fixed-point */ | ||
36 | struct cpufreq_policy *policy; | ||
37 | struct delayed_work work; | ||
38 | unsigned int poll_int; /* µs */ | ||
39 | }; | ||
40 | static DEFINE_PER_CPU(struct spu_gov_info_struct, spu_gov_info); | ||
41 | |||
42 | static struct workqueue_struct *kspugov_wq; | ||
43 | |||
44 | static int calc_freq(struct spu_gov_info_struct *info) | ||
45 | { | ||
46 | int cpu; | ||
47 | int busy_spus; | ||
48 | |||
49 | cpu = info->policy->cpu; | ||
50 | busy_spus = atomic_read(&cbe_spu_info[cpu_to_node(cpu)].busy_spus); | ||
51 | |||
52 | CALC_LOAD(info->busy_spus, EXP, busy_spus * FIXED_1); | ||
53 | pr_debug("cpu %d: busy_spus=%d, info->busy_spus=%ld\n", | ||
54 | cpu, busy_spus, info->busy_spus); | ||
55 | |||
56 | return info->policy->max * info->busy_spus / FIXED_1; | ||
57 | } | ||
58 | |||
59 | static void spu_gov_work(struct work_struct *work) | ||
60 | { | ||
61 | struct spu_gov_info_struct *info; | ||
62 | int delay; | ||
63 | unsigned long target_freq; | ||
64 | |||
65 | info = container_of(work, struct spu_gov_info_struct, work.work); | ||
66 | |||
67 | /* after cancel_delayed_work_sync we unset info->policy */ | ||
68 | BUG_ON(info->policy == NULL); | ||
69 | |||
70 | target_freq = calc_freq(info); | ||
71 | __cpufreq_driver_target(info->policy, target_freq, CPUFREQ_RELATION_H); | ||
72 | |||
73 | delay = usecs_to_jiffies(info->poll_int); | ||
74 | queue_delayed_work_on(info->policy->cpu, kspugov_wq, &info->work, delay); | ||
75 | } | ||
76 | |||
77 | static void spu_gov_init_work(struct spu_gov_info_struct *info) | ||
78 | { | ||
79 | int delay = usecs_to_jiffies(info->poll_int); | ||
80 | INIT_DELAYED_WORK_DEFERRABLE(&info->work, spu_gov_work); | ||
81 | queue_delayed_work_on(info->policy->cpu, kspugov_wq, &info->work, delay); | ||
82 | } | ||
83 | |||
84 | static void spu_gov_cancel_work(struct spu_gov_info_struct *info) | ||
85 | { | ||
86 | cancel_delayed_work_sync(&info->work); | ||
87 | } | ||
88 | |||
89 | static int spu_gov_govern(struct cpufreq_policy *policy, unsigned int event) | ||
90 | { | ||
91 | unsigned int cpu = policy->cpu; | ||
92 | struct spu_gov_info_struct *info, *affected_info; | ||
93 | int i; | ||
94 | int ret = 0; | ||
95 | |||
96 | info = &per_cpu(spu_gov_info, cpu); | ||
97 | |||
98 | switch (event) { | ||
99 | case CPUFREQ_GOV_START: | ||
100 | if (!cpu_online(cpu)) { | ||
101 | printk(KERN_ERR "cpu %d is not online\n", cpu); | ||
102 | ret = -EINVAL; | ||
103 | break; | ||
104 | } | ||
105 | |||
106 | if (!policy->cur) { | ||
107 | printk(KERN_ERR "no cpu specified in policy\n"); | ||
108 | ret = -EINVAL; | ||
109 | break; | ||
110 | } | ||
111 | |||
112 | /* initialize spu_gov_info for all affected cpus */ | ||
113 | for_each_cpu_mask(i, policy->cpus) { | ||
114 | affected_info = &per_cpu(spu_gov_info, i); | ||
115 | affected_info->policy = policy; | ||
116 | } | ||
117 | |||
118 | info->poll_int = POLL_TIME; | ||
119 | |||
120 | /* setup timer */ | ||
121 | spu_gov_init_work(info); | ||
122 | |||
123 | break; | ||
124 | |||
125 | case CPUFREQ_GOV_STOP: | ||
126 | /* cancel timer */ | ||
127 | spu_gov_cancel_work(info); | ||
128 | |||
129 | /* clean spu_gov_info for all affected cpus */ | ||
130 | for_each_cpu_mask (i, policy->cpus) { | ||
131 | info = &per_cpu(spu_gov_info, i); | ||
132 | info->policy = NULL; | ||
133 | } | ||
134 | |||
135 | break; | ||
136 | } | ||
137 | |||
138 | return ret; | ||
139 | } | ||
140 | |||
141 | static struct cpufreq_governor spu_governor = { | ||
142 | .name = "spudemand", | ||
143 | .governor = spu_gov_govern, | ||
144 | .owner = THIS_MODULE, | ||
145 | }; | ||
146 | |||
147 | /* | ||
148 | * module init and destoy | ||
149 | */ | ||
150 | |||
151 | static int __init spu_gov_init(void) | ||
152 | { | ||
153 | int ret; | ||
154 | |||
155 | kspugov_wq = create_workqueue("kspugov"); | ||
156 | if (!kspugov_wq) { | ||
157 | printk(KERN_ERR "creation of kspugov failed\n"); | ||
158 | ret = -EFAULT; | ||
159 | goto out; | ||
160 | } | ||
161 | |||
162 | ret = cpufreq_register_governor(&spu_governor); | ||
163 | if (ret) { | ||
164 | printk(KERN_ERR "registration of governor failed\n"); | ||
165 | destroy_workqueue(kspugov_wq); | ||
166 | goto out; | ||
167 | } | ||
168 | out: | ||
169 | return ret; | ||
170 | } | ||
171 | |||
172 | static void __exit spu_gov_exit(void) | ||
173 | { | ||
174 | cpufreq_unregister_governor(&spu_governor); | ||
175 | destroy_workqueue(kspugov_wq); | ||
176 | } | ||
177 | |||
178 | |||
179 | module_init(spu_gov_init); | ||
180 | module_exit(spu_gov_exit); | ||
181 | |||
182 | MODULE_LICENSE("GPL"); | ||
183 | MODULE_AUTHOR("Christian Krafft <krafft@de.ibm.com>"); | ||
184 | |||
diff --git a/arch/powerpc/platforms/cell/iommu.c b/arch/powerpc/platforms/cell/iommu.c index eeacb3a52ca1..208005ca262c 100644 --- a/arch/powerpc/platforms/cell/iommu.c +++ b/arch/powerpc/platforms/cell/iommu.c | |||
@@ -173,7 +173,8 @@ static void invalidate_tce_cache(struct cbe_iommu *iommu, unsigned long *pte, | |||
173 | } | 173 | } |
174 | 174 | ||
175 | static void tce_build_cell(struct iommu_table *tbl, long index, long npages, | 175 | static void tce_build_cell(struct iommu_table *tbl, long index, long npages, |
176 | unsigned long uaddr, enum dma_data_direction direction) | 176 | unsigned long uaddr, enum dma_data_direction direction, |
177 | struct dma_attrs *attrs) | ||
177 | { | 178 | { |
178 | int i; | 179 | int i; |
179 | unsigned long *io_pte, base_pte; | 180 | unsigned long *io_pte, base_pte; |
@@ -198,6 +199,8 @@ static void tce_build_cell(struct iommu_table *tbl, long index, long npages, | |||
198 | base_pte = IOPTE_PP_W | IOPTE_PP_R | IOPTE_M | IOPTE_SO_RW | | 199 | base_pte = IOPTE_PP_W | IOPTE_PP_R | IOPTE_M | IOPTE_SO_RW | |
199 | (window->ioid & IOPTE_IOID_Mask); | 200 | (window->ioid & IOPTE_IOID_Mask); |
200 | #endif | 201 | #endif |
202 | if (unlikely(dma_get_attr(DMA_ATTR_WEAK_ORDERING, attrs))) | ||
203 | base_pte &= ~IOPTE_SO_RW; | ||
201 | 204 | ||
202 | io_pte = (unsigned long *)tbl->it_base + (index - tbl->it_offset); | 205 | io_pte = (unsigned long *)tbl->it_base + (index - tbl->it_offset); |
203 | 206 | ||
@@ -519,7 +522,7 @@ cell_iommu_setup_window(struct cbe_iommu *iommu, struct device_node *np, | |||
519 | 522 | ||
520 | __set_bit(0, window->table.it_map); | 523 | __set_bit(0, window->table.it_map); |
521 | tce_build_cell(&window->table, window->table.it_offset, 1, | 524 | tce_build_cell(&window->table, window->table.it_offset, 1, |
522 | (unsigned long)iommu->pad_page, DMA_TO_DEVICE); | 525 | (unsigned long)iommu->pad_page, DMA_TO_DEVICE, NULL); |
523 | window->table.it_hint = window->table.it_blocksize; | 526 | window->table.it_hint = window->table.it_blocksize; |
524 | 527 | ||
525 | return window; | 528 | return window; |
@@ -538,7 +541,9 @@ static struct cbe_iommu *cell_iommu_for_node(int nid) | |||
538 | static unsigned long cell_dma_direct_offset; | 541 | static unsigned long cell_dma_direct_offset; |
539 | 542 | ||
540 | static unsigned long dma_iommu_fixed_base; | 543 | static unsigned long dma_iommu_fixed_base; |
541 | struct dma_mapping_ops dma_iommu_fixed_ops; | 544 | |
545 | /* iommu_fixed_is_weak is set if booted with iommu_fixed=weak */ | ||
546 | static int iommu_fixed_is_weak; | ||
542 | 547 | ||
543 | static struct iommu_table *cell_get_iommu_table(struct device *dev) | 548 | static struct iommu_table *cell_get_iommu_table(struct device *dev) |
544 | { | 549 | { |
@@ -562,6 +567,98 @@ static struct iommu_table *cell_get_iommu_table(struct device *dev) | |||
562 | return &window->table; | 567 | return &window->table; |
563 | } | 568 | } |
564 | 569 | ||
570 | /* A coherent allocation implies strong ordering */ | ||
571 | |||
572 | static void *dma_fixed_alloc_coherent(struct device *dev, size_t size, | ||
573 | dma_addr_t *dma_handle, gfp_t flag) | ||
574 | { | ||
575 | if (iommu_fixed_is_weak) | ||
576 | return iommu_alloc_coherent(dev, cell_get_iommu_table(dev), | ||
577 | size, dma_handle, | ||
578 | device_to_mask(dev), flag, | ||
579 | dev->archdata.numa_node); | ||
580 | else | ||
581 | return dma_direct_ops.alloc_coherent(dev, size, dma_handle, | ||
582 | flag); | ||
583 | } | ||
584 | |||
585 | static void dma_fixed_free_coherent(struct device *dev, size_t size, | ||
586 | void *vaddr, dma_addr_t dma_handle) | ||
587 | { | ||
588 | if (iommu_fixed_is_weak) | ||
589 | iommu_free_coherent(cell_get_iommu_table(dev), size, vaddr, | ||
590 | dma_handle); | ||
591 | else | ||
592 | dma_direct_ops.free_coherent(dev, size, vaddr, dma_handle); | ||
593 | } | ||
594 | |||
595 | static dma_addr_t dma_fixed_map_single(struct device *dev, void *ptr, | ||
596 | size_t size, | ||
597 | enum dma_data_direction direction, | ||
598 | struct dma_attrs *attrs) | ||
599 | { | ||
600 | if (iommu_fixed_is_weak == dma_get_attr(DMA_ATTR_WEAK_ORDERING, attrs)) | ||
601 | return dma_direct_ops.map_single(dev, ptr, size, direction, | ||
602 | attrs); | ||
603 | else | ||
604 | return iommu_map_single(dev, cell_get_iommu_table(dev), ptr, | ||
605 | size, device_to_mask(dev), direction, | ||
606 | attrs); | ||
607 | } | ||
608 | |||
609 | static void dma_fixed_unmap_single(struct device *dev, dma_addr_t dma_addr, | ||
610 | size_t size, | ||
611 | enum dma_data_direction direction, | ||
612 | struct dma_attrs *attrs) | ||
613 | { | ||
614 | if (iommu_fixed_is_weak == dma_get_attr(DMA_ATTR_WEAK_ORDERING, attrs)) | ||
615 | dma_direct_ops.unmap_single(dev, dma_addr, size, direction, | ||
616 | attrs); | ||
617 | else | ||
618 | iommu_unmap_single(cell_get_iommu_table(dev), dma_addr, size, | ||
619 | direction, attrs); | ||
620 | } | ||
621 | |||
622 | static int dma_fixed_map_sg(struct device *dev, struct scatterlist *sg, | ||
623 | int nents, enum dma_data_direction direction, | ||
624 | struct dma_attrs *attrs) | ||
625 | { | ||
626 | if (iommu_fixed_is_weak == dma_get_attr(DMA_ATTR_WEAK_ORDERING, attrs)) | ||
627 | return dma_direct_ops.map_sg(dev, sg, nents, direction, attrs); | ||
628 | else | ||
629 | return iommu_map_sg(dev, cell_get_iommu_table(dev), sg, nents, | ||
630 | device_to_mask(dev), direction, attrs); | ||
631 | } | ||
632 | |||
633 | static void dma_fixed_unmap_sg(struct device *dev, struct scatterlist *sg, | ||
634 | int nents, enum dma_data_direction direction, | ||
635 | struct dma_attrs *attrs) | ||
636 | { | ||
637 | if (iommu_fixed_is_weak == dma_get_attr(DMA_ATTR_WEAK_ORDERING, attrs)) | ||
638 | dma_direct_ops.unmap_sg(dev, sg, nents, direction, attrs); | ||
639 | else | ||
640 | iommu_unmap_sg(cell_get_iommu_table(dev), sg, nents, direction, | ||
641 | attrs); | ||
642 | } | ||
643 | |||
644 | static int dma_fixed_dma_supported(struct device *dev, u64 mask) | ||
645 | { | ||
646 | return mask == DMA_64BIT_MASK; | ||
647 | } | ||
648 | |||
649 | static int dma_set_mask_and_switch(struct device *dev, u64 dma_mask); | ||
650 | |||
651 | struct dma_mapping_ops dma_iommu_fixed_ops = { | ||
652 | .alloc_coherent = dma_fixed_alloc_coherent, | ||
653 | .free_coherent = dma_fixed_free_coherent, | ||
654 | .map_single = dma_fixed_map_single, | ||
655 | .unmap_single = dma_fixed_unmap_single, | ||
656 | .map_sg = dma_fixed_map_sg, | ||
657 | .unmap_sg = dma_fixed_unmap_sg, | ||
658 | .dma_supported = dma_fixed_dma_supported, | ||
659 | .set_dma_mask = dma_set_mask_and_switch, | ||
660 | }; | ||
661 | |||
565 | static void cell_dma_dev_setup_fixed(struct device *dev); | 662 | static void cell_dma_dev_setup_fixed(struct device *dev); |
566 | 663 | ||
567 | static void cell_dma_dev_setup(struct device *dev) | 664 | static void cell_dma_dev_setup(struct device *dev) |
@@ -918,9 +1015,16 @@ static void cell_iommu_setup_fixed_ptab(struct cbe_iommu *iommu, | |||
918 | 1015 | ||
919 | pr_debug("iommu: mapping 0x%lx pages from 0x%lx\n", fsize, fbase); | 1016 | pr_debug("iommu: mapping 0x%lx pages from 0x%lx\n", fsize, fbase); |
920 | 1017 | ||
921 | base_pte = IOPTE_PP_W | IOPTE_PP_R | IOPTE_M | IOPTE_SO_RW | 1018 | base_pte = IOPTE_PP_W | IOPTE_PP_R | IOPTE_M |
922 | | (cell_iommu_get_ioid(np) & IOPTE_IOID_Mask); | 1019 | | (cell_iommu_get_ioid(np) & IOPTE_IOID_Mask); |
923 | 1020 | ||
1021 | if (iommu_fixed_is_weak) | ||
1022 | pr_info("IOMMU: Using weak ordering for fixed mapping\n"); | ||
1023 | else { | ||
1024 | pr_info("IOMMU: Using strong ordering for fixed mapping\n"); | ||
1025 | base_pte |= IOPTE_SO_RW; | ||
1026 | } | ||
1027 | |||
924 | for (uaddr = 0; uaddr < fsize; uaddr += (1 << 24)) { | 1028 | for (uaddr = 0; uaddr < fsize; uaddr += (1 << 24)) { |
925 | /* Don't touch the dynamic region */ | 1029 | /* Don't touch the dynamic region */ |
926 | ioaddr = uaddr + fbase; | 1030 | ioaddr = uaddr + fbase; |
@@ -1036,9 +1140,6 @@ static int __init cell_iommu_fixed_mapping_init(void) | |||
1036 | cell_iommu_setup_window(iommu, np, dbase, dsize, 0); | 1140 | cell_iommu_setup_window(iommu, np, dbase, dsize, 0); |
1037 | } | 1141 | } |
1038 | 1142 | ||
1039 | dma_iommu_fixed_ops = dma_direct_ops; | ||
1040 | dma_iommu_fixed_ops.set_dma_mask = dma_set_mask_and_switch; | ||
1041 | |||
1042 | dma_iommu_ops.set_dma_mask = dma_set_mask_and_switch; | 1143 | dma_iommu_ops.set_dma_mask = dma_set_mask_and_switch; |
1043 | set_pci_dma_ops(&dma_iommu_ops); | 1144 | set_pci_dma_ops(&dma_iommu_ops); |
1044 | 1145 | ||
@@ -1052,6 +1153,9 @@ static int __init setup_iommu_fixed(char *str) | |||
1052 | if (strcmp(str, "off") == 0) | 1153 | if (strcmp(str, "off") == 0) |
1053 | iommu_fixed_disabled = 1; | 1154 | iommu_fixed_disabled = 1; |
1054 | 1155 | ||
1156 | else if (strcmp(str, "weak") == 0) | ||
1157 | iommu_fixed_is_weak = 1; | ||
1158 | |||
1055 | return 1; | 1159 | return 1; |
1056 | } | 1160 | } |
1057 | __setup("iommu_fixed=", setup_iommu_fixed); | 1161 | __setup("iommu_fixed=", setup_iommu_fixed); |
diff --git a/arch/powerpc/platforms/cell/pervasive.c b/arch/powerpc/platforms/cell/pervasive.c index 8a3631ce912b..efdacc829576 100644 --- a/arch/powerpc/platforms/cell/pervasive.c +++ b/arch/powerpc/platforms/cell/pervasive.c | |||
@@ -38,8 +38,6 @@ | |||
38 | 38 | ||
39 | #include "pervasive.h" | 39 | #include "pervasive.h" |
40 | 40 | ||
41 | static int sysreset_hack; | ||
42 | |||
43 | static void cbe_power_save(void) | 41 | static void cbe_power_save(void) |
44 | { | 42 | { |
45 | unsigned long ctrl, thread_switch_control; | 43 | unsigned long ctrl, thread_switch_control; |
@@ -87,9 +85,6 @@ static void cbe_power_save(void) | |||
87 | 85 | ||
88 | static int cbe_system_reset_exception(struct pt_regs *regs) | 86 | static int cbe_system_reset_exception(struct pt_regs *regs) |
89 | { | 87 | { |
90 | int cpu; | ||
91 | struct cbe_pmd_regs __iomem *pmd; | ||
92 | |||
93 | switch (regs->msr & SRR1_WAKEMASK) { | 88 | switch (regs->msr & SRR1_WAKEMASK) { |
94 | case SRR1_WAKEEE: | 89 | case SRR1_WAKEEE: |
95 | do_IRQ(regs); | 90 | do_IRQ(regs); |
@@ -98,19 +93,7 @@ static int cbe_system_reset_exception(struct pt_regs *regs) | |||
98 | timer_interrupt(regs); | 93 | timer_interrupt(regs); |
99 | break; | 94 | break; |
100 | case SRR1_WAKEMT: | 95 | case SRR1_WAKEMT: |
101 | /* | 96 | return cbe_sysreset_hack(); |
102 | * The BMC can inject user triggered system reset exceptions, | ||
103 | * but cannot set the system reset reason in srr1, | ||
104 | * so check an extra register here. | ||
105 | */ | ||
106 | if (sysreset_hack && (cpu = smp_processor_id()) == 0) { | ||
107 | pmd = cbe_get_cpu_pmd_regs(cpu); | ||
108 | if (in_be64(&pmd->ras_esc_0) & 0xffff) { | ||
109 | out_be64(&pmd->ras_esc_0, 0); | ||
110 | return 0; | ||
111 | } | ||
112 | } | ||
113 | break; | ||
114 | #ifdef CONFIG_CBE_RAS | 97 | #ifdef CONFIG_CBE_RAS |
115 | case SRR1_WAKESYSERR: | 98 | case SRR1_WAKESYSERR: |
116 | cbe_system_error_exception(regs); | 99 | cbe_system_error_exception(regs); |
@@ -134,8 +117,6 @@ void __init cbe_pervasive_init(void) | |||
134 | if (!cpu_has_feature(CPU_FTR_PAUSE_ZERO)) | 117 | if (!cpu_has_feature(CPU_FTR_PAUSE_ZERO)) |
135 | return; | 118 | return; |
136 | 119 | ||
137 | sysreset_hack = machine_is_compatible("IBM,CBPLUS-1.0"); | ||
138 | |||
139 | for_each_possible_cpu(cpu) { | 120 | for_each_possible_cpu(cpu) { |
140 | struct cbe_pmd_regs __iomem *regs = cbe_get_cpu_pmd_regs(cpu); | 121 | struct cbe_pmd_regs __iomem *regs = cbe_get_cpu_pmd_regs(cpu); |
141 | if (!regs) | 122 | if (!regs) |
@@ -144,12 +125,6 @@ void __init cbe_pervasive_init(void) | |||
144 | /* Enable Pause(0) control bit */ | 125 | /* Enable Pause(0) control bit */ |
145 | out_be64(®s->pmcr, in_be64(®s->pmcr) | | 126 | out_be64(®s->pmcr, in_be64(®s->pmcr) | |
146 | CBE_PMD_PAUSE_ZERO_CONTROL); | 127 | CBE_PMD_PAUSE_ZERO_CONTROL); |
147 | |||
148 | /* Enable JTAG system-reset hack */ | ||
149 | if (sysreset_hack) | ||
150 | out_be32(®s->fir_mode_reg, | ||
151 | in_be32(®s->fir_mode_reg) | | ||
152 | CBE_PMD_FIR_MODE_M8); | ||
153 | } | 128 | } |
154 | 129 | ||
155 | ppc_md.power_save = cbe_power_save; | 130 | ppc_md.power_save = cbe_power_save; |
diff --git a/arch/powerpc/platforms/cell/pervasive.h b/arch/powerpc/platforms/cell/pervasive.h index 7b50947f8044..fd4d7b7092b4 100644 --- a/arch/powerpc/platforms/cell/pervasive.h +++ b/arch/powerpc/platforms/cell/pervasive.h | |||
@@ -30,4 +30,13 @@ extern void cbe_system_error_exception(struct pt_regs *regs); | |||
30 | extern void cbe_maintenance_exception(struct pt_regs *regs); | 30 | extern void cbe_maintenance_exception(struct pt_regs *regs); |
31 | extern void cbe_thermal_exception(struct pt_regs *regs); | 31 | extern void cbe_thermal_exception(struct pt_regs *regs); |
32 | 32 | ||
33 | #ifdef CONFIG_PPC_IBM_CELL_RESETBUTTON | ||
34 | extern int cbe_sysreset_hack(void); | ||
35 | #else | ||
36 | static inline int cbe_sysreset_hack(void) | ||
37 | { | ||
38 | return 1; | ||
39 | } | ||
40 | #endif /* CONFIG_PPC_IBM_CELL_RESETBUTTON */ | ||
41 | |||
33 | #endif | 42 | #endif |
diff --git a/arch/powerpc/platforms/cell/ras.c b/arch/powerpc/platforms/cell/ras.c index 505f9b9bdf0c..2a14b052abcd 100644 --- a/arch/powerpc/platforms/cell/ras.c +++ b/arch/powerpc/platforms/cell/ras.c | |||
@@ -236,6 +236,52 @@ static struct notifier_block cbe_ptcal_reboot_notifier = { | |||
236 | .notifier_call = cbe_ptcal_notify_reboot | 236 | .notifier_call = cbe_ptcal_notify_reboot |
237 | }; | 237 | }; |
238 | 238 | ||
239 | #ifdef CONFIG_PPC_IBM_CELL_RESETBUTTON | ||
240 | static int sysreset_hack; | ||
241 | |||
242 | static int __init cbe_sysreset_init(void) | ||
243 | { | ||
244 | struct cbe_pmd_regs __iomem *regs; | ||
245 | |||
246 | sysreset_hack = machine_is_compatible("IBM,CBPLUS-1.0"); | ||
247 | if (!sysreset_hack) | ||
248 | return 0; | ||
249 | |||
250 | regs = cbe_get_cpu_pmd_regs(0); | ||
251 | if (!regs) | ||
252 | return 0; | ||
253 | |||
254 | /* Enable JTAG system-reset hack */ | ||
255 | out_be32(®s->fir_mode_reg, | ||
256 | in_be32(®s->fir_mode_reg) | | ||
257 | CBE_PMD_FIR_MODE_M8); | ||
258 | |||
259 | return 0; | ||
260 | } | ||
261 | device_initcall(cbe_sysreset_init); | ||
262 | |||
263 | int cbe_sysreset_hack(void) | ||
264 | { | ||
265 | struct cbe_pmd_regs __iomem *regs; | ||
266 | |||
267 | /* | ||
268 | * The BMC can inject user triggered system reset exceptions, | ||
269 | * but cannot set the system reset reason in srr1, | ||
270 | * so check an extra register here. | ||
271 | */ | ||
272 | if (sysreset_hack && (smp_processor_id() == 0)) { | ||
273 | regs = cbe_get_cpu_pmd_regs(0); | ||
274 | if (!regs) | ||
275 | return 0; | ||
276 | if (in_be64(®s->ras_esc_0) & 0x0000ffff) { | ||
277 | out_be64(®s->ras_esc_0, 0); | ||
278 | return 0; | ||
279 | } | ||
280 | } | ||
281 | return 1; | ||
282 | } | ||
283 | #endif /* CONFIG_PPC_IBM_CELL_RESETBUTTON */ | ||
284 | |||
239 | int __init cbe_ptcal_init(void) | 285 | int __init cbe_ptcal_init(void) |
240 | { | 286 | { |
241 | int ret; | 287 | int ret; |
diff --git a/arch/powerpc/platforms/cell/spu_base.c b/arch/powerpc/platforms/cell/spu_base.c index 78f905bc6a42..a5bdb89a17c3 100644 --- a/arch/powerpc/platforms/cell/spu_base.c +++ b/arch/powerpc/platforms/cell/spu_base.c | |||
@@ -703,7 +703,8 @@ static unsigned long long spu_acct_time(struct spu *spu, | |||
703 | } | 703 | } |
704 | 704 | ||
705 | 705 | ||
706 | static ssize_t spu_stat_show(struct sys_device *sysdev, char *buf) | 706 | static ssize_t spu_stat_show(struct sys_device *sysdev, |
707 | struct sysdev_attribute *attr, char *buf) | ||
707 | { | 708 | { |
708 | struct spu *spu = container_of(sysdev, struct spu, sysdev); | 709 | struct spu *spu = container_of(sysdev, struct spu, sysdev); |
709 | 710 | ||
diff --git a/arch/powerpc/platforms/chrp/pci.c b/arch/powerpc/platforms/chrp/pci.c index 609c46db4a1b..768c262b9368 100644 --- a/arch/powerpc/platforms/chrp/pci.c +++ b/arch/powerpc/platforms/chrp/pci.c | |||
@@ -367,7 +367,7 @@ static void chrp_pci_fixup_vt8231_ata(struct pci_dev *viaide) | |||
367 | viaisa = pci_get_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8231, NULL); | 367 | viaisa = pci_get_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8231, NULL); |
368 | if (!viaisa) | 368 | if (!viaisa) |
369 | return; | 369 | return; |
370 | printk("Fixing VIA IDE, force legacy mode on '%s'\n", viaide->dev.bus_id); | 370 | dev_info(&viaide->dev, "Fixing VIA IDE, force legacy mode on\n"); |
371 | 371 | ||
372 | pci_read_config_byte(viaide, PCI_CLASS_PROG, &progif); | 372 | pci_read_config_byte(viaide, PCI_CLASS_PROG, &progif); |
373 | pci_write_config_byte(viaide, PCI_CLASS_PROG, progif & ~0x5); | 373 | pci_write_config_byte(viaide, PCI_CLASS_PROG, progif & ~0x5); |
diff --git a/arch/powerpc/platforms/fsl_uli1575.c b/arch/powerpc/platforms/fsl_uli1575.c index afc9141be63e..ef74a0763ec1 100644 --- a/arch/powerpc/platforms/fsl_uli1575.c +++ b/arch/powerpc/platforms/fsl_uli1575.c | |||
@@ -51,15 +51,13 @@ u8 uli_pirq_to_irq[8] = { | |||
51 | ULI_8259_NONE, /* PIRQH */ | 51 | ULI_8259_NONE, /* PIRQH */ |
52 | }; | 52 | }; |
53 | 53 | ||
54 | /* set in board code if you want this quirks to do something */ | ||
55 | int uses_fsl_uli_m1575; | ||
56 | |||
57 | /* Bridge */ | 54 | /* Bridge */ |
58 | static void __devinit early_uli5249(struct pci_dev *dev) | 55 | static void __devinit early_uli5249(struct pci_dev *dev) |
59 | { | 56 | { |
60 | unsigned char temp; | 57 | unsigned char temp; |
61 | 58 | ||
62 | if (!uses_fsl_uli_m1575) | 59 | if (!machine_is(mpc86xx_hpcn) && !machine_is(mpc8544_ds) && |
60 | !machine_is(mpc8572_ds)) | ||
63 | return; | 61 | return; |
64 | 62 | ||
65 | pci_write_config_word(dev, PCI_COMMAND, PCI_COMMAND_IO | | 63 | pci_write_config_word(dev, PCI_COMMAND, PCI_COMMAND_IO | |
@@ -82,7 +80,8 @@ static void __devinit quirk_uli1575(struct pci_dev *dev) | |||
82 | { | 80 | { |
83 | int i; | 81 | int i; |
84 | 82 | ||
85 | if (!uses_fsl_uli_m1575) | 83 | if (!machine_is(mpc86xx_hpcn) && !machine_is(mpc8544_ds) && |
84 | !machine_is(mpc8572_ds)) | ||
86 | return; | 85 | return; |
87 | 86 | ||
88 | /* | 87 | /* |
@@ -150,7 +149,8 @@ static void __devinit quirk_final_uli1575(struct pci_dev *dev) | |||
150 | * IRQ 14: Edge | 149 | * IRQ 14: Edge |
151 | * IRQ 15: Edge | 150 | * IRQ 15: Edge |
152 | */ | 151 | */ |
153 | if (!uses_fsl_uli_m1575) | 152 | if (!machine_is(mpc86xx_hpcn) && !machine_is(mpc8544_ds) && |
153 | !machine_is(mpc8572_ds)) | ||
154 | return; | 154 | return; |
155 | 155 | ||
156 | outb(0xfa, 0x4d0); | 156 | outb(0xfa, 0x4d0); |
@@ -176,7 +176,8 @@ static void __devinit quirk_uli5288(struct pci_dev *dev) | |||
176 | unsigned char c; | 176 | unsigned char c; |
177 | unsigned int d; | 177 | unsigned int d; |
178 | 178 | ||
179 | if (!uses_fsl_uli_m1575) | 179 | if (!machine_is(mpc86xx_hpcn) && !machine_is(mpc8544_ds) && |
180 | !machine_is(mpc8572_ds)) | ||
180 | return; | 181 | return; |
181 | 182 | ||
182 | /* read/write lock */ | 183 | /* read/write lock */ |
@@ -200,7 +201,8 @@ static void __devinit quirk_uli5229(struct pci_dev *dev) | |||
200 | { | 201 | { |
201 | unsigned short temp; | 202 | unsigned short temp; |
202 | 203 | ||
203 | if (!uses_fsl_uli_m1575) | 204 | if (!machine_is(mpc86xx_hpcn) && !machine_is(mpc8544_ds) && |
205 | !machine_is(mpc8572_ds)) | ||
204 | return; | 206 | return; |
205 | 207 | ||
206 | pci_write_config_word(dev, PCI_COMMAND, PCI_COMMAND_INTX_DISABLE | | 208 | pci_write_config_word(dev, PCI_COMMAND, PCI_COMMAND_INTX_DISABLE | |
@@ -221,7 +223,7 @@ static void __devinit quirk_final_uli5249(struct pci_dev *dev) | |||
221 | for (i = 0; i < PCI_BUS_NUM_RESOURCES; i++) { | 223 | for (i = 0; i < PCI_BUS_NUM_RESOURCES; i++) { |
222 | if ((bus->resource[i]) && | 224 | if ((bus->resource[i]) && |
223 | (bus->resource[i]->flags & IORESOURCE_MEM)) { | 225 | (bus->resource[i]->flags & IORESOURCE_MEM)) { |
224 | dummy = ioremap(bus->resource[i]->start, 0x4); | 226 | dummy = ioremap(bus->resource[i]->end - 3, 0x4); |
225 | if (dummy) { | 227 | if (dummy) { |
226 | in_8(dummy); | 228 | in_8(dummy); |
227 | iounmap(dummy); | 229 | iounmap(dummy); |
@@ -238,6 +240,103 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x5229, quirk_uli5229); | |||
238 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AL, 0x5249, quirk_final_uli5249); | 240 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AL, 0x5249, quirk_final_uli5249); |
239 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AL, 0x1575, quirk_final_uli1575); | 241 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AL, 0x1575, quirk_final_uli1575); |
240 | 242 | ||
243 | static void __devinit hpcd_quirk_uli1575(struct pci_dev *dev) | ||
244 | { | ||
245 | u32 temp32; | ||
246 | |||
247 | if (!machine_is(mpc86xx_hpcd)) | ||
248 | return; | ||
249 | |||
250 | /* Disable INTx */ | ||
251 | pci_read_config_dword(dev, 0x48, &temp32); | ||
252 | pci_write_config_dword(dev, 0x48, (temp32 | 1<<26)); | ||
253 | |||
254 | /* Enable sideband interrupt */ | ||
255 | pci_read_config_dword(dev, 0x90, &temp32); | ||
256 | pci_write_config_dword(dev, 0x90, (temp32 | 1<<22)); | ||
257 | } | ||
258 | |||
259 | static void __devinit hpcd_quirk_uli5288(struct pci_dev *dev) | ||
260 | { | ||
261 | unsigned char c; | ||
262 | unsigned short temp; | ||
263 | |||
264 | if (!machine_is(mpc86xx_hpcd)) | ||
265 | return; | ||
266 | |||
267 | /* Interrupt Disable, Needed when SATA disabled */ | ||
268 | pci_read_config_word(dev, PCI_COMMAND, &temp); | ||
269 | temp |= 1<<10; | ||
270 | pci_write_config_word(dev, PCI_COMMAND, temp); | ||
271 | |||
272 | pci_read_config_byte(dev, 0x83, &c); | ||
273 | c |= 0x80; | ||
274 | pci_write_config_byte(dev, 0x83, c); | ||
275 | |||
276 | pci_write_config_byte(dev, PCI_CLASS_PROG, 0x01); | ||
277 | pci_write_config_byte(dev, PCI_CLASS_DEVICE, 0x06); | ||
278 | |||
279 | pci_read_config_byte(dev, 0x83, &c); | ||
280 | c &= 0x7f; | ||
281 | pci_write_config_byte(dev, 0x83, c); | ||
282 | } | ||
283 | |||
284 | /* | ||
285 | * Since 8259PIC was disabled on the board, the IDE device can not | ||
286 | * use the legacy IRQ, we need to let the IDE device work under | ||
287 | * native mode and use the interrupt line like other PCI devices. | ||
288 | * IRQ14 is a sideband interrupt from IDE device to CPU and we use this | ||
289 | * as the interrupt for IDE device. | ||
290 | */ | ||
291 | static void __devinit hpcd_quirk_uli5229(struct pci_dev *dev) | ||
292 | { | ||
293 | unsigned char c; | ||
294 | |||
295 | if (!machine_is(mpc86xx_hpcd)) | ||
296 | return; | ||
297 | |||
298 | pci_read_config_byte(dev, 0x4b, &c); | ||
299 | c |= 0x10; | ||
300 | pci_write_config_byte(dev, 0x4b, c); | ||
301 | } | ||
302 | |||
303 | /* | ||
304 | * SATA interrupt pin bug fix | ||
305 | * There's a chip bug for 5288, The interrupt pin should be 2, | ||
306 | * not the read only value 1, So it use INTB#, not INTA# which | ||
307 | * actually used by the IDE device 5229. | ||
308 | * As of this bug, during the PCI initialization, 5288 read the | ||
309 | * irq of IDE device from the device tree, this function fix this | ||
310 | * bug by re-assigning a correct irq to 5288. | ||
311 | * | ||
312 | */ | ||
313 | static void __devinit hpcd_final_uli5288(struct pci_dev *dev) | ||
314 | { | ||
315 | struct pci_controller *hose = pci_bus_to_host(dev->bus); | ||
316 | struct device_node *hosenode = hose ? hose->dn : NULL; | ||
317 | struct of_irq oirq; | ||
318 | int virq, pin = 2; | ||
319 | u32 laddr[3]; | ||
320 | |||
321 | if (!machine_is(mpc86xx_hpcd)) | ||
322 | return; | ||
323 | |||
324 | if (!hosenode) | ||
325 | return; | ||
326 | |||
327 | laddr[0] = (hose->first_busno << 16) | (PCI_DEVFN(31, 0) << 8); | ||
328 | laddr[1] = laddr[2] = 0; | ||
329 | of_irq_map_raw(hosenode, &pin, 1, laddr, &oirq); | ||
330 | virq = irq_create_of_mapping(oirq.controller, oirq.specifier, | ||
331 | oirq.size); | ||
332 | dev->irq = virq; | ||
333 | } | ||
334 | |||
335 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x1575, hpcd_quirk_uli1575); | ||
336 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x5288, hpcd_quirk_uli5288); | ||
337 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_AL, 0x5229, hpcd_quirk_uli5229); | ||
338 | DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AL, 0x5288, hpcd_final_uli5288); | ||
339 | |||
241 | int uli_exclude_device(struct pci_controller *hose, | 340 | int uli_exclude_device(struct pci_controller *hose, |
242 | u_char bus, u_char devfn) | 341 | u_char bus, u_char devfn) |
243 | { | 342 | { |
diff --git a/arch/powerpc/platforms/iseries/Kconfig b/arch/powerpc/platforms/iseries/Kconfig index 761d9e971fc4..ea3e541ac74f 100644 --- a/arch/powerpc/platforms/iseries/Kconfig +++ b/arch/powerpc/platforms/iseries/Kconfig | |||
@@ -2,6 +2,7 @@ config PPC_ISERIES | |||
2 | bool "IBM Legacy iSeries" | 2 | bool "IBM Legacy iSeries" |
3 | depends on PPC_MULTIPLATFORM && PPC64 | 3 | depends on PPC_MULTIPLATFORM && PPC64 |
4 | select PPC_INDIRECT_IO | 4 | select PPC_INDIRECT_IO |
5 | select PPC_PCI_CHOICE if EMBEDDED | ||
5 | 6 | ||
6 | menu "iSeries device drivers" | 7 | menu "iSeries device drivers" |
7 | depends on PPC_ISERIES | 8 | depends on PPC_ISERIES |
diff --git a/arch/powerpc/platforms/iseries/iommu.c b/arch/powerpc/platforms/iseries/iommu.c index ab5d8687c3cf..bc818e4e2033 100644 --- a/arch/powerpc/platforms/iseries/iommu.c +++ b/arch/powerpc/platforms/iseries/iommu.c | |||
@@ -42,7 +42,8 @@ | |||
42 | #include <asm/iseries/iommu.h> | 42 | #include <asm/iseries/iommu.h> |
43 | 43 | ||
44 | static void tce_build_iSeries(struct iommu_table *tbl, long index, long npages, | 44 | static void tce_build_iSeries(struct iommu_table *tbl, long index, long npages, |
45 | unsigned long uaddr, enum dma_data_direction direction) | 45 | unsigned long uaddr, enum dma_data_direction direction, |
46 | struct dma_attrs *attrs) | ||
46 | { | 47 | { |
47 | u64 rc; | 48 | u64 rc; |
48 | u64 tce, rpn; | 49 | u64 tce, rpn; |
diff --git a/arch/powerpc/platforms/pasemi/iommu.c b/arch/powerpc/platforms/pasemi/iommu.c index 86967bdd8774..70541b7a5013 100644 --- a/arch/powerpc/platforms/pasemi/iommu.c +++ b/arch/powerpc/platforms/pasemi/iommu.c | |||
@@ -85,7 +85,8 @@ static int iommu_table_iobmap_inited; | |||
85 | 85 | ||
86 | static void iobmap_build(struct iommu_table *tbl, long index, | 86 | static void iobmap_build(struct iommu_table *tbl, long index, |
87 | long npages, unsigned long uaddr, | 87 | long npages, unsigned long uaddr, |
88 | enum dma_data_direction direction) | 88 | enum dma_data_direction direction, |
89 | struct dma_attrs *attrs) | ||
89 | { | 90 | { |
90 | u32 *ip; | 91 | u32 *ip; |
91 | u32 rpn; | 92 | u32 rpn; |
diff --git a/arch/powerpc/platforms/ps3/Kconfig b/arch/powerpc/platforms/ps3/Kconfig index a5f4e95dfc3d..920cf7a454b1 100644 --- a/arch/powerpc/platforms/ps3/Kconfig +++ b/arch/powerpc/platforms/ps3/Kconfig | |||
@@ -8,6 +8,7 @@ config PPC_PS3 | |||
8 | select USB_ARCH_HAS_EHCI | 8 | select USB_ARCH_HAS_EHCI |
9 | select USB_EHCI_BIG_ENDIAN_MMIO | 9 | select USB_EHCI_BIG_ENDIAN_MMIO |
10 | select MEMORY_HOTPLUG | 10 | select MEMORY_HOTPLUG |
11 | select PPC_PCI_CHOICE | ||
11 | help | 12 | help |
12 | This option enables support for the Sony PS3 game console | 13 | This option enables support for the Sony PS3 game console |
13 | and other platforms using the PS3 hypervisor. Enabling this | 14 | and other platforms using the PS3 hypervisor. Enabling this |
diff --git a/arch/powerpc/platforms/ps3/device-init.c b/arch/powerpc/platforms/ps3/device-init.c index 3866debfa3c4..ffdd8e963fbd 100644 --- a/arch/powerpc/platforms/ps3/device-init.c +++ b/arch/powerpc/platforms/ps3/device-init.c | |||
@@ -486,6 +486,7 @@ static int __init ps3_register_graphics_devices(void) | |||
486 | return -ENOMEM; | 486 | return -ENOMEM; |
487 | 487 | ||
488 | p->dev.match_id = PS3_MATCH_ID_GRAPHICS; | 488 | p->dev.match_id = PS3_MATCH_ID_GRAPHICS; |
489 | p->dev.match_sub_id = PS3_MATCH_SUB_ID_FB; | ||
489 | p->dev.dev_type = PS3_DEVICE_TYPE_IOC0; | 490 | p->dev.dev_type = PS3_DEVICE_TYPE_IOC0; |
490 | 491 | ||
491 | result = ps3_system_bus_device_register(&p->dev); | 492 | result = ps3_system_bus_device_register(&p->dev); |
diff --git a/arch/powerpc/platforms/ps3/system-bus.c b/arch/powerpc/platforms/ps3/system-bus.c index d66c3628a112..280ee88cb0b0 100644 --- a/arch/powerpc/platforms/ps3/system-bus.c +++ b/arch/powerpc/platforms/ps3/system-bus.c | |||
@@ -347,16 +347,23 @@ static int ps3_system_bus_match(struct device *_dev, | |||
347 | struct ps3_system_bus_driver *drv = ps3_drv_to_system_bus_drv(_drv); | 347 | struct ps3_system_bus_driver *drv = ps3_drv_to_system_bus_drv(_drv); |
348 | struct ps3_system_bus_device *dev = ps3_dev_to_system_bus_dev(_dev); | 348 | struct ps3_system_bus_device *dev = ps3_dev_to_system_bus_dev(_dev); |
349 | 349 | ||
350 | result = dev->match_id == drv->match_id; | 350 | if (!dev->match_sub_id) |
351 | result = dev->match_id == drv->match_id; | ||
352 | else | ||
353 | result = dev->match_sub_id == drv->match_sub_id && | ||
354 | dev->match_id == drv->match_id; | ||
351 | 355 | ||
352 | if (result) | 356 | if (result) |
353 | pr_info("%s:%d: dev=%u(%s), drv=%u(%s): match\n", __func__, | 357 | pr_info("%s:%d: dev=%u.%u(%s), drv=%u.%u(%s): match\n", |
354 | __LINE__, dev->match_id, dev->core.bus_id, | 358 | __func__, __LINE__, |
355 | drv->match_id, drv->core.name); | 359 | dev->match_id, dev->match_sub_id, dev->core.bus_id, |
360 | drv->match_id, drv->match_sub_id, drv->core.name); | ||
356 | else | 361 | else |
357 | pr_debug("%s:%d: dev=%u(%s), drv=%u(%s): miss\n", __func__, | 362 | pr_debug("%s:%d: dev=%u.%u(%s), drv=%u.%u(%s): miss\n", |
358 | __LINE__, dev->match_id, dev->core.bus_id, | 363 | __func__, __LINE__, |
359 | drv->match_id, drv->core.name); | 364 | dev->match_id, dev->match_sub_id, dev->core.bus_id, |
365 | drv->match_id, drv->match_sub_id, drv->core.name); | ||
366 | |||
360 | return result; | 367 | return result; |
361 | } | 368 | } |
362 | 369 | ||
diff --git a/arch/powerpc/platforms/pseries/Kconfig b/arch/powerpc/platforms/pseries/Kconfig index 07fe5b69b9e2..757c0296e0b8 100644 --- a/arch/powerpc/platforms/pseries/Kconfig +++ b/arch/powerpc/platforms/pseries/Kconfig | |||
@@ -7,6 +7,7 @@ config PPC_PSERIES | |||
7 | select RTAS_ERROR_LOGGING | 7 | select RTAS_ERROR_LOGGING |
8 | select PPC_UDBG_16550 | 8 | select PPC_UDBG_16550 |
9 | select PPC_NATIVE | 9 | select PPC_NATIVE |
10 | select PPC_PCI_CHOICE if EMBEDDED | ||
10 | default y | 11 | default y |
11 | 12 | ||
12 | config PPC_SPLPAR | 13 | config PPC_SPLPAR |
diff --git a/arch/powerpc/platforms/pseries/eeh.c b/arch/powerpc/platforms/pseries/eeh.c index c027f0a70a04..54816d75b578 100644 --- a/arch/powerpc/platforms/pseries/eeh.c +++ b/arch/powerpc/platforms/pseries/eeh.c | |||
@@ -75,9 +75,9 @@ | |||
75 | */ | 75 | */ |
76 | 76 | ||
77 | /* If a device driver keeps reading an MMIO register in an interrupt | 77 | /* If a device driver keeps reading an MMIO register in an interrupt |
78 | * handler after a slot isolation event has occurred, we assume it | 78 | * handler after a slot isolation event, it might be broken. |
79 | * is broken and panic. This sets the threshold for how many read | 79 | * This sets the threshold for how many read attempts we allow |
80 | * attempts we allow before panicking. | 80 | * before printing an error message. |
81 | */ | 81 | */ |
82 | #define EEH_MAX_FAILS 2100000 | 82 | #define EEH_MAX_FAILS 2100000 |
83 | 83 | ||
@@ -470,6 +470,7 @@ int eeh_dn_check_failure(struct device_node *dn, struct pci_dev *dev) | |||
470 | unsigned long flags; | 470 | unsigned long flags; |
471 | struct pci_dn *pdn; | 471 | struct pci_dn *pdn; |
472 | int rc = 0; | 472 | int rc = 0; |
473 | const char *location; | ||
473 | 474 | ||
474 | total_mmio_ffs++; | 475 | total_mmio_ffs++; |
475 | 476 | ||
@@ -509,18 +510,15 @@ int eeh_dn_check_failure(struct device_node *dn, struct pci_dev *dev) | |||
509 | rc = 1; | 510 | rc = 1; |
510 | if (pdn->eeh_mode & EEH_MODE_ISOLATED) { | 511 | if (pdn->eeh_mode & EEH_MODE_ISOLATED) { |
511 | pdn->eeh_check_count ++; | 512 | pdn->eeh_check_count ++; |
512 | if (pdn->eeh_check_count >= EEH_MAX_FAILS) { | 513 | if (pdn->eeh_check_count % EEH_MAX_FAILS == 0) { |
513 | printk (KERN_ERR "EEH: Device driver ignored %d bad reads, panicing\n", | 514 | location = of_get_property(dn, "ibm,loc-code", NULL); |
514 | pdn->eeh_check_count); | 515 | printk (KERN_ERR "EEH: %d reads ignored for recovering device at " |
516 | "location=%s driver=%s pci addr=%s\n", | ||
517 | pdn->eeh_check_count, location, | ||
518 | dev->driver->name, pci_name(dev)); | ||
519 | printk (KERN_ERR "EEH: Might be infinite loop in %s driver\n", | ||
520 | dev->driver->name); | ||
515 | dump_stack(); | 521 | dump_stack(); |
516 | msleep(5000); | ||
517 | |||
518 | /* re-read the slot reset state */ | ||
519 | if (read_slot_reset_state(pdn, rets) != 0) | ||
520 | rets[0] = -1; /* reset state unknown */ | ||
521 | |||
522 | /* If we are here, then we hit an infinite loop. Stop. */ | ||
523 | panic("EEH: MMIO halt (%d) on device:%s\n", rets[0], pci_name(dev)); | ||
524 | } | 522 | } |
525 | goto dn_unlock; | 523 | goto dn_unlock; |
526 | } | 524 | } |
diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c index 9a12908510fb..5377dd4b849a 100644 --- a/arch/powerpc/platforms/pseries/iommu.c +++ b/arch/powerpc/platforms/pseries/iommu.c | |||
@@ -50,7 +50,8 @@ | |||
50 | 50 | ||
51 | static void tce_build_pSeries(struct iommu_table *tbl, long index, | 51 | static void tce_build_pSeries(struct iommu_table *tbl, long index, |
52 | long npages, unsigned long uaddr, | 52 | long npages, unsigned long uaddr, |
53 | enum dma_data_direction direction) | 53 | enum dma_data_direction direction, |
54 | struct dma_attrs *attrs) | ||
54 | { | 55 | { |
55 | u64 proto_tce; | 56 | u64 proto_tce; |
56 | u64 *tcep; | 57 | u64 *tcep; |
@@ -95,7 +96,8 @@ static unsigned long tce_get_pseries(struct iommu_table *tbl, long index) | |||
95 | 96 | ||
96 | static void tce_build_pSeriesLP(struct iommu_table *tbl, long tcenum, | 97 | static void tce_build_pSeriesLP(struct iommu_table *tbl, long tcenum, |
97 | long npages, unsigned long uaddr, | 98 | long npages, unsigned long uaddr, |
98 | enum dma_data_direction direction) | 99 | enum dma_data_direction direction, |
100 | struct dma_attrs *attrs) | ||
99 | { | 101 | { |
100 | u64 rc; | 102 | u64 rc; |
101 | u64 proto_tce, tce; | 103 | u64 proto_tce, tce; |
@@ -127,7 +129,8 @@ static DEFINE_PER_CPU(u64 *, tce_page) = NULL; | |||
127 | 129 | ||
128 | static void tce_buildmulti_pSeriesLP(struct iommu_table *tbl, long tcenum, | 130 | static void tce_buildmulti_pSeriesLP(struct iommu_table *tbl, long tcenum, |
129 | long npages, unsigned long uaddr, | 131 | long npages, unsigned long uaddr, |
130 | enum dma_data_direction direction) | 132 | enum dma_data_direction direction, |
133 | struct dma_attrs *attrs) | ||
131 | { | 134 | { |
132 | u64 rc; | 135 | u64 rc; |
133 | u64 proto_tce; | 136 | u64 proto_tce; |
@@ -136,7 +139,8 @@ static void tce_buildmulti_pSeriesLP(struct iommu_table *tbl, long tcenum, | |||
136 | long l, limit; | 139 | long l, limit; |
137 | 140 | ||
138 | if (npages == 1) { | 141 | if (npages == 1) { |
139 | tce_build_pSeriesLP(tbl, tcenum, npages, uaddr, direction); | 142 | tce_build_pSeriesLP(tbl, tcenum, npages, uaddr, |
143 | direction, attrs); | ||
140 | return; | 144 | return; |
141 | } | 145 | } |
142 | 146 | ||
@@ -150,7 +154,7 @@ static void tce_buildmulti_pSeriesLP(struct iommu_table *tbl, long tcenum, | |||
150 | /* If allocation fails, fall back to the loop implementation */ | 154 | /* If allocation fails, fall back to the loop implementation */ |
151 | if (!tcep) { | 155 | if (!tcep) { |
152 | tce_build_pSeriesLP(tbl, tcenum, npages, uaddr, | 156 | tce_build_pSeriesLP(tbl, tcenum, npages, uaddr, |
153 | direction); | 157 | direction, attrs); |
154 | return; | 158 | return; |
155 | } | 159 | } |
156 | __get_cpu_var(tce_page) = tcep; | 160 | __get_cpu_var(tce_page) = tcep; |
diff --git a/arch/powerpc/sysdev/axonram.c b/arch/powerpc/sysdev/axonram.c index 7f59188cd9a1..9e105cbc5e5f 100644 --- a/arch/powerpc/sysdev/axonram.c +++ b/arch/powerpc/sysdev/axonram.c | |||
@@ -57,6 +57,8 @@ | |||
57 | #define AXON_RAM_SECTOR_SIZE 1 << AXON_RAM_SECTOR_SHIFT | 57 | #define AXON_RAM_SECTOR_SIZE 1 << AXON_RAM_SECTOR_SHIFT |
58 | #define AXON_RAM_IRQ_FLAGS IRQF_SHARED | IRQF_TRIGGER_RISING | 58 | #define AXON_RAM_IRQ_FLAGS IRQF_SHARED | IRQF_TRIGGER_RISING |
59 | 59 | ||
60 | static int azfs_major, azfs_minor; | ||
61 | |||
60 | struct axon_ram_bank { | 62 | struct axon_ram_bank { |
61 | struct of_device *device; | 63 | struct of_device *device; |
62 | struct gendisk *disk; | 64 | struct gendisk *disk; |
@@ -148,7 +150,10 @@ axon_ram_direct_access(struct block_device *device, sector_t sector, | |||
148 | struct axon_ram_bank *bank = device->bd_disk->private_data; | 150 | struct axon_ram_bank *bank = device->bd_disk->private_data; |
149 | loff_t offset; | 151 | loff_t offset; |
150 | 152 | ||
151 | offset = sector << AXON_RAM_SECTOR_SHIFT; | 153 | offset = sector; |
154 | if (device->bd_part != NULL) | ||
155 | offset += device->bd_part->start_sect; | ||
156 | offset <<= AXON_RAM_SECTOR_SHIFT; | ||
152 | if (offset >= bank->size) { | 157 | if (offset >= bank->size) { |
153 | dev_err(&bank->device->dev, "Access outside of address space\n"); | 158 | dev_err(&bank->device->dev, "Access outside of address space\n"); |
154 | return -ERANGE; | 159 | return -ERANGE; |
@@ -227,19 +232,14 @@ axon_ram_probe(struct of_device *device, const struct of_device_id *device_id) | |||
227 | goto failed; | 232 | goto failed; |
228 | } | 233 | } |
229 | 234 | ||
230 | bank->disk->first_minor = 0; | 235 | bank->disk->major = azfs_major; |
236 | bank->disk->first_minor = azfs_minor; | ||
231 | bank->disk->fops = &axon_ram_devops; | 237 | bank->disk->fops = &axon_ram_devops; |
232 | bank->disk->private_data = bank; | 238 | bank->disk->private_data = bank; |
233 | bank->disk->driverfs_dev = &device->dev; | 239 | bank->disk->driverfs_dev = &device->dev; |
234 | 240 | ||
235 | sprintf(bank->disk->disk_name, "%s%d", | 241 | sprintf(bank->disk->disk_name, "%s%d", |
236 | AXON_RAM_DEVICE_NAME, axon_ram_bank_id); | 242 | AXON_RAM_DEVICE_NAME, axon_ram_bank_id); |
237 | bank->disk->major = register_blkdev(0, bank->disk->disk_name); | ||
238 | if (bank->disk->major < 0) { | ||
239 | dev_err(&device->dev, "Cannot register block device\n"); | ||
240 | rc = -EFAULT; | ||
241 | goto failed; | ||
242 | } | ||
243 | 243 | ||
244 | bank->disk->queue = blk_alloc_queue(GFP_KERNEL); | 244 | bank->disk->queue = blk_alloc_queue(GFP_KERNEL); |
245 | if (bank->disk->queue == NULL) { | 245 | if (bank->disk->queue == NULL) { |
@@ -276,6 +276,8 @@ axon_ram_probe(struct of_device *device, const struct of_device_id *device_id) | |||
276 | goto failed; | 276 | goto failed; |
277 | } | 277 | } |
278 | 278 | ||
279 | azfs_minor += bank->disk->minors; | ||
280 | |||
279 | return 0; | 281 | return 0; |
280 | 282 | ||
281 | failed: | 283 | failed: |
@@ -310,7 +312,6 @@ axon_ram_remove(struct of_device *device) | |||
310 | 312 | ||
311 | device_remove_file(&device->dev, &dev_attr_ecc); | 313 | device_remove_file(&device->dev, &dev_attr_ecc); |
312 | free_irq(bank->irq_id, device); | 314 | free_irq(bank->irq_id, device); |
313 | unregister_blkdev(bank->disk->major, bank->disk->disk_name); | ||
314 | del_gendisk(bank->disk); | 315 | del_gendisk(bank->disk); |
315 | iounmap((void __iomem *) bank->io_addr); | 316 | iounmap((void __iomem *) bank->io_addr); |
316 | kfree(bank); | 317 | kfree(bank); |
@@ -341,6 +342,14 @@ static struct of_platform_driver axon_ram_driver = { | |||
341 | static int __init | 342 | static int __init |
342 | axon_ram_init(void) | 343 | axon_ram_init(void) |
343 | { | 344 | { |
345 | azfs_major = register_blkdev(azfs_major, AXON_RAM_DEVICE_NAME); | ||
346 | if (azfs_major < 0) { | ||
347 | printk(KERN_ERR "%s cannot become block device major number\n", | ||
348 | AXON_RAM_MODULE_NAME); | ||
349 | return -EFAULT; | ||
350 | } | ||
351 | azfs_minor = 0; | ||
352 | |||
344 | return of_register_platform_driver(&axon_ram_driver); | 353 | return of_register_platform_driver(&axon_ram_driver); |
345 | } | 354 | } |
346 | 355 | ||
@@ -351,6 +360,7 @@ static void __exit | |||
351 | axon_ram_exit(void) | 360 | axon_ram_exit(void) |
352 | { | 361 | { |
353 | of_unregister_platform_driver(&axon_ram_driver); | 362 | of_unregister_platform_driver(&axon_ram_driver); |
363 | unregister_blkdev(azfs_major, AXON_RAM_DEVICE_NAME); | ||
354 | } | 364 | } |
355 | 365 | ||
356 | module_init(axon_ram_init); | 366 | module_init(axon_ram_init); |
diff --git a/arch/powerpc/sysdev/dart_iommu.c b/arch/powerpc/sysdev/dart_iommu.c index 005c2ecf976f..de8c8b542cfa 100644 --- a/arch/powerpc/sysdev/dart_iommu.c +++ b/arch/powerpc/sysdev/dart_iommu.c | |||
@@ -149,7 +149,8 @@ static void dart_flush(struct iommu_table *tbl) | |||
149 | 149 | ||
150 | static void dart_build(struct iommu_table *tbl, long index, | 150 | static void dart_build(struct iommu_table *tbl, long index, |
151 | long npages, unsigned long uaddr, | 151 | long npages, unsigned long uaddr, |
152 | enum dma_data_direction direction) | 152 | enum dma_data_direction direction, |
153 | struct dma_attrs *attrs) | ||
153 | { | 154 | { |
154 | unsigned int *dp; | 155 | unsigned int *dp; |
155 | unsigned int rpn; | 156 | unsigned int rpn; |
diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c index 87b0aa13ab48..61e6d77efa4f 100644 --- a/arch/powerpc/sysdev/fsl_pci.c +++ b/arch/powerpc/sysdev/fsl_pci.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <sysdev/fsl_soc.h> | 27 | #include <sysdev/fsl_soc.h> |
28 | #include <sysdev/fsl_pci.h> | 28 | #include <sysdev/fsl_pci.h> |
29 | 29 | ||
30 | #if defined(CONFIG_PPC_85xx) || defined(CONFIG_PPC_86xx) | ||
30 | /* atmu setup for fsl pci/pcie controller */ | 31 | /* atmu setup for fsl pci/pcie controller */ |
31 | void __init setup_pci_atmu(struct pci_controller *hose, struct resource *rsrc) | 32 | void __init setup_pci_atmu(struct pci_controller *hose, struct resource *rsrc) |
32 | { | 33 | { |
@@ -248,3 +249,63 @@ DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8536, quirk_fsl_pcie_header); | |||
248 | DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8641, quirk_fsl_pcie_header); | 249 | DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8641, quirk_fsl_pcie_header); |
249 | DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8641D, quirk_fsl_pcie_header); | 250 | DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8641D, quirk_fsl_pcie_header); |
250 | DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8610, quirk_fsl_pcie_header); | 251 | DECLARE_PCI_FIXUP_HEADER(0x1957, PCI_DEVICE_ID_MPC8610, quirk_fsl_pcie_header); |
252 | #endif /* CONFIG_PPC_85xx || CONFIG_PPC_86xx */ | ||
253 | |||
254 | #if defined(CONFIG_PPC_83xx) | ||
255 | int __init mpc83xx_add_bridge(struct device_node *dev) | ||
256 | { | ||
257 | int len; | ||
258 | struct pci_controller *hose; | ||
259 | struct resource rsrc; | ||
260 | const int *bus_range; | ||
261 | int primary = 1, has_address = 0; | ||
262 | phys_addr_t immr = get_immrbase(); | ||
263 | |||
264 | pr_debug("Adding PCI host bridge %s\n", dev->full_name); | ||
265 | |||
266 | /* Fetch host bridge registers address */ | ||
267 | has_address = (of_address_to_resource(dev, 0, &rsrc) == 0); | ||
268 | |||
269 | /* Get bus range if any */ | ||
270 | bus_range = of_get_property(dev, "bus-range", &len); | ||
271 | if (bus_range == NULL || len < 2 * sizeof(int)) { | ||
272 | printk(KERN_WARNING "Can't get bus-range for %s, assume" | ||
273 | " bus 0\n", dev->full_name); | ||
274 | } | ||
275 | |||
276 | ppc_pci_flags |= PPC_PCI_REASSIGN_ALL_BUS; | ||
277 | hose = pcibios_alloc_controller(dev); | ||
278 | if (!hose) | ||
279 | return -ENOMEM; | ||
280 | |||
281 | hose->first_busno = bus_range ? bus_range[0] : 0; | ||
282 | hose->last_busno = bus_range ? bus_range[1] : 0xff; | ||
283 | |||
284 | /* MPC83xx supports up to two host controllers one at 0x8500 from immrbar | ||
285 | * the other at 0x8600, we consider the 0x8500 the primary controller | ||
286 | */ | ||
287 | /* PCI 1 */ | ||
288 | if ((rsrc.start & 0xfffff) == 0x8500) { | ||
289 | setup_indirect_pci(hose, immr + 0x8300, immr + 0x8304, 0); | ||
290 | } | ||
291 | /* PCI 2 */ | ||
292 | if ((rsrc.start & 0xfffff) == 0x8600) { | ||
293 | setup_indirect_pci(hose, immr + 0x8380, immr + 0x8384, 0); | ||
294 | primary = 0; | ||
295 | } | ||
296 | |||
297 | printk(KERN_INFO "Found MPC83xx PCI host bridge at 0x%016llx. " | ||
298 | "Firmware bus number: %d->%d\n", | ||
299 | (unsigned long long)rsrc.start, hose->first_busno, | ||
300 | hose->last_busno); | ||
301 | |||
302 | pr_debug(" ->Hose at 0x%p, cfg_addr=0x%p,cfg_data=0x%p\n", | ||
303 | hose, hose->cfg_addr, hose->cfg_data); | ||
304 | |||
305 | /* Interpret the "ranges" property */ | ||
306 | /* This also maps the I/O region and sets isa_io/mem_base */ | ||
307 | pci_process_bridge_OF_ranges(hose, dev, primary); | ||
308 | |||
309 | return 0; | ||
310 | } | ||
311 | #endif /* CONFIG_PPC_83xx */ | ||
diff --git a/arch/powerpc/sysdev/fsl_pci.h b/arch/powerpc/sysdev/fsl_pci.h index 37b04ad26571..13f30c2a61e7 100644 --- a/arch/powerpc/sysdev/fsl_pci.h +++ b/arch/powerpc/sysdev/fsl_pci.h | |||
@@ -83,6 +83,7 @@ struct ccsr_pci { | |||
83 | 83 | ||
84 | extern int fsl_add_bridge(struct device_node *dev, int is_primary); | 84 | extern int fsl_add_bridge(struct device_node *dev, int is_primary); |
85 | extern void fsl_pcibios_fixup_bus(struct pci_bus *bus); | 85 | extern void fsl_pcibios_fixup_bus(struct pci_bus *bus); |
86 | extern int mpc83xx_add_bridge(struct device_node *dev); | ||
86 | 87 | ||
87 | #endif /* __POWERPC_FSL_PCI_H */ | 88 | #endif /* __POWERPC_FSL_PCI_H */ |
88 | #endif /* __KERNEL__ */ | 89 | #endif /* __KERNEL__ */ |
diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/fsl_soc.c index ebcec7362f95..214388e11807 100644 --- a/arch/powerpc/sysdev/fsl_soc.c +++ b/arch/powerpc/sysdev/fsl_soc.c | |||
@@ -207,66 +207,58 @@ static int __init of_add_fixed_phys(void) | |||
207 | arch_initcall(of_add_fixed_phys); | 207 | arch_initcall(of_add_fixed_phys); |
208 | #endif /* CONFIG_FIXED_PHY */ | 208 | #endif /* CONFIG_FIXED_PHY */ |
209 | 209 | ||
210 | static int __init gfar_mdio_of_init(void) | 210 | static int gfar_mdio_of_init_one(struct device_node *np) |
211 | { | 211 | { |
212 | struct device_node *np = NULL; | 212 | int k; |
213 | struct device_node *child = NULL; | ||
214 | struct gianfar_mdio_data mdio_data; | ||
213 | struct platform_device *mdio_dev; | 215 | struct platform_device *mdio_dev; |
214 | struct resource res; | 216 | struct resource res; |
215 | int ret; | 217 | int ret; |
216 | 218 | ||
217 | np = of_find_compatible_node(np, NULL, "fsl,gianfar-mdio"); | 219 | memset(&res, 0, sizeof(res)); |
220 | memset(&mdio_data, 0, sizeof(mdio_data)); | ||
218 | 221 | ||
219 | /* try the deprecated version */ | 222 | ret = of_address_to_resource(np, 0, &res); |
220 | if (!np) | 223 | if (ret) |
221 | np = of_find_compatible_node(np, "mdio", "gianfar"); | 224 | return ret; |
222 | 225 | ||
223 | if (np) { | 226 | mdio_dev = platform_device_register_simple("fsl-gianfar_mdio", |
224 | int k; | 227 | res.start&0xfffff, &res, 1); |
225 | struct device_node *child = NULL; | 228 | if (IS_ERR(mdio_dev)) |
226 | struct gianfar_mdio_data mdio_data; | 229 | return PTR_ERR(mdio_dev); |
227 | 230 | ||
228 | memset(&res, 0, sizeof(res)); | 231 | for (k = 0; k < 32; k++) |
229 | memset(&mdio_data, 0, sizeof(mdio_data)); | 232 | mdio_data.irq[k] = PHY_POLL; |
230 | 233 | ||
231 | ret = of_address_to_resource(np, 0, &res); | 234 | while ((child = of_get_next_child(np, child)) != NULL) { |
232 | if (ret) | 235 | int irq = irq_of_parse_and_map(child, 0); |
233 | goto err; | 236 | if (irq != NO_IRQ) { |
234 | 237 | const u32 *id = of_get_property(child, "reg", NULL); | |
235 | mdio_dev = | 238 | mdio_data.irq[*id] = irq; |
236 | platform_device_register_simple("fsl-gianfar_mdio", | ||
237 | res.start, &res, 1); | ||
238 | if (IS_ERR(mdio_dev)) { | ||
239 | ret = PTR_ERR(mdio_dev); | ||
240 | goto err; | ||
241 | } | 239 | } |
240 | } | ||
242 | 241 | ||
243 | for (k = 0; k < 32; k++) | 242 | ret = platform_device_add_data(mdio_dev, &mdio_data, |
244 | mdio_data.irq[k] = PHY_POLL; | 243 | sizeof(struct gianfar_mdio_data)); |
244 | if (ret) | ||
245 | platform_device_unregister(mdio_dev); | ||
245 | 246 | ||
246 | while ((child = of_get_next_child(np, child)) != NULL) { | 247 | return ret; |
247 | int irq = irq_of_parse_and_map(child, 0); | 248 | } |
248 | if (irq != NO_IRQ) { | ||
249 | const u32 *id = of_get_property(child, | ||
250 | "reg", NULL); | ||
251 | mdio_data.irq[*id] = irq; | ||
252 | } | ||
253 | } | ||
254 | 249 | ||
255 | ret = | 250 | static int __init gfar_mdio_of_init(void) |
256 | platform_device_add_data(mdio_dev, &mdio_data, | 251 | { |
257 | sizeof(struct gianfar_mdio_data)); | 252 | struct device_node *np = NULL; |
258 | if (ret) | ||
259 | goto unreg; | ||
260 | } | ||
261 | 253 | ||
262 | of_node_put(np); | 254 | for_each_compatible_node(np, NULL, "fsl,gianfar-mdio") |
263 | return 0; | 255 | gfar_mdio_of_init_one(np); |
264 | 256 | ||
265 | unreg: | 257 | /* try the deprecated version */ |
266 | platform_device_unregister(mdio_dev); | 258 | for_each_compatible_node(np, "mdio", "gianfar"); |
267 | err: | 259 | gfar_mdio_of_init_one(np); |
268 | of_node_put(np); | 260 | |
269 | return ret; | 261 | return 0; |
270 | } | 262 | } |
271 | 263 | ||
272 | arch_initcall(gfar_mdio_of_init); | 264 | arch_initcall(gfar_mdio_of_init); |
@@ -296,6 +288,9 @@ static int __init gfar_of_init(void) | |||
296 | const phandle *ph; | 288 | const phandle *ph; |
297 | int n_res = 2; | 289 | int n_res = 2; |
298 | 290 | ||
291 | if (!of_device_is_available(np)) | ||
292 | continue; | ||
293 | |||
299 | memset(r, 0, sizeof(r)); | 294 | memset(r, 0, sizeof(r)); |
300 | memset(&gfar_data, 0, sizeof(gfar_data)); | 295 | memset(&gfar_data, 0, sizeof(gfar_data)); |
301 | 296 | ||
@@ -357,6 +352,9 @@ static int __init gfar_of_init(void) | |||
357 | else | 352 | else |
358 | gfar_data.interface = PHY_INTERFACE_MODE_MII; | 353 | gfar_data.interface = PHY_INTERFACE_MODE_MII; |
359 | 354 | ||
355 | if (of_get_property(np, "fsl,magic-packet", NULL)) | ||
356 | gfar_data.device_flags |= FSL_GIANFAR_DEV_HAS_MAGIC_PACKET; | ||
357 | |||
360 | ph = of_get_property(np, "phy-handle", NULL); | 358 | ph = of_get_property(np, "phy-handle", NULL); |
361 | if (ph == NULL) { | 359 | if (ph == NULL) { |
362 | u32 *fixed_link; | 360 | u32 *fixed_link; |
@@ -390,7 +388,7 @@ static int __init gfar_of_init(void) | |||
390 | 388 | ||
391 | gfar_data.phy_id = *id; | 389 | gfar_data.phy_id = *id; |
392 | snprintf(gfar_data.bus_id, MII_BUS_ID_SIZE, "%llx", | 390 | snprintf(gfar_data.bus_id, MII_BUS_ID_SIZE, "%llx", |
393 | (unsigned long long)res.start); | 391 | (unsigned long long)res.start&0xfffff); |
394 | 392 | ||
395 | of_node_put(phy); | 393 | of_node_put(phy); |
396 | of_node_put(mdio); | 394 | of_node_put(mdio); |
diff --git a/arch/powerpc/sysdev/fsl_soc.h b/arch/powerpc/sysdev/fsl_soc.h index 52c831fa1886..024299887352 100644 --- a/arch/powerpc/sysdev/fsl_soc.h +++ b/arch/powerpc/sysdev/fsl_soc.h | |||
@@ -10,6 +10,7 @@ extern u32 get_baudrate(void); | |||
10 | extern u32 fsl_get_sys_freq(void); | 10 | extern u32 fsl_get_sys_freq(void); |
11 | 11 | ||
12 | struct spi_board_info; | 12 | struct spi_board_info; |
13 | struct device_node; | ||
13 | 14 | ||
14 | extern int fsl_spi_init(struct spi_board_info *board_infos, | 15 | extern int fsl_spi_init(struct spi_board_info *board_infos, |
15 | unsigned int num_board_infos, | 16 | unsigned int num_board_infos, |
diff --git a/arch/powerpc/sysdev/ipic.c b/arch/powerpc/sysdev/ipic.c index caba1c0be5a7..88a983ece5c9 100644 --- a/arch/powerpc/sysdev/ipic.c +++ b/arch/powerpc/sysdev/ipic.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/device.h> | 22 | #include <linux/device.h> |
23 | #include <linux/bootmem.h> | 23 | #include <linux/bootmem.h> |
24 | #include <linux/spinlock.h> | 24 | #include <linux/spinlock.h> |
25 | #include <linux/fsl_devices.h> | ||
25 | #include <asm/irq.h> | 26 | #include <asm/irq.h> |
26 | #include <asm/io.h> | 27 | #include <asm/io.h> |
27 | #include <asm/prom.h> | 28 | #include <asm/prom.h> |
@@ -889,8 +890,78 @@ unsigned int ipic_get_irq(void) | |||
889 | return irq_linear_revmap(primary_ipic->irqhost, irq); | 890 | return irq_linear_revmap(primary_ipic->irqhost, irq); |
890 | } | 891 | } |
891 | 892 | ||
893 | #ifdef CONFIG_PM | ||
894 | static struct { | ||
895 | u32 sicfr; | ||
896 | u32 siprr[2]; | ||
897 | u32 simsr[2]; | ||
898 | u32 sicnr; | ||
899 | u32 smprr[2]; | ||
900 | u32 semsr; | ||
901 | u32 secnr; | ||
902 | u32 sermr; | ||
903 | u32 sercr; | ||
904 | } ipic_saved_state; | ||
905 | |||
906 | static int ipic_suspend(struct sys_device *sdev, pm_message_t state) | ||
907 | { | ||
908 | struct ipic *ipic = primary_ipic; | ||
909 | |||
910 | ipic_saved_state.sicfr = ipic_read(ipic->regs, IPIC_SICFR); | ||
911 | ipic_saved_state.siprr[0] = ipic_read(ipic->regs, IPIC_SIPRR_A); | ||
912 | ipic_saved_state.siprr[1] = ipic_read(ipic->regs, IPIC_SIPRR_D); | ||
913 | ipic_saved_state.simsr[0] = ipic_read(ipic->regs, IPIC_SIMSR_H); | ||
914 | ipic_saved_state.simsr[1] = ipic_read(ipic->regs, IPIC_SIMSR_L); | ||
915 | ipic_saved_state.sicnr = ipic_read(ipic->regs, IPIC_SICNR); | ||
916 | ipic_saved_state.smprr[0] = ipic_read(ipic->regs, IPIC_SMPRR_A); | ||
917 | ipic_saved_state.smprr[1] = ipic_read(ipic->regs, IPIC_SMPRR_B); | ||
918 | ipic_saved_state.semsr = ipic_read(ipic->regs, IPIC_SEMSR); | ||
919 | ipic_saved_state.secnr = ipic_read(ipic->regs, IPIC_SECNR); | ||
920 | ipic_saved_state.sermr = ipic_read(ipic->regs, IPIC_SERMR); | ||
921 | ipic_saved_state.sercr = ipic_read(ipic->regs, IPIC_SERCR); | ||
922 | |||
923 | if (fsl_deep_sleep()) { | ||
924 | /* In deep sleep, make sure there can be no | ||
925 | * pending interrupts, as this can cause | ||
926 | * problems on 831x. | ||
927 | */ | ||
928 | ipic_write(ipic->regs, IPIC_SIMSR_H, 0); | ||
929 | ipic_write(ipic->regs, IPIC_SIMSR_L, 0); | ||
930 | ipic_write(ipic->regs, IPIC_SEMSR, 0); | ||
931 | ipic_write(ipic->regs, IPIC_SERMR, 0); | ||
932 | } | ||
933 | |||
934 | return 0; | ||
935 | } | ||
936 | |||
937 | static int ipic_resume(struct sys_device *sdev) | ||
938 | { | ||
939 | struct ipic *ipic = primary_ipic; | ||
940 | |||
941 | ipic_write(ipic->regs, IPIC_SICFR, ipic_saved_state.sicfr); | ||
942 | ipic_write(ipic->regs, IPIC_SIPRR_A, ipic_saved_state.siprr[0]); | ||
943 | ipic_write(ipic->regs, IPIC_SIPRR_D, ipic_saved_state.siprr[1]); | ||
944 | ipic_write(ipic->regs, IPIC_SIMSR_H, ipic_saved_state.simsr[0]); | ||
945 | ipic_write(ipic->regs, IPIC_SIMSR_L, ipic_saved_state.simsr[1]); | ||
946 | ipic_write(ipic->regs, IPIC_SICNR, ipic_saved_state.sicnr); | ||
947 | ipic_write(ipic->regs, IPIC_SMPRR_A, ipic_saved_state.smprr[0]); | ||
948 | ipic_write(ipic->regs, IPIC_SMPRR_B, ipic_saved_state.smprr[1]); | ||
949 | ipic_write(ipic->regs, IPIC_SEMSR, ipic_saved_state.semsr); | ||
950 | ipic_write(ipic->regs, IPIC_SECNR, ipic_saved_state.secnr); | ||
951 | ipic_write(ipic->regs, IPIC_SERMR, ipic_saved_state.sermr); | ||
952 | ipic_write(ipic->regs, IPIC_SERCR, ipic_saved_state.sercr); | ||
953 | |||
954 | return 0; | ||
955 | } | ||
956 | #else | ||
957 | #define ipic_suspend NULL | ||
958 | #define ipic_resume NULL | ||
959 | #endif | ||
960 | |||
892 | static struct sysdev_class ipic_sysclass = { | 961 | static struct sysdev_class ipic_sysclass = { |
893 | .name = "ipic", | 962 | .name = "ipic", |
963 | .suspend = ipic_suspend, | ||
964 | .resume = ipic_resume, | ||
894 | }; | 965 | }; |
895 | 966 | ||
896 | static struct sys_device device_ipic = { | 967 | static struct sys_device device_ipic = { |
diff --git a/arch/powerpc/sysdev/qe_lib/qe.c b/arch/powerpc/sysdev/qe_lib/qe.c index 9e82d7e725a5..b3b73ae57d6d 100644 --- a/arch/powerpc/sysdev/qe_lib/qe.c +++ b/arch/powerpc/sysdev/qe_lib/qe.c | |||
@@ -64,7 +64,7 @@ static phys_addr_t qebase = -1; | |||
64 | phys_addr_t get_qe_base(void) | 64 | phys_addr_t get_qe_base(void) |
65 | { | 65 | { |
66 | struct device_node *qe; | 66 | struct device_node *qe; |
67 | unsigned int size; | 67 | int size; |
68 | const u32 *prop; | 68 | const u32 *prop; |
69 | 69 | ||
70 | if (qebase != -1) | 70 | if (qebase != -1) |
@@ -158,7 +158,7 @@ static unsigned int brg_clk = 0; | |||
158 | unsigned int qe_get_brg_clk(void) | 158 | unsigned int qe_get_brg_clk(void) |
159 | { | 159 | { |
160 | struct device_node *qe; | 160 | struct device_node *qe; |
161 | unsigned int size; | 161 | int size; |
162 | const u32 *prop; | 162 | const u32 *prop; |
163 | 163 | ||
164 | if (brg_clk) | 164 | if (brg_clk) |
@@ -305,7 +305,7 @@ EXPORT_SYMBOL(qe_put_snum); | |||
305 | 305 | ||
306 | static int qe_sdma_init(void) | 306 | static int qe_sdma_init(void) |
307 | { | 307 | { |
308 | struct sdma *sdma = &qe_immr->sdma; | 308 | struct sdma __iomem *sdma = &qe_immr->sdma; |
309 | unsigned long sdma_buf_offset; | 309 | unsigned long sdma_buf_offset; |
310 | 310 | ||
311 | if (!sdma) | 311 | if (!sdma) |
diff --git a/arch/powerpc/sysdev/qe_lib/ucc.c b/arch/powerpc/sysdev/qe_lib/ucc.c index d3c7f5af9bc8..1d78071aad7d 100644 --- a/arch/powerpc/sysdev/qe_lib/ucc.c +++ b/arch/powerpc/sysdev/qe_lib/ucc.c | |||
@@ -88,7 +88,7 @@ int ucc_set_type(unsigned int ucc_num, enum ucc_speed_type speed) | |||
88 | return 0; | 88 | return 0; |
89 | } | 89 | } |
90 | 90 | ||
91 | static void get_cmxucr_reg(unsigned int ucc_num, __be32 **cmxucr, | 91 | static void get_cmxucr_reg(unsigned int ucc_num, __be32 __iomem **cmxucr, |
92 | unsigned int *reg_num, unsigned int *shift) | 92 | unsigned int *reg_num, unsigned int *shift) |
93 | { | 93 | { |
94 | unsigned int cmx = ((ucc_num & 1) << 1) + (ucc_num > 3); | 94 | unsigned int cmx = ((ucc_num & 1) << 1) + (ucc_num > 3); |
@@ -100,7 +100,7 @@ static void get_cmxucr_reg(unsigned int ucc_num, __be32 **cmxucr, | |||
100 | 100 | ||
101 | int ucc_mux_set_grant_tsa_bkpt(unsigned int ucc_num, int set, u32 mask) | 101 | int ucc_mux_set_grant_tsa_bkpt(unsigned int ucc_num, int set, u32 mask) |
102 | { | 102 | { |
103 | __be32 *cmxucr; | 103 | __be32 __iomem *cmxucr; |
104 | unsigned int reg_num; | 104 | unsigned int reg_num; |
105 | unsigned int shift; | 105 | unsigned int shift; |
106 | 106 | ||
@@ -121,7 +121,7 @@ int ucc_mux_set_grant_tsa_bkpt(unsigned int ucc_num, int set, u32 mask) | |||
121 | int ucc_set_qe_mux_rxtx(unsigned int ucc_num, enum qe_clock clock, | 121 | int ucc_set_qe_mux_rxtx(unsigned int ucc_num, enum qe_clock clock, |
122 | enum comm_dir mode) | 122 | enum comm_dir mode) |
123 | { | 123 | { |
124 | __be32 *cmxucr; | 124 | __be32 __iomem *cmxucr; |
125 | unsigned int reg_num; | 125 | unsigned int reg_num; |
126 | unsigned int shift; | 126 | unsigned int shift; |
127 | u32 clock_bits = 0; | 127 | u32 clock_bits = 0; |
diff --git a/arch/powerpc/sysdev/qe_lib/ucc_fast.c b/arch/powerpc/sysdev/qe_lib/ucc_fast.c index bcf88e6ce962..1aecb075a72e 100644 --- a/arch/powerpc/sysdev/qe_lib/ucc_fast.c +++ b/arch/powerpc/sysdev/qe_lib/ucc_fast.c | |||
@@ -46,7 +46,7 @@ void ucc_fast_dump_regs(struct ucc_fast_private * uccf) | |||
46 | printk(KERN_INFO "uccm : addr=0x%p, val=0x%08x\n", | 46 | printk(KERN_INFO "uccm : addr=0x%p, val=0x%08x\n", |
47 | &uccf->uf_regs->uccm, in_be32(&uccf->uf_regs->uccm)); | 47 | &uccf->uf_regs->uccm, in_be32(&uccf->uf_regs->uccm)); |
48 | printk(KERN_INFO "uccs : addr=0x%p, val=0x%02x\n", | 48 | printk(KERN_INFO "uccs : addr=0x%p, val=0x%02x\n", |
49 | &uccf->uf_regs->uccs, uccf->uf_regs->uccs); | 49 | &uccf->uf_regs->uccs, in_8(&uccf->uf_regs->uccs)); |
50 | printk(KERN_INFO "urfb : addr=0x%p, val=0x%08x\n", | 50 | printk(KERN_INFO "urfb : addr=0x%p, val=0x%08x\n", |
51 | &uccf->uf_regs->urfb, in_be32(&uccf->uf_regs->urfb)); | 51 | &uccf->uf_regs->urfb, in_be32(&uccf->uf_regs->urfb)); |
52 | printk(KERN_INFO "urfs : addr=0x%p, val=0x%04x\n", | 52 | printk(KERN_INFO "urfs : addr=0x%p, val=0x%04x\n", |
@@ -68,7 +68,7 @@ void ucc_fast_dump_regs(struct ucc_fast_private * uccf) | |||
68 | printk(KERN_INFO "urtry : addr=0x%p, val=0x%08x\n", | 68 | printk(KERN_INFO "urtry : addr=0x%p, val=0x%08x\n", |
69 | &uccf->uf_regs->urtry, in_be32(&uccf->uf_regs->urtry)); | 69 | &uccf->uf_regs->urtry, in_be32(&uccf->uf_regs->urtry)); |
70 | printk(KERN_INFO "guemr : addr=0x%p, val=0x%02x\n", | 70 | printk(KERN_INFO "guemr : addr=0x%p, val=0x%02x\n", |
71 | &uccf->uf_regs->guemr, uccf->uf_regs->guemr); | 71 | &uccf->uf_regs->guemr, in_8(&uccf->uf_regs->guemr)); |
72 | } | 72 | } |
73 | EXPORT_SYMBOL(ucc_fast_dump_regs); | 73 | EXPORT_SYMBOL(ucc_fast_dump_regs); |
74 | 74 | ||
@@ -96,7 +96,7 @@ EXPORT_SYMBOL(ucc_fast_transmit_on_demand); | |||
96 | 96 | ||
97 | void ucc_fast_enable(struct ucc_fast_private * uccf, enum comm_dir mode) | 97 | void ucc_fast_enable(struct ucc_fast_private * uccf, enum comm_dir mode) |
98 | { | 98 | { |
99 | struct ucc_fast *uf_regs; | 99 | struct ucc_fast __iomem *uf_regs; |
100 | u32 gumr; | 100 | u32 gumr; |
101 | 101 | ||
102 | uf_regs = uccf->uf_regs; | 102 | uf_regs = uccf->uf_regs; |
@@ -117,7 +117,7 @@ EXPORT_SYMBOL(ucc_fast_enable); | |||
117 | 117 | ||
118 | void ucc_fast_disable(struct ucc_fast_private * uccf, enum comm_dir mode) | 118 | void ucc_fast_disable(struct ucc_fast_private * uccf, enum comm_dir mode) |
119 | { | 119 | { |
120 | struct ucc_fast *uf_regs; | 120 | struct ucc_fast __iomem *uf_regs; |
121 | u32 gumr; | 121 | u32 gumr; |
122 | 122 | ||
123 | uf_regs = uccf->uf_regs; | 123 | uf_regs = uccf->uf_regs; |
@@ -139,7 +139,7 @@ EXPORT_SYMBOL(ucc_fast_disable); | |||
139 | int ucc_fast_init(struct ucc_fast_info * uf_info, struct ucc_fast_private ** uccf_ret) | 139 | int ucc_fast_init(struct ucc_fast_info * uf_info, struct ucc_fast_private ** uccf_ret) |
140 | { | 140 | { |
141 | struct ucc_fast_private *uccf; | 141 | struct ucc_fast_private *uccf; |
142 | struct ucc_fast *uf_regs; | 142 | struct ucc_fast __iomem *uf_regs; |
143 | u32 gumr; | 143 | u32 gumr; |
144 | int ret; | 144 | int ret; |
145 | 145 | ||
@@ -216,10 +216,10 @@ int ucc_fast_init(struct ucc_fast_info * uf_info, struct ucc_fast_private ** ucc | |||
216 | uccf->stopped_tx = 0; | 216 | uccf->stopped_tx = 0; |
217 | uccf->stopped_rx = 0; | 217 | uccf->stopped_rx = 0; |
218 | uf_regs = uccf->uf_regs; | 218 | uf_regs = uccf->uf_regs; |
219 | uccf->p_ucce = (u32 *) & (uf_regs->ucce); | 219 | uccf->p_ucce = &uf_regs->ucce; |
220 | uccf->p_uccm = (u32 *) & (uf_regs->uccm); | 220 | uccf->p_uccm = &uf_regs->uccm; |
221 | #ifdef CONFIG_UGETH_TX_ON_DEMAND | 221 | #ifdef CONFIG_UGETH_TX_ON_DEMAND |
222 | uccf->p_utodr = (u16 *) & (uf_regs->utodr); | 222 | uccf->p_utodr = &uf_regs->utodr; |
223 | #endif | 223 | #endif |
224 | #ifdef STATISTICS | 224 | #ifdef STATISTICS |
225 | uccf->tx_frames = 0; | 225 | uccf->tx_frames = 0; |
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c index b6781030cfbd..b795b3e24afd 100644 --- a/arch/s390/kernel/smp.c +++ b/arch/s390/kernel/smp.c | |||
@@ -864,7 +864,8 @@ int setup_profiling_timer(unsigned int multiplier) | |||
864 | } | 864 | } |
865 | 865 | ||
866 | #ifdef CONFIG_HOTPLUG_CPU | 866 | #ifdef CONFIG_HOTPLUG_CPU |
867 | static ssize_t cpu_configure_show(struct sys_device *dev, char *buf) | 867 | static ssize_t cpu_configure_show(struct sys_device *dev, |
868 | struct sysdev_attribute *attr, char *buf) | ||
868 | { | 869 | { |
869 | ssize_t count; | 870 | ssize_t count; |
870 | 871 | ||
@@ -874,8 +875,9 @@ static ssize_t cpu_configure_show(struct sys_device *dev, char *buf) | |||
874 | return count; | 875 | return count; |
875 | } | 876 | } |
876 | 877 | ||
877 | static ssize_t cpu_configure_store(struct sys_device *dev, const char *buf, | 878 | static ssize_t cpu_configure_store(struct sys_device *dev, |
878 | size_t count) | 879 | struct sysdev_attribute *attr, |
880 | const char *buf, size_t count) | ||
879 | { | 881 | { |
880 | int cpu = dev->id; | 882 | int cpu = dev->id; |
881 | int val, rc; | 883 | int val, rc; |
@@ -922,7 +924,8 @@ out: | |||
922 | static SYSDEV_ATTR(configure, 0644, cpu_configure_show, cpu_configure_store); | 924 | static SYSDEV_ATTR(configure, 0644, cpu_configure_show, cpu_configure_store); |
923 | #endif /* CONFIG_HOTPLUG_CPU */ | 925 | #endif /* CONFIG_HOTPLUG_CPU */ |
924 | 926 | ||
925 | static ssize_t cpu_polarization_show(struct sys_device *dev, char *buf) | 927 | static ssize_t cpu_polarization_show(struct sys_device *dev, |
928 | struct sysdev_attribute *attr, char *buf) | ||
926 | { | 929 | { |
927 | int cpu = dev->id; | 930 | int cpu = dev->id; |
928 | ssize_t count; | 931 | ssize_t count; |
@@ -950,7 +953,8 @@ static ssize_t cpu_polarization_show(struct sys_device *dev, char *buf) | |||
950 | } | 953 | } |
951 | static SYSDEV_ATTR(polarization, 0444, cpu_polarization_show, NULL); | 954 | static SYSDEV_ATTR(polarization, 0444, cpu_polarization_show, NULL); |
952 | 955 | ||
953 | static ssize_t show_cpu_address(struct sys_device *dev, char *buf) | 956 | static ssize_t show_cpu_address(struct sys_device *dev, |
957 | struct sysdev_attribute *attr, char *buf) | ||
954 | { | 958 | { |
955 | return sprintf(buf, "%d\n", __cpu_logical_map[dev->id]); | 959 | return sprintf(buf, "%d\n", __cpu_logical_map[dev->id]); |
956 | } | 960 | } |
@@ -970,7 +974,8 @@ static struct attribute_group cpu_common_attr_group = { | |||
970 | .attrs = cpu_common_attrs, | 974 | .attrs = cpu_common_attrs, |
971 | }; | 975 | }; |
972 | 976 | ||
973 | static ssize_t show_capability(struct sys_device *dev, char *buf) | 977 | static ssize_t show_capability(struct sys_device *dev, |
978 | struct sysdev_attribute *attr, char *buf) | ||
974 | { | 979 | { |
975 | unsigned int capability; | 980 | unsigned int capability; |
976 | int rc; | 981 | int rc; |
@@ -982,7 +987,8 @@ static ssize_t show_capability(struct sys_device *dev, char *buf) | |||
982 | } | 987 | } |
983 | static SYSDEV_ATTR(capability, 0444, show_capability, NULL); | 988 | static SYSDEV_ATTR(capability, 0444, show_capability, NULL); |
984 | 989 | ||
985 | static ssize_t show_idle_count(struct sys_device *dev, char *buf) | 990 | static ssize_t show_idle_count(struct sys_device *dev, |
991 | struct sysdev_attribute *attr, char *buf) | ||
986 | { | 992 | { |
987 | struct s390_idle_data *idle; | 993 | struct s390_idle_data *idle; |
988 | unsigned long long idle_count; | 994 | unsigned long long idle_count; |
@@ -995,7 +1001,8 @@ static ssize_t show_idle_count(struct sys_device *dev, char *buf) | |||
995 | } | 1001 | } |
996 | static SYSDEV_ATTR(idle_count, 0444, show_idle_count, NULL); | 1002 | static SYSDEV_ATTR(idle_count, 0444, show_idle_count, NULL); |
997 | 1003 | ||
998 | static ssize_t show_idle_time(struct sys_device *dev, char *buf) | 1004 | static ssize_t show_idle_time(struct sys_device *dev, |
1005 | struct sysdev_attribute *attr, char *buf) | ||
999 | { | 1006 | { |
1000 | struct s390_idle_data *idle; | 1007 | struct s390_idle_data *idle; |
1001 | unsigned long long new_time; | 1008 | unsigned long long new_time; |
@@ -1112,7 +1119,9 @@ out: | |||
1112 | return rc; | 1119 | return rc; |
1113 | } | 1120 | } |
1114 | 1121 | ||
1115 | static ssize_t __ref rescan_store(struct sys_device *dev, const char *buf, | 1122 | static ssize_t __ref rescan_store(struct sys_device *dev, |
1123 | struct sysdev_attribute *attr, | ||
1124 | const char *buf, | ||
1116 | size_t count) | 1125 | size_t count) |
1117 | { | 1126 | { |
1118 | int rc; | 1127 | int rc; |
@@ -1123,7 +1132,9 @@ static ssize_t __ref rescan_store(struct sys_device *dev, const char *buf, | |||
1123 | static SYSDEV_ATTR(rescan, 0200, NULL, rescan_store); | 1132 | static SYSDEV_ATTR(rescan, 0200, NULL, rescan_store); |
1124 | #endif /* CONFIG_HOTPLUG_CPU */ | 1133 | #endif /* CONFIG_HOTPLUG_CPU */ |
1125 | 1134 | ||
1126 | static ssize_t dispatching_show(struct sys_device *dev, char *buf) | 1135 | static ssize_t dispatching_show(struct sys_device *dev, |
1136 | struct sysdev_attribute *attr, | ||
1137 | char *buf) | ||
1127 | { | 1138 | { |
1128 | ssize_t count; | 1139 | ssize_t count; |
1129 | 1140 | ||
@@ -1133,8 +1144,9 @@ static ssize_t dispatching_show(struct sys_device *dev, char *buf) | |||
1133 | return count; | 1144 | return count; |
1134 | } | 1145 | } |
1135 | 1146 | ||
1136 | static ssize_t dispatching_store(struct sys_device *dev, const char *buf, | 1147 | static ssize_t dispatching_store(struct sys_device *dev, |
1137 | size_t count) | 1148 | struct sysdev_attribute *attr, |
1149 | const char *buf, size_t count) | ||
1138 | { | 1150 | { |
1139 | int val, rc; | 1151 | int val, rc; |
1140 | char delim; | 1152 | char delim; |
diff --git a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c index f2cede3947b2..ab70d9bd9261 100644 --- a/arch/s390/kernel/time.c +++ b/arch/s390/kernel/time.c | |||
@@ -1100,7 +1100,9 @@ static inline struct etr_aib *etr_aib_from_dev(struct sys_device *dev) | |||
1100 | return etr_port1_online ? &etr_port1 : NULL; | 1100 | return etr_port1_online ? &etr_port1 : NULL; |
1101 | } | 1101 | } |
1102 | 1102 | ||
1103 | static ssize_t etr_online_show(struct sys_device *dev, char *buf) | 1103 | static ssize_t etr_online_show(struct sys_device *dev, |
1104 | struct sysdev_attribute *attr, | ||
1105 | char *buf) | ||
1104 | { | 1106 | { |
1105 | unsigned int online; | 1107 | unsigned int online; |
1106 | 1108 | ||
@@ -1109,7 +1111,8 @@ static ssize_t etr_online_show(struct sys_device *dev, char *buf) | |||
1109 | } | 1111 | } |
1110 | 1112 | ||
1111 | static ssize_t etr_online_store(struct sys_device *dev, | 1113 | static ssize_t etr_online_store(struct sys_device *dev, |
1112 | const char *buf, size_t count) | 1114 | struct sysdev_attribute *attr, |
1115 | const char *buf, size_t count) | ||
1113 | { | 1116 | { |
1114 | unsigned int value; | 1117 | unsigned int value; |
1115 | 1118 | ||
@@ -1136,7 +1139,9 @@ static ssize_t etr_online_store(struct sys_device *dev, | |||
1136 | 1139 | ||
1137 | static SYSDEV_ATTR(online, 0600, etr_online_show, etr_online_store); | 1140 | static SYSDEV_ATTR(online, 0600, etr_online_show, etr_online_store); |
1138 | 1141 | ||
1139 | static ssize_t etr_stepping_control_show(struct sys_device *dev, char *buf) | 1142 | static ssize_t etr_stepping_control_show(struct sys_device *dev, |
1143 | struct sysdev_attribute *attr, | ||
1144 | char *buf) | ||
1140 | { | 1145 | { |
1141 | return sprintf(buf, "%i\n", (dev == &etr_port0_dev) ? | 1146 | return sprintf(buf, "%i\n", (dev == &etr_port0_dev) ? |
1142 | etr_eacr.e0 : etr_eacr.e1); | 1147 | etr_eacr.e0 : etr_eacr.e1); |
@@ -1144,7 +1149,8 @@ static ssize_t etr_stepping_control_show(struct sys_device *dev, char *buf) | |||
1144 | 1149 | ||
1145 | static SYSDEV_ATTR(stepping_control, 0400, etr_stepping_control_show, NULL); | 1150 | static SYSDEV_ATTR(stepping_control, 0400, etr_stepping_control_show, NULL); |
1146 | 1151 | ||
1147 | static ssize_t etr_mode_code_show(struct sys_device *dev, char *buf) | 1152 | static ssize_t etr_mode_code_show(struct sys_device *dev, |
1153 | struct sysdev_attribute *attr, char *buf) | ||
1148 | { | 1154 | { |
1149 | if (!etr_port0_online && !etr_port1_online) | 1155 | if (!etr_port0_online && !etr_port1_online) |
1150 | /* Status word is not uptodate if both ports are offline. */ | 1156 | /* Status word is not uptodate if both ports are offline. */ |
@@ -1155,7 +1161,8 @@ static ssize_t etr_mode_code_show(struct sys_device *dev, char *buf) | |||
1155 | 1161 | ||
1156 | static SYSDEV_ATTR(state_code, 0400, etr_mode_code_show, NULL); | 1162 | static SYSDEV_ATTR(state_code, 0400, etr_mode_code_show, NULL); |
1157 | 1163 | ||
1158 | static ssize_t etr_untuned_show(struct sys_device *dev, char *buf) | 1164 | static ssize_t etr_untuned_show(struct sys_device *dev, |
1165 | struct sysdev_attribute *attr, char *buf) | ||
1159 | { | 1166 | { |
1160 | struct etr_aib *aib = etr_aib_from_dev(dev); | 1167 | struct etr_aib *aib = etr_aib_from_dev(dev); |
1161 | 1168 | ||
@@ -1166,7 +1173,8 @@ static ssize_t etr_untuned_show(struct sys_device *dev, char *buf) | |||
1166 | 1173 | ||
1167 | static SYSDEV_ATTR(untuned, 0400, etr_untuned_show, NULL); | 1174 | static SYSDEV_ATTR(untuned, 0400, etr_untuned_show, NULL); |
1168 | 1175 | ||
1169 | static ssize_t etr_network_id_show(struct sys_device *dev, char *buf) | 1176 | static ssize_t etr_network_id_show(struct sys_device *dev, |
1177 | struct sysdev_attribute *attr, char *buf) | ||
1170 | { | 1178 | { |
1171 | struct etr_aib *aib = etr_aib_from_dev(dev); | 1179 | struct etr_aib *aib = etr_aib_from_dev(dev); |
1172 | 1180 | ||
@@ -1177,7 +1185,8 @@ static ssize_t etr_network_id_show(struct sys_device *dev, char *buf) | |||
1177 | 1185 | ||
1178 | static SYSDEV_ATTR(network, 0400, etr_network_id_show, NULL); | 1186 | static SYSDEV_ATTR(network, 0400, etr_network_id_show, NULL); |
1179 | 1187 | ||
1180 | static ssize_t etr_id_show(struct sys_device *dev, char *buf) | 1188 | static ssize_t etr_id_show(struct sys_device *dev, |
1189 | struct sysdev_attribute *attr, char *buf) | ||
1181 | { | 1190 | { |
1182 | struct etr_aib *aib = etr_aib_from_dev(dev); | 1191 | struct etr_aib *aib = etr_aib_from_dev(dev); |
1183 | 1192 | ||
@@ -1188,7 +1197,8 @@ static ssize_t etr_id_show(struct sys_device *dev, char *buf) | |||
1188 | 1197 | ||
1189 | static SYSDEV_ATTR(id, 0400, etr_id_show, NULL); | 1198 | static SYSDEV_ATTR(id, 0400, etr_id_show, NULL); |
1190 | 1199 | ||
1191 | static ssize_t etr_port_number_show(struct sys_device *dev, char *buf) | 1200 | static ssize_t etr_port_number_show(struct sys_device *dev, |
1201 | struct sysdev_attribute *attr, char *buf) | ||
1192 | { | 1202 | { |
1193 | struct etr_aib *aib = etr_aib_from_dev(dev); | 1203 | struct etr_aib *aib = etr_aib_from_dev(dev); |
1194 | 1204 | ||
@@ -1199,7 +1209,8 @@ static ssize_t etr_port_number_show(struct sys_device *dev, char *buf) | |||
1199 | 1209 | ||
1200 | static SYSDEV_ATTR(port, 0400, etr_port_number_show, NULL); | 1210 | static SYSDEV_ATTR(port, 0400, etr_port_number_show, NULL); |
1201 | 1211 | ||
1202 | static ssize_t etr_coupled_show(struct sys_device *dev, char *buf) | 1212 | static ssize_t etr_coupled_show(struct sys_device *dev, |
1213 | struct sysdev_attribute *attr, char *buf) | ||
1203 | { | 1214 | { |
1204 | struct etr_aib *aib = etr_aib_from_dev(dev); | 1215 | struct etr_aib *aib = etr_aib_from_dev(dev); |
1205 | 1216 | ||
@@ -1210,7 +1221,8 @@ static ssize_t etr_coupled_show(struct sys_device *dev, char *buf) | |||
1210 | 1221 | ||
1211 | static SYSDEV_ATTR(coupled, 0400, etr_coupled_show, NULL); | 1222 | static SYSDEV_ATTR(coupled, 0400, etr_coupled_show, NULL); |
1212 | 1223 | ||
1213 | static ssize_t etr_local_time_show(struct sys_device *dev, char *buf) | 1224 | static ssize_t etr_local_time_show(struct sys_device *dev, |
1225 | struct sysdev_attribute *attr, char *buf) | ||
1214 | { | 1226 | { |
1215 | struct etr_aib *aib = etr_aib_from_dev(dev); | 1227 | struct etr_aib *aib = etr_aib_from_dev(dev); |
1216 | 1228 | ||
@@ -1221,7 +1233,8 @@ static ssize_t etr_local_time_show(struct sys_device *dev, char *buf) | |||
1221 | 1233 | ||
1222 | static SYSDEV_ATTR(local_time, 0400, etr_local_time_show, NULL); | 1234 | static SYSDEV_ATTR(local_time, 0400, etr_local_time_show, NULL); |
1223 | 1235 | ||
1224 | static ssize_t etr_utc_offset_show(struct sys_device *dev, char *buf) | 1236 | static ssize_t etr_utc_offset_show(struct sys_device *dev, |
1237 | struct sysdev_attribute *attr, char *buf) | ||
1225 | { | 1238 | { |
1226 | struct etr_aib *aib = etr_aib_from_dev(dev); | 1239 | struct etr_aib *aib = etr_aib_from_dev(dev); |
1227 | 1240 | ||
diff --git a/arch/sh/drivers/dma/dma-sysfs.c b/arch/sh/drivers/dma/dma-sysfs.c index 51b57c0d1a3c..347ee11351ec 100644 --- a/arch/sh/drivers/dma/dma-sysfs.c +++ b/arch/sh/drivers/dma/dma-sysfs.c | |||
@@ -23,7 +23,8 @@ static struct sysdev_class dma_sysclass = { | |||
23 | }; | 23 | }; |
24 | EXPORT_SYMBOL(dma_sysclass); | 24 | EXPORT_SYMBOL(dma_sysclass); |
25 | 25 | ||
26 | static ssize_t dma_show_devices(struct sys_device *dev, char *buf) | 26 | static ssize_t dma_show_devices(struct sys_device *dev, |
27 | struct sysdev_attribute *attr, char *buf) | ||
27 | { | 28 | { |
28 | ssize_t len = 0; | 29 | ssize_t len = 0; |
29 | int i; | 30 | int i; |
@@ -57,13 +58,15 @@ static int __init dma_sysclass_init(void) | |||
57 | } | 58 | } |
58 | postcore_initcall(dma_sysclass_init); | 59 | postcore_initcall(dma_sysclass_init); |
59 | 60 | ||
60 | static ssize_t dma_show_dev_id(struct sys_device *dev, char *buf) | 61 | static ssize_t dma_show_dev_id(struct sys_device *dev, |
62 | struct sysdev_attribute *attr, char *buf) | ||
61 | { | 63 | { |
62 | struct dma_channel *channel = to_dma_channel(dev); | 64 | struct dma_channel *channel = to_dma_channel(dev); |
63 | return sprintf(buf, "%s\n", channel->dev_id); | 65 | return sprintf(buf, "%s\n", channel->dev_id); |
64 | } | 66 | } |
65 | 67 | ||
66 | static ssize_t dma_store_dev_id(struct sys_device *dev, | 68 | static ssize_t dma_store_dev_id(struct sys_device *dev, |
69 | struct sysdev_attribute *attr, | ||
67 | const char *buf, size_t count) | 70 | const char *buf, size_t count) |
68 | { | 71 | { |
69 | struct dma_channel *channel = to_dma_channel(dev); | 72 | struct dma_channel *channel = to_dma_channel(dev); |
@@ -74,6 +77,7 @@ static ssize_t dma_store_dev_id(struct sys_device *dev, | |||
74 | static SYSDEV_ATTR(dev_id, S_IRUGO | S_IWUSR, dma_show_dev_id, dma_store_dev_id); | 77 | static SYSDEV_ATTR(dev_id, S_IRUGO | S_IWUSR, dma_show_dev_id, dma_store_dev_id); |
75 | 78 | ||
76 | static ssize_t dma_store_config(struct sys_device *dev, | 79 | static ssize_t dma_store_config(struct sys_device *dev, |
80 | struct sysdev_attribute *attr, | ||
77 | const char *buf, size_t count) | 81 | const char *buf, size_t count) |
78 | { | 82 | { |
79 | struct dma_channel *channel = to_dma_channel(dev); | 83 | struct dma_channel *channel = to_dma_channel(dev); |
@@ -87,13 +91,15 @@ static ssize_t dma_store_config(struct sys_device *dev, | |||
87 | 91 | ||
88 | static SYSDEV_ATTR(config, S_IWUSR, NULL, dma_store_config); | 92 | static SYSDEV_ATTR(config, S_IWUSR, NULL, dma_store_config); |
89 | 93 | ||
90 | static ssize_t dma_show_mode(struct sys_device *dev, char *buf) | 94 | static ssize_t dma_show_mode(struct sys_device *dev, |
95 | struct sysdev_attribute *attr, char *buf) | ||
91 | { | 96 | { |
92 | struct dma_channel *channel = to_dma_channel(dev); | 97 | struct dma_channel *channel = to_dma_channel(dev); |
93 | return sprintf(buf, "0x%08x\n", channel->mode); | 98 | return sprintf(buf, "0x%08x\n", channel->mode); |
94 | } | 99 | } |
95 | 100 | ||
96 | static ssize_t dma_store_mode(struct sys_device *dev, | 101 | static ssize_t dma_store_mode(struct sys_device *dev, |
102 | struct sysdev_attribute *attr, | ||
97 | const char *buf, size_t count) | 103 | const char *buf, size_t count) |
98 | { | 104 | { |
99 | struct dma_channel *channel = to_dma_channel(dev); | 105 | struct dma_channel *channel = to_dma_channel(dev); |
@@ -104,7 +110,8 @@ static ssize_t dma_store_mode(struct sys_device *dev, | |||
104 | static SYSDEV_ATTR(mode, S_IRUGO | S_IWUSR, dma_show_mode, dma_store_mode); | 110 | static SYSDEV_ATTR(mode, S_IRUGO | S_IWUSR, dma_show_mode, dma_store_mode); |
105 | 111 | ||
106 | #define dma_ro_attr(field, fmt) \ | 112 | #define dma_ro_attr(field, fmt) \ |
107 | static ssize_t dma_show_##field(struct sys_device *dev, char *buf) \ | 113 | static ssize_t dma_show_##field(struct sys_device *dev, \ |
114 | struct sysdev_attribute *attr, char *buf)\ | ||
108 | { \ | 115 | { \ |
109 | struct dma_channel *channel = to_dma_channel(dev); \ | 116 | struct dma_channel *channel = to_dma_channel(dev); \ |
110 | return sprintf(buf, fmt, channel->field); \ | 117 | return sprintf(buf, fmt, channel->field); \ |
diff --git a/arch/sparc/Makefile b/arch/sparc/Makefile index fef28e267a52..6668e6037af6 100644 --- a/arch/sparc/Makefile +++ b/arch/sparc/Makefile | |||
@@ -18,6 +18,7 @@ CHECKFLAGS += -D__sparc__ | |||
18 | #KBUILD_CFLAGS += -g -pipe -fcall-used-g5 -fcall-used-g7 | 18 | #KBUILD_CFLAGS += -g -pipe -fcall-used-g5 -fcall-used-g7 |
19 | KBUILD_CFLAGS += -m32 -pipe -mno-fpu -fcall-used-g5 -fcall-used-g7 | 19 | KBUILD_CFLAGS += -m32 -pipe -mno-fpu -fcall-used-g5 -fcall-used-g7 |
20 | KBUILD_AFLAGS += -m32 | 20 | KBUILD_AFLAGS += -m32 |
21 | CPPFLAGS_vmlinux.lds += -m32 | ||
21 | 22 | ||
22 | #LDFLAGS_vmlinux = -N -Ttext 0xf0004000 | 23 | #LDFLAGS_vmlinux = -N -Ttext 0xf0004000 |
23 | # Since 2.5.40, the first stage is left not btfix-ed. | 24 | # Since 2.5.40, the first stage is left not btfix-ed. |
diff --git a/arch/sparc/kernel/apc.c b/arch/sparc/kernel/apc.c index 6707422c9847..5267d48fb2c6 100644 --- a/arch/sparc/kernel/apc.c +++ b/arch/sparc/kernel/apc.c | |||
@@ -56,7 +56,7 @@ __setup("apc=", apc_setup); | |||
56 | * CPU idle callback function | 56 | * CPU idle callback function |
57 | * See .../arch/sparc/kernel/process.c | 57 | * See .../arch/sparc/kernel/process.c |
58 | */ | 58 | */ |
59 | void apc_swift_idle(void) | 59 | static void apc_swift_idle(void) |
60 | { | 60 | { |
61 | #ifdef APC_DEBUG_LED | 61 | #ifdef APC_DEBUG_LED |
62 | set_auxio(0x00, AUXIO_LED); | 62 | set_auxio(0x00, AUXIO_LED); |
@@ -85,54 +85,70 @@ static int apc_release(struct inode *inode, struct file *f) | |||
85 | return 0; | 85 | return 0; |
86 | } | 86 | } |
87 | 87 | ||
88 | static int apc_ioctl(struct inode *inode, struct file *f, | 88 | static long apc_ioctl(struct file *f, unsigned int cmd, unsigned long __arg) |
89 | unsigned int cmd, unsigned long __arg) | ||
90 | { | 89 | { |
91 | __u8 inarg, __user *arg; | 90 | __u8 inarg, __user *arg; |
92 | 91 | ||
93 | arg = (__u8 __user *) __arg; | 92 | arg = (__u8 __user *) __arg; |
93 | |||
94 | lock_kernel(); | ||
95 | |||
94 | switch (cmd) { | 96 | switch (cmd) { |
95 | case APCIOCGFANCTL: | 97 | case APCIOCGFANCTL: |
96 | if (put_user(apc_readb(APC_FANCTL_REG) & APC_REGMASK, arg)) | 98 | if (put_user(apc_readb(APC_FANCTL_REG) & APC_REGMASK, arg)) { |
97 | return -EFAULT; | 99 | unlock_kernel(); |
100 | return -EFAULT; | ||
101 | } | ||
98 | break; | 102 | break; |
99 | 103 | ||
100 | case APCIOCGCPWR: | 104 | case APCIOCGCPWR: |
101 | if (put_user(apc_readb(APC_CPOWER_REG) & APC_REGMASK, arg)) | 105 | if (put_user(apc_readb(APC_CPOWER_REG) & APC_REGMASK, arg)) { |
106 | unlock_kernel(); | ||
102 | return -EFAULT; | 107 | return -EFAULT; |
108 | } | ||
103 | break; | 109 | break; |
104 | 110 | ||
105 | case APCIOCGBPORT: | 111 | case APCIOCGBPORT: |
106 | if (put_user(apc_readb(APC_BPORT_REG) & APC_BPMASK, arg)) | 112 | if (put_user(apc_readb(APC_BPORT_REG) & APC_BPMASK, arg)) { |
113 | unlock_kernel(); | ||
107 | return -EFAULT; | 114 | return -EFAULT; |
115 | } | ||
108 | break; | 116 | break; |
109 | 117 | ||
110 | case APCIOCSFANCTL: | 118 | case APCIOCSFANCTL: |
111 | if (get_user(inarg, arg)) | 119 | if (get_user(inarg, arg)) { |
120 | unlock_kernel(); | ||
112 | return -EFAULT; | 121 | return -EFAULT; |
122 | } | ||
113 | apc_writeb(inarg & APC_REGMASK, APC_FANCTL_REG); | 123 | apc_writeb(inarg & APC_REGMASK, APC_FANCTL_REG); |
114 | break; | 124 | break; |
115 | case APCIOCSCPWR: | 125 | case APCIOCSCPWR: |
116 | if (get_user(inarg, arg)) | 126 | if (get_user(inarg, arg)) { |
127 | unlock_kernel(); | ||
117 | return -EFAULT; | 128 | return -EFAULT; |
129 | } | ||
118 | apc_writeb(inarg & APC_REGMASK, APC_CPOWER_REG); | 130 | apc_writeb(inarg & APC_REGMASK, APC_CPOWER_REG); |
119 | break; | 131 | break; |
120 | case APCIOCSBPORT: | 132 | case APCIOCSBPORT: |
121 | if (get_user(inarg, arg)) | 133 | if (get_user(inarg, arg)) { |
134 | unlock_kernel(); | ||
122 | return -EFAULT; | 135 | return -EFAULT; |
136 | } | ||
123 | apc_writeb(inarg & APC_BPMASK, APC_BPORT_REG); | 137 | apc_writeb(inarg & APC_BPMASK, APC_BPORT_REG); |
124 | break; | 138 | break; |
125 | default: | 139 | default: |
140 | unlock_kernel(); | ||
126 | return -EINVAL; | 141 | return -EINVAL; |
127 | }; | 142 | }; |
128 | 143 | ||
144 | unlock_kernel(); | ||
129 | return 0; | 145 | return 0; |
130 | } | 146 | } |
131 | 147 | ||
132 | static const struct file_operations apc_fops = { | 148 | static const struct file_operations apc_fops = { |
133 | .ioctl = apc_ioctl, | 149 | .unlocked_ioctl = apc_ioctl, |
134 | .open = apc_open, | 150 | .open = apc_open, |
135 | .release = apc_release, | 151 | .release = apc_release, |
136 | }; | 152 | }; |
137 | 153 | ||
138 | static struct miscdevice apc_miscdev = { APC_MINOR, APC_DEVNAME, &apc_fops }; | 154 | static struct miscdevice apc_miscdev = { APC_MINOR, APC_DEVNAME, &apc_fops }; |
diff --git a/arch/sparc/kernel/asm-offsets.c b/arch/sparc/kernel/asm-offsets.c index cd3f7694e9b9..b5bb99ed892c 100644 --- a/arch/sparc/kernel/asm-offsets.c +++ b/arch/sparc/kernel/asm-offsets.c | |||
@@ -18,18 +18,6 @@ int foo(void) | |||
18 | { | 18 | { |
19 | DEFINE(AOFF_task_thread, offsetof(struct task_struct, thread)); | 19 | DEFINE(AOFF_task_thread, offsetof(struct task_struct, thread)); |
20 | BLANK(); | 20 | BLANK(); |
21 | /* XXX This is the stuff for sclow.S, kill it. */ | ||
22 | DEFINE(AOFF_task_pid, offsetof(struct task_struct, pid)); | ||
23 | DEFINE(AOFF_task_uid, offsetof(struct task_struct, uid)); | ||
24 | DEFINE(AOFF_task_gid, offsetof(struct task_struct, gid)); | ||
25 | DEFINE(AOFF_task_euid, offsetof(struct task_struct, euid)); | ||
26 | DEFINE(AOFF_task_egid, offsetof(struct task_struct, egid)); | ||
27 | /* DEFINE(THREAD_INFO, offsetof(struct task_struct, stack)); */ | ||
28 | DEFINE(ASIZ_task_uid, sizeof(current->uid)); | ||
29 | DEFINE(ASIZ_task_gid, sizeof(current->gid)); | ||
30 | DEFINE(ASIZ_task_euid, sizeof(current->euid)); | ||
31 | DEFINE(ASIZ_task_egid, sizeof(current->egid)); | ||
32 | BLANK(); | ||
33 | DEFINE(AOFF_thread_fork_kpsr, | 21 | DEFINE(AOFF_thread_fork_kpsr, |
34 | offsetof(struct thread_struct, fork_kpsr)); | 22 | offsetof(struct thread_struct, fork_kpsr)); |
35 | BLANK(); | 23 | BLANK(); |
diff --git a/arch/sparc/kernel/ebus.c b/arch/sparc/kernel/ebus.c index 92c6fc07e59c..97294232259c 100644 --- a/arch/sparc/kernel/ebus.c +++ b/arch/sparc/kernel/ebus.c | |||
@@ -69,7 +69,7 @@ static inline unsigned long ebus_alloc(size_t size) | |||
69 | 69 | ||
70 | /* | 70 | /* |
71 | */ | 71 | */ |
72 | int __init ebus_blacklist_irq(const char *name) | 72 | static int __init ebus_blacklist_irq(const char *name) |
73 | { | 73 | { |
74 | struct ebus_device_irq *dp; | 74 | struct ebus_device_irq *dp; |
75 | 75 | ||
@@ -83,8 +83,8 @@ int __init ebus_blacklist_irq(const char *name) | |||
83 | return 0; | 83 | return 0; |
84 | } | 84 | } |
85 | 85 | ||
86 | void __init fill_ebus_child(struct device_node *dp, | 86 | static void __init fill_ebus_child(struct device_node *dp, |
87 | struct linux_ebus_child *dev) | 87 | struct linux_ebus_child *dev) |
88 | { | 88 | { |
89 | const int *regs; | 89 | const int *regs; |
90 | const int *irqs; | 90 | const int *irqs; |
@@ -144,7 +144,8 @@ void __init fill_ebus_child(struct device_node *dp, | |||
144 | } | 144 | } |
145 | } | 145 | } |
146 | 146 | ||
147 | void __init fill_ebus_device(struct device_node *dp, struct linux_ebus_device *dev) | 147 | static void __init fill_ebus_device(struct device_node *dp, |
148 | struct linux_ebus_device *dev) | ||
148 | { | 149 | { |
149 | const struct linux_prom_registers *regs; | 150 | const struct linux_prom_registers *regs; |
150 | struct linux_ebus_child *child; | 151 | struct linux_ebus_child *child; |
diff --git a/arch/sparc/kernel/entry.S b/arch/sparc/kernel/entry.S index 4bcfe54f878d..2f96256dc515 100644 --- a/arch/sparc/kernel/entry.S +++ b/arch/sparc/kernel/entry.S | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <asm/vaddrs.h> | 19 | #include <asm/vaddrs.h> |
20 | #include <asm/memreg.h> | 20 | #include <asm/memreg.h> |
21 | #include <asm/page.h> | 21 | #include <asm/page.h> |
22 | #include <asm/pgtable.h> | ||
22 | #ifdef CONFIG_SUN4 | 23 | #ifdef CONFIG_SUN4 |
23 | #include <asm/pgtsun4.h> | 24 | #include <asm/pgtsun4.h> |
24 | #else | 25 | #else |
@@ -1317,7 +1318,6 @@ linux_sparc_syscall: | |||
1317 | bne linux_fast_syscall | 1318 | bne linux_fast_syscall |
1318 | /* Just do first insn from SAVE_ALL in the delay slot */ | 1319 | /* Just do first insn from SAVE_ALL in the delay slot */ |
1319 | 1320 | ||
1320 | .globl syscall_is_too_hard | ||
1321 | syscall_is_too_hard: | 1321 | syscall_is_too_hard: |
1322 | SAVE_ALL_HEAD | 1322 | SAVE_ALL_HEAD |
1323 | rd %wim, %l3 | 1323 | rd %wim, %l3 |
@@ -1544,8 +1544,7 @@ kgdb_trap_low: | |||
1544 | #endif | 1544 | #endif |
1545 | 1545 | ||
1546 | .align 4 | 1546 | .align 4 |
1547 | .globl __handle_exception, flush_patch_exception | 1547 | .globl flush_patch_exception |
1548 | __handle_exception: | ||
1549 | flush_patch_exception: | 1548 | flush_patch_exception: |
1550 | FLUSH_ALL_KERNEL_WINDOWS; | 1549 | FLUSH_ALL_KERNEL_WINDOWS; |
1551 | ldd [%o0], %o6 | 1550 | ldd [%o0], %o6 |
diff --git a/arch/sparc/kernel/etrap.S b/arch/sparc/kernel/etrap.S index f37d961d67a6..e806fcdc46db 100644 --- a/arch/sparc/kernel/etrap.S +++ b/arch/sparc/kernel/etrap.S | |||
@@ -228,7 +228,6 @@ tsetup_mmu_patchme: | |||
228 | */ | 228 | */ |
229 | #define glob_tmp g1 | 229 | #define glob_tmp g1 |
230 | 230 | ||
231 | .globl tsetup_sun4c_stackchk | ||
232 | tsetup_sun4c_stackchk: | 231 | tsetup_sun4c_stackchk: |
233 | /* Done by caller: andcc %sp, 0x7, %g0 */ | 232 | /* Done by caller: andcc %sp, 0x7, %g0 */ |
234 | bne trap_setup_user_stack_is_bolixed | 233 | bne trap_setup_user_stack_is_bolixed |
diff --git a/arch/sparc/kernel/head.S b/arch/sparc/kernel/head.S index 3bfd6085a91d..50d9a16af795 100644 --- a/arch/sparc/kernel/head.S +++ b/arch/sparc/kernel/head.S | |||
@@ -32,7 +32,6 @@ | |||
32 | */ | 32 | */ |
33 | 33 | ||
34 | .align 4 | 34 | .align 4 |
35 | .globl cputyp | ||
36 | cputyp: | 35 | cputyp: |
37 | .word 1 | 36 | .word 1 |
38 | 37 | ||
@@ -1280,7 +1279,6 @@ halt_me: | |||
1280 | * gets initialized in c-code so all routines can use it. | 1279 | * gets initialized in c-code so all routines can use it. |
1281 | */ | 1280 | */ |
1282 | 1281 | ||
1283 | .globl prom_vector_p | ||
1284 | prom_vector_p: | 1282 | prom_vector_p: |
1285 | .word 0 | 1283 | .word 0 |
1286 | 1284 | ||
diff --git a/arch/sparc/kernel/idprom.c b/arch/sparc/kernel/idprom.c index 7220562cdb34..fc511f3c4c18 100644 --- a/arch/sparc/kernel/idprom.c +++ b/arch/sparc/kernel/idprom.c | |||
@@ -24,7 +24,7 @@ static struct idprom idprom_buffer; | |||
24 | * of the Sparc CPU and have a meaningful IDPROM machtype value that we | 24 | * of the Sparc CPU and have a meaningful IDPROM machtype value that we |
25 | * know about. See asm-sparc/machines.h for empirical constants. | 25 | * know about. See asm-sparc/machines.h for empirical constants. |
26 | */ | 26 | */ |
27 | struct Sun_Machine_Models Sun_Machines[NUM_SUN_MACHINES] = { | 27 | static struct Sun_Machine_Models Sun_Machines[NUM_SUN_MACHINES] = { |
28 | /* First, Sun4's */ | 28 | /* First, Sun4's */ |
29 | { "Sun 4/100 Series", (SM_SUN4 | SM_4_110) }, | 29 | { "Sun 4/100 Series", (SM_SUN4 | SM_4_110) }, |
30 | { "Sun 4/200 Series", (SM_SUN4 | SM_4_260) }, | 30 | { "Sun 4/200 Series", (SM_SUN4 | SM_4_260) }, |
diff --git a/arch/sparc/kernel/ioport.c b/arch/sparc/kernel/ioport.c index 7b17522f59bf..487960919f1f 100644 --- a/arch/sparc/kernel/ioport.c +++ b/arch/sparc/kernel/ioport.c | |||
@@ -49,13 +49,16 @@ | |||
49 | 49 | ||
50 | #define mmu_inval_dma_area(p, l) /* Anton pulled it out for 2.4.0-xx */ | 50 | #define mmu_inval_dma_area(p, l) /* Anton pulled it out for 2.4.0-xx */ |
51 | 51 | ||
52 | struct resource *_sparc_find_resource(struct resource *r, unsigned long); | 52 | static struct resource *_sparc_find_resource(struct resource *r, |
53 | unsigned long); | ||
53 | 54 | ||
54 | static void __iomem *_sparc_ioremap(struct resource *res, u32 bus, u32 pa, int sz); | 55 | static void __iomem *_sparc_ioremap(struct resource *res, u32 bus, u32 pa, int sz); |
55 | static void __iomem *_sparc_alloc_io(unsigned int busno, unsigned long phys, | 56 | static void __iomem *_sparc_alloc_io(unsigned int busno, unsigned long phys, |
56 | unsigned long size, char *name); | 57 | unsigned long size, char *name); |
57 | static void _sparc_free_io(struct resource *res); | 58 | static void _sparc_free_io(struct resource *res); |
58 | 59 | ||
60 | static void register_proc_sparc_ioport(void); | ||
61 | |||
59 | /* This points to the next to use virtual memory for DVMA mappings */ | 62 | /* This points to the next to use virtual memory for DVMA mappings */ |
60 | static struct resource _sparc_dvma = { | 63 | static struct resource _sparc_dvma = { |
61 | .name = "sparc_dvma", .start = DVMA_VADDR, .end = DVMA_END - 1 | 64 | .name = "sparc_dvma", .start = DVMA_VADDR, .end = DVMA_END - 1 |
@@ -539,8 +542,6 @@ void __init sbus_setup_arch_props(struct sbus_bus *sbus, struct device_node *dp) | |||
539 | 542 | ||
540 | int __init sbus_arch_preinit(void) | 543 | int __init sbus_arch_preinit(void) |
541 | { | 544 | { |
542 | extern void register_proc_sparc_ioport(void); | ||
543 | |||
544 | register_proc_sparc_ioport(); | 545 | register_proc_sparc_ioport(); |
545 | 546 | ||
546 | #ifdef CONFIG_SUN4 | 547 | #ifdef CONFIG_SUN4 |
@@ -853,8 +854,8 @@ _sparc_io_get_info(char *buf, char **start, off_t fpos, int length, int *eof, | |||
853 | * XXX Too slow. Can have 8192 DVMA pages on sun4m in the worst case. | 854 | * XXX Too slow. Can have 8192 DVMA pages on sun4m in the worst case. |
854 | * This probably warrants some sort of hashing. | 855 | * This probably warrants some sort of hashing. |
855 | */ | 856 | */ |
856 | struct resource * | 857 | static struct resource *_sparc_find_resource(struct resource *root, |
857 | _sparc_find_resource(struct resource *root, unsigned long hit) | 858 | unsigned long hit) |
858 | { | 859 | { |
859 | struct resource *tmp; | 860 | struct resource *tmp; |
860 | 861 | ||
@@ -865,7 +866,7 @@ _sparc_find_resource(struct resource *root, unsigned long hit) | |||
865 | return NULL; | 866 | return NULL; |
866 | } | 867 | } |
867 | 868 | ||
868 | void register_proc_sparc_ioport(void) | 869 | static void register_proc_sparc_ioport(void) |
869 | { | 870 | { |
870 | #ifdef CONFIG_PROC_FS | 871 | #ifdef CONFIG_PROC_FS |
871 | create_proc_read_entry("io_map",0,NULL,_sparc_io_get_info,&sparc_iomap); | 872 | create_proc_read_entry("io_map",0,NULL,_sparc_io_get_info,&sparc_iomap); |
diff --git a/arch/sparc/kernel/irq.c b/arch/sparc/kernel/irq.c index 087390b092b0..93e1d1c65290 100644 --- a/arch/sparc/kernel/irq.c +++ b/arch/sparc/kernel/irq.c | |||
@@ -154,7 +154,7 @@ void (*sparc_init_timers)(irq_handler_t ) = | |||
154 | struct irqaction static_irqaction[MAX_STATIC_ALLOC]; | 154 | struct irqaction static_irqaction[MAX_STATIC_ALLOC]; |
155 | int static_irq_count; | 155 | int static_irq_count; |
156 | 156 | ||
157 | struct { | 157 | static struct { |
158 | struct irqaction *action; | 158 | struct irqaction *action; |
159 | int flags; | 159 | int flags; |
160 | } sparc_irq[NR_IRQS]; | 160 | } sparc_irq[NR_IRQS]; |
diff --git a/arch/sparc/kernel/process.c b/arch/sparc/kernel/process.c index da48d248cc17..4bb430940a61 100644 --- a/arch/sparc/kernel/process.c +++ b/arch/sparc/kernel/process.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* linux/arch/sparc/kernel/process.c | 1 | /* linux/arch/sparc/kernel/process.c |
2 | * | 2 | * |
3 | * Copyright (C) 1995 David S. Miller (davem@davemloft.net) | 3 | * Copyright (C) 1995, 2008 David S. Miller (davem@davemloft.net) |
4 | * Copyright (C) 1996 Eddie C. Dost (ecd@skynet.be) | 4 | * Copyright (C) 1996 Eddie C. Dost (ecd@skynet.be) |
5 | */ | 5 | */ |
6 | 6 | ||
@@ -14,7 +14,6 @@ | |||
14 | #include <linux/module.h> | 14 | #include <linux/module.h> |
15 | #include <linux/sched.h> | 15 | #include <linux/sched.h> |
16 | #include <linux/kernel.h> | 16 | #include <linux/kernel.h> |
17 | #include <linux/kallsyms.h> | ||
18 | #include <linux/mm.h> | 17 | #include <linux/mm.h> |
19 | #include <linux/stddef.h> | 18 | #include <linux/stddef.h> |
20 | #include <linux/ptrace.h> | 19 | #include <linux/ptrace.h> |
@@ -177,6 +176,8 @@ void machine_power_off(void) | |||
177 | machine_halt(); | 176 | machine_halt(); |
178 | } | 177 | } |
179 | 178 | ||
179 | #if 0 | ||
180 | |||
180 | static DEFINE_SPINLOCK(sparc_backtrace_lock); | 181 | static DEFINE_SPINLOCK(sparc_backtrace_lock); |
181 | 182 | ||
182 | void __show_backtrace(unsigned long fp) | 183 | void __show_backtrace(unsigned long fp) |
@@ -196,7 +197,7 @@ void __show_backtrace(unsigned long fp) | |||
196 | rw->ins[4], rw->ins[5], | 197 | rw->ins[4], rw->ins[5], |
197 | rw->ins[6], | 198 | rw->ins[6], |
198 | rw->ins[7]); | 199 | rw->ins[7]); |
199 | print_symbol("%s\n", rw->ins[7]); | 200 | printk("%pS\n", (void *) rw->ins[7]); |
200 | rw = (struct reg_window *) rw->ins[6]; | 201 | rw = (struct reg_window *) rw->ins[6]; |
201 | } | 202 | } |
202 | spin_unlock_irqrestore(&sparc_backtrace_lock, flags); | 203 | spin_unlock_irqrestore(&sparc_backtrace_lock, flags); |
@@ -228,7 +229,6 @@ void smp_show_backtrace_all_cpus(void) | |||
228 | } | 229 | } |
229 | #endif | 230 | #endif |
230 | 231 | ||
231 | #if 0 | ||
232 | void show_stackframe(struct sparc_stackf *sf) | 232 | void show_stackframe(struct sparc_stackf *sf) |
233 | { | 233 | { |
234 | unsigned long size; | 234 | unsigned long size; |
@@ -264,14 +264,14 @@ void show_regs(struct pt_regs *r) | |||
264 | 264 | ||
265 | printk("PSR: %08lx PC: %08lx NPC: %08lx Y: %08lx %s\n", | 265 | printk("PSR: %08lx PC: %08lx NPC: %08lx Y: %08lx %s\n", |
266 | r->psr, r->pc, r->npc, r->y, print_tainted()); | 266 | r->psr, r->pc, r->npc, r->y, print_tainted()); |
267 | print_symbol("PC: <%s>\n", r->pc); | 267 | printk("PC: <%pS>\n", (void *) r->pc); |
268 | printk("%%G: %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n", | 268 | printk("%%G: %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n", |
269 | r->u_regs[0], r->u_regs[1], r->u_regs[2], r->u_regs[3], | 269 | r->u_regs[0], r->u_regs[1], r->u_regs[2], r->u_regs[3], |
270 | r->u_regs[4], r->u_regs[5], r->u_regs[6], r->u_regs[7]); | 270 | r->u_regs[4], r->u_regs[5], r->u_regs[6], r->u_regs[7]); |
271 | printk("%%O: %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n", | 271 | printk("%%O: %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n", |
272 | r->u_regs[8], r->u_regs[9], r->u_regs[10], r->u_regs[11], | 272 | r->u_regs[8], r->u_regs[9], r->u_regs[10], r->u_regs[11], |
273 | r->u_regs[12], r->u_regs[13], r->u_regs[14], r->u_regs[15]); | 273 | r->u_regs[12], r->u_regs[13], r->u_regs[14], r->u_regs[15]); |
274 | print_symbol("RPC: <%s>\n", r->u_regs[15]); | 274 | printk("RPC: <%pS>\n", (void *) r->u_regs[15]); |
275 | 275 | ||
276 | printk("%%L: %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n", | 276 | printk("%%L: %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n", |
277 | rw->locals[0], rw->locals[1], rw->locals[2], rw->locals[3], | 277 | rw->locals[0], rw->locals[1], rw->locals[2], rw->locals[3], |
@@ -306,7 +306,7 @@ void show_stack(struct task_struct *tsk, unsigned long *_ksp) | |||
306 | rw = (struct reg_window *) fp; | 306 | rw = (struct reg_window *) fp; |
307 | pc = rw->ins[7]; | 307 | pc = rw->ins[7]; |
308 | printk("[%08lx : ", pc); | 308 | printk("[%08lx : ", pc); |
309 | print_symbol("%s ] ", pc); | 309 | printk("%pS ] ", (void *) pc); |
310 | fp = rw->ins[6]; | 310 | fp = rw->ins[6]; |
311 | } while (++count < 16); | 311 | } while (++count < 16); |
312 | printk("\n"); | 312 | printk("\n"); |
diff --git a/arch/sparc/kernel/rtrap.S b/arch/sparc/kernel/rtrap.S index ce30082ab266..891f460b7b96 100644 --- a/arch/sparc/kernel/rtrap.S +++ b/arch/sparc/kernel/rtrap.S | |||
@@ -224,8 +224,6 @@ ret_trap_user_stack_is_bolixed: | |||
224 | b signal_p | 224 | b signal_p |
225 | ld [%curptr + TI_FLAGS], %g2 | 225 | ld [%curptr + TI_FLAGS], %g2 |
226 | 226 | ||
227 | |||
228 | .globl sun4c_rett_stackchk | ||
229 | sun4c_rett_stackchk: | 227 | sun4c_rett_stackchk: |
230 | be 1f | 228 | be 1f |
231 | and %fp, 0xfff, %g1 ! delay slot | 229 | and %fp, 0xfff, %g1 ! delay slot |
diff --git a/arch/sparc/kernel/setup.c b/arch/sparc/kernel/setup.c index a0ea0bc6f471..9e451b21202e 100644 --- a/arch/sparc/kernel/setup.c +++ b/arch/sparc/kernel/setup.c | |||
@@ -67,7 +67,7 @@ struct screen_info screen_info = { | |||
67 | extern unsigned long trapbase; | 67 | extern unsigned long trapbase; |
68 | 68 | ||
69 | /* Pretty sick eh? */ | 69 | /* Pretty sick eh? */ |
70 | void prom_sync_me(void) | 70 | static void prom_sync_me(void) |
71 | { | 71 | { |
72 | unsigned long prom_tbr, flags; | 72 | unsigned long prom_tbr, flags; |
73 | 73 | ||
@@ -97,7 +97,7 @@ void prom_sync_me(void) | |||
97 | return; | 97 | return; |
98 | } | 98 | } |
99 | 99 | ||
100 | unsigned int boot_flags __initdata = 0; | 100 | static unsigned int boot_flags __initdata = 0; |
101 | #define BOOTME_DEBUG 0x1 | 101 | #define BOOTME_DEBUG 0x1 |
102 | 102 | ||
103 | /* Exported for mm/init.c:paging_init. */ | 103 | /* Exported for mm/init.c:paging_init. */ |
diff --git a/arch/sparc/kernel/smp.c b/arch/sparc/kernel/smp.c index 6724ab90f82b..1619ec15c099 100644 --- a/arch/sparc/kernel/smp.c +++ b/arch/sparc/kernel/smp.c | |||
@@ -35,13 +35,9 @@ | |||
35 | 35 | ||
36 | #include "irq.h" | 36 | #include "irq.h" |
37 | 37 | ||
38 | int smp_num_cpus = 1; | ||
39 | volatile unsigned long cpu_callin_map[NR_CPUS] __initdata = {0,}; | 38 | volatile unsigned long cpu_callin_map[NR_CPUS] __initdata = {0,}; |
40 | unsigned char boot_cpu_id = 0; | 39 | unsigned char boot_cpu_id = 0; |
41 | unsigned char boot_cpu_id4 = 0; /* boot_cpu_id << 2 */ | 40 | unsigned char boot_cpu_id4 = 0; /* boot_cpu_id << 2 */ |
42 | int smp_activated = 0; | ||
43 | volatile int __cpu_number_map[NR_CPUS]; | ||
44 | volatile int __cpu_logical_map[NR_CPUS]; | ||
45 | 41 | ||
46 | cpumask_t cpu_online_map = CPU_MASK_NONE; | 42 | cpumask_t cpu_online_map = CPU_MASK_NONE; |
47 | cpumask_t phys_cpu_present_map = CPU_MASK_NONE; | 43 | cpumask_t phys_cpu_present_map = CPU_MASK_NONE; |
@@ -55,9 +51,6 @@ cpumask_t smp_commenced_mask = CPU_MASK_NONE; | |||
55 | * instruction which is much better... | 51 | * instruction which is much better... |
56 | */ | 52 | */ |
57 | 53 | ||
58 | /* Used to make bitops atomic */ | ||
59 | unsigned char bitops_spinlock = 0; | ||
60 | |||
61 | void __cpuinit smp_store_cpu_info(int id) | 54 | void __cpuinit smp_store_cpu_info(int id) |
62 | { | 55 | { |
63 | int cpu_node; | 56 | int cpu_node; |
diff --git a/arch/sparc/kernel/sun4c_irq.c b/arch/sparc/kernel/sun4c_irq.c index c6ac9fc52563..340fc395fe2d 100644 --- a/arch/sparc/kernel/sun4c_irq.c +++ b/arch/sparc/kernel/sun4c_irq.c | |||
@@ -68,7 +68,8 @@ unsigned char *interrupt_enable = NULL; | |||
68 | 68 | ||
69 | static int sun4c_pil_map[] = { 0, 1, 2, 3, 5, 7, 8, 9 }; | 69 | static int sun4c_pil_map[] = { 0, 1, 2, 3, 5, 7, 8, 9 }; |
70 | 70 | ||
71 | unsigned int sun4c_sbint_to_irq(struct sbus_dev *sdev, unsigned int sbint) | 71 | static unsigned int sun4c_sbint_to_irq(struct sbus_dev *sdev, |
72 | unsigned int sbint) | ||
72 | { | 73 | { |
73 | if (sbint >= sizeof(sun4c_pil_map)) { | 74 | if (sbint >= sizeof(sun4c_pil_map)) { |
74 | printk(KERN_ERR "%s: bogus SBINT %d\n", sdev->prom_name, sbint); | 75 | printk(KERN_ERR "%s: bogus SBINT %d\n", sdev->prom_name, sbint); |
diff --git a/arch/sparc/kernel/sun4d_irq.c b/arch/sparc/kernel/sun4d_irq.c index 8ac5661cafff..1290b5998f83 100644 --- a/arch/sparc/kernel/sun4d_irq.c +++ b/arch/sparc/kernel/sun4d_irq.c | |||
@@ -52,13 +52,13 @@ extern struct irqaction static_irqaction[MAX_STATIC_ALLOC]; | |||
52 | extern int static_irq_count; | 52 | extern int static_irq_count; |
53 | unsigned char cpu_leds[32]; | 53 | unsigned char cpu_leds[32]; |
54 | #ifdef CONFIG_SMP | 54 | #ifdef CONFIG_SMP |
55 | unsigned char sbus_tid[32]; | 55 | static unsigned char sbus_tid[32]; |
56 | #endif | 56 | #endif |
57 | 57 | ||
58 | static struct irqaction *irq_action[NR_IRQS]; | 58 | static struct irqaction *irq_action[NR_IRQS]; |
59 | extern spinlock_t irq_action_lock; | 59 | extern spinlock_t irq_action_lock; |
60 | 60 | ||
61 | struct sbus_action { | 61 | static struct sbus_action { |
62 | struct irqaction *action; | 62 | struct irqaction *action; |
63 | /* For SMP this needs to be extended */ | 63 | /* For SMP this needs to be extended */ |
64 | } *sbus_actions; | 64 | } *sbus_actions; |
@@ -267,7 +267,8 @@ unsigned int sun4d_build_irq(struct sbus_dev *sdev, int irq) | |||
267 | return irq; | 267 | return irq; |
268 | } | 268 | } |
269 | 269 | ||
270 | unsigned int sun4d_sbint_to_irq(struct sbus_dev *sdev, unsigned int sbint) | 270 | static unsigned int sun4d_sbint_to_irq(struct sbus_dev *sdev, |
271 | unsigned int sbint) | ||
271 | { | 272 | { |
272 | if (sbint >= sizeof(sbus_to_pil)) { | 273 | if (sbint >= sizeof(sbus_to_pil)) { |
273 | printk(KERN_ERR "%s: bogus SBINT %d\n", sdev->prom_name, sbint); | 274 | printk(KERN_ERR "%s: bogus SBINT %d\n", sdev->prom_name, sbint); |
diff --git a/arch/sparc/kernel/sun4m_irq.c b/arch/sparc/kernel/sun4m_irq.c index b92d6d2d5b04..94e02de960ea 100644 --- a/arch/sparc/kernel/sun4m_irq.c +++ b/arch/sparc/kernel/sun4m_irq.c | |||
@@ -154,7 +154,8 @@ static unsigned long irq_mask[] = { | |||
154 | 154 | ||
155 | static int sun4m_pil_map[] = { 0, 2, 3, 5, 7, 9, 11, 13 }; | 155 | static int sun4m_pil_map[] = { 0, 2, 3, 5, 7, 9, 11, 13 }; |
156 | 156 | ||
157 | unsigned int sun4m_sbint_to_irq(struct sbus_dev *sdev, unsigned int sbint) | 157 | static unsigned int sun4m_sbint_to_irq(struct sbus_dev *sdev, |
158 | unsigned int sbint) | ||
158 | { | 159 | { |
159 | if (sbint >= sizeof(sun4m_pil_map)) { | 160 | if (sbint >= sizeof(sun4m_pil_map)) { |
160 | printk(KERN_ERR "%s: bogus SBINT %d\n", sdev->prom_name, sbint); | 161 | printk(KERN_ERR "%s: bogus SBINT %d\n", sdev->prom_name, sbint); |
@@ -163,7 +164,7 @@ unsigned int sun4m_sbint_to_irq(struct sbus_dev *sdev, unsigned int sbint) | |||
163 | return sun4m_pil_map[sbint] | 0x30; | 164 | return sun4m_pil_map[sbint] | 0x30; |
164 | } | 165 | } |
165 | 166 | ||
166 | inline unsigned long sun4m_get_irqmask(unsigned int irq) | 167 | static unsigned long sun4m_get_irqmask(unsigned int irq) |
167 | { | 168 | { |
168 | unsigned long mask; | 169 | unsigned long mask; |
169 | 170 | ||
@@ -281,7 +282,7 @@ static void sun4m_set_udt(int cpu) | |||
281 | #define TIMER_IRQ (OBIO_INTR | 10) | 282 | #define TIMER_IRQ (OBIO_INTR | 10) |
282 | #define PROFILE_IRQ (OBIO_INTR | 14) | 283 | #define PROFILE_IRQ (OBIO_INTR | 14) |
283 | 284 | ||
284 | struct sun4m_timer_regs *sun4m_timers; | 285 | static struct sun4m_timer_regs *sun4m_timers; |
285 | unsigned int lvl14_resolution = (((1000000/HZ) + 1) << 10); | 286 | unsigned int lvl14_resolution = (((1000000/HZ) + 1) << 10); |
286 | 287 | ||
287 | static void sun4m_clear_clock_irq(void) | 288 | static void sun4m_clear_clock_irq(void) |
diff --git a/arch/sparc/kernel/sun4m_smp.c b/arch/sparc/kernel/sun4m_smp.c index ffb875aacb7e..406ac1abc83a 100644 --- a/arch/sparc/kernel/sun4m_smp.c +++ b/arch/sparc/kernel/sun4m_smp.c | |||
@@ -244,8 +244,9 @@ static struct smp_funcall { | |||
244 | static DEFINE_SPINLOCK(cross_call_lock); | 244 | static DEFINE_SPINLOCK(cross_call_lock); |
245 | 245 | ||
246 | /* Cross calls must be serialized, at least currently. */ | 246 | /* Cross calls must be serialized, at least currently. */ |
247 | void smp4m_cross_call(smpfunc_t func, unsigned long arg1, unsigned long arg2, | 247 | static void smp4m_cross_call(smpfunc_t func, unsigned long arg1, |
248 | unsigned long arg3, unsigned long arg4, unsigned long arg5) | 248 | unsigned long arg2, unsigned long arg3, |
249 | unsigned long arg4, unsigned long arg5) | ||
249 | { | 250 | { |
250 | register int ncpus = SUN4M_NCPUS; | 251 | register int ncpus = SUN4M_NCPUS; |
251 | unsigned long flags; | 252 | unsigned long flags; |
@@ -344,7 +345,7 @@ static void __init smp_setup_percpu_timer(void) | |||
344 | enable_pil_irq(14); | 345 | enable_pil_irq(14); |
345 | } | 346 | } |
346 | 347 | ||
347 | void __init smp4m_blackbox_id(unsigned *addr) | 348 | static void __init smp4m_blackbox_id(unsigned *addr) |
348 | { | 349 | { |
349 | int rd = *addr & 0x3e000000; | 350 | int rd = *addr & 0x3e000000; |
350 | int rs1 = rd >> 11; | 351 | int rs1 = rd >> 11; |
@@ -354,7 +355,7 @@ void __init smp4m_blackbox_id(unsigned *addr) | |||
354 | addr[2] = 0x80082003 | rd | rs1; /* and reg, 3, reg */ | 355 | addr[2] = 0x80082003 | rd | rs1; /* and reg, 3, reg */ |
355 | } | 356 | } |
356 | 357 | ||
357 | void __init smp4m_blackbox_current(unsigned *addr) | 358 | static void __init smp4m_blackbox_current(unsigned *addr) |
358 | { | 359 | { |
359 | int rd = *addr & 0x3e000000; | 360 | int rd = *addr & 0x3e000000; |
360 | int rs1 = rd >> 11; | 361 | int rs1 = rd >> 11; |
diff --git a/arch/sparc/kernel/time.c b/arch/sparc/kernel/time.c index 53caacbb3982..ab3dd0b257d3 100644 --- a/arch/sparc/kernel/time.c +++ b/arch/sparc/kernel/time.c | |||
@@ -46,7 +46,7 @@ | |||
46 | #include "irq.h" | 46 | #include "irq.h" |
47 | 47 | ||
48 | DEFINE_SPINLOCK(rtc_lock); | 48 | DEFINE_SPINLOCK(rtc_lock); |
49 | enum sparc_clock_type sp_clock_typ; | 49 | static enum sparc_clock_type sp_clock_typ; |
50 | DEFINE_SPINLOCK(mostek_lock); | 50 | DEFINE_SPINLOCK(mostek_lock); |
51 | void __iomem *mstk48t02_regs = NULL; | 51 | void __iomem *mstk48t02_regs = NULL; |
52 | static struct mostek48t08 __iomem *mstk48t08_regs = NULL; | 52 | static struct mostek48t08 __iomem *mstk48t08_regs = NULL; |
@@ -366,7 +366,7 @@ static int __init clock_init(void) | |||
366 | fs_initcall(clock_init); | 366 | fs_initcall(clock_init); |
367 | #endif /* !CONFIG_SUN4 */ | 367 | #endif /* !CONFIG_SUN4 */ |
368 | 368 | ||
369 | void __init sbus_time_init(void) | 369 | static void __init sbus_time_init(void) |
370 | { | 370 | { |
371 | 371 | ||
372 | BTFIXUPSET_CALL(bus_do_settimeofday, sbus_do_settimeofday, BTFIXUPCALL_NORM); | 372 | BTFIXUPSET_CALL(bus_do_settimeofday, sbus_do_settimeofday, BTFIXUPCALL_NORM); |
diff --git a/arch/sparc/kernel/traps.c b/arch/sparc/kernel/traps.c index 978e9d85949e..5d45d5fd8c99 100644 --- a/arch/sparc/kernel/traps.c +++ b/arch/sparc/kernel/traps.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * arch/sparc/kernel/traps.c | 2 | * arch/sparc/kernel/traps.c |
3 | * | 3 | * |
4 | * Copyright 1995 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright 1995, 2008 David S. Miller (davem@davemloft.net) |
5 | * Copyright 2000 Jakub Jelinek (jakub@redhat.com) | 5 | * Copyright 2000 Jakub Jelinek (jakub@redhat.com) |
6 | */ | 6 | */ |
7 | 7 | ||
@@ -11,7 +11,6 @@ | |||
11 | 11 | ||
12 | #include <linux/sched.h> /* for jiffies */ | 12 | #include <linux/sched.h> /* for jiffies */ |
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/kallsyms.h> | ||
15 | #include <linux/signal.h> | 14 | #include <linux/signal.h> |
16 | #include <linux/smp.h> | 15 | #include <linux/smp.h> |
17 | #include <linux/smp_lock.h> | 16 | #include <linux/smp_lock.h> |
@@ -33,9 +32,6 @@ struct trap_trace_entry { | |||
33 | unsigned long type; | 32 | unsigned long type; |
34 | }; | 33 | }; |
35 | 34 | ||
36 | int trap_curbuf = 0; | ||
37 | struct trap_trace_entry trapbuf[1024]; | ||
38 | |||
39 | void syscall_trace_entry(struct pt_regs *regs) | 35 | void syscall_trace_entry(struct pt_regs *regs) |
40 | { | 36 | { |
41 | printk("%s[%d]: ", current->comm, task_pid_nr(current)); | 37 | printk("%s[%d]: ", current->comm, task_pid_nr(current)); |
@@ -72,7 +68,7 @@ void sun4d_nmi(struct pt_regs *regs) | |||
72 | prom_halt(); | 68 | prom_halt(); |
73 | } | 69 | } |
74 | 70 | ||
75 | void instruction_dump (unsigned long *pc) | 71 | static void instruction_dump(unsigned long *pc) |
76 | { | 72 | { |
77 | int i; | 73 | int i; |
78 | 74 | ||
@@ -119,8 +115,8 @@ void die_if_kernel(char *str, struct pt_regs *regs) | |||
119 | count++ < 30 && | 115 | count++ < 30 && |
120 | (((unsigned long) rw) >= PAGE_OFFSET) && | 116 | (((unsigned long) rw) >= PAGE_OFFSET) && |
121 | !(((unsigned long) rw) & 0x7)) { | 117 | !(((unsigned long) rw) & 0x7)) { |
122 | printk("Caller[%08lx]", rw->ins[7]); | 118 | printk("Caller[%08lx]: %pS\n", rw->ins[7], |
123 | print_symbol(": %s\n", rw->ins[7]); | 119 | (void *) rw->ins[7]); |
124 | rw = (struct reg_window *)rw->ins[6]; | 120 | rw = (struct reg_window *)rw->ins[6]; |
125 | } | 121 | } |
126 | } | 122 | } |
@@ -479,10 +475,6 @@ void do_BUG(const char *file, int line) | |||
479 | 475 | ||
480 | extern void sparc_cpu_startup(void); | 476 | extern void sparc_cpu_startup(void); |
481 | 477 | ||
482 | int linux_smp_still_initting; | ||
483 | unsigned int thiscpus_tbr; | ||
484 | int thiscpus_mid; | ||
485 | |||
486 | void trap_init(void) | 478 | void trap_init(void) |
487 | { | 479 | { |
488 | extern void thread_info_offsets_are_bolixed_pete(void); | 480 | extern void thread_info_offsets_are_bolixed_pete(void); |
diff --git a/arch/sparc/kernel/wof.S b/arch/sparc/kernel/wof.S index 4bce38dfe3c5..3bbcd8dc9abf 100644 --- a/arch/sparc/kernel/wof.S +++ b/arch/sparc/kernel/wof.S | |||
@@ -306,7 +306,6 @@ spwin_bad_ustack_from_kernel: | |||
306 | * As noted above %curptr cannot be touched by this routine at all. | 306 | * As noted above %curptr cannot be touched by this routine at all. |
307 | */ | 307 | */ |
308 | 308 | ||
309 | .globl spwin_sun4c_stackchk | ||
310 | spwin_sun4c_stackchk: | 309 | spwin_sun4c_stackchk: |
311 | /* LOCATION: Window to be saved on the stack */ | 310 | /* LOCATION: Window to be saved on the stack */ |
312 | 311 | ||
diff --git a/arch/sparc/kernel/wuf.S b/arch/sparc/kernel/wuf.S index 82e5145b0f77..779ff750603d 100644 --- a/arch/sparc/kernel/wuf.S +++ b/arch/sparc/kernel/wuf.S | |||
@@ -243,7 +243,6 @@ fwin_user_finish_up: | |||
243 | */ | 243 | */ |
244 | 244 | ||
245 | .align 4 | 245 | .align 4 |
246 | .globl sun4c_fwin_stackchk | ||
247 | sun4c_fwin_stackchk: | 246 | sun4c_fwin_stackchk: |
248 | /* LOCATION: Window 'W' */ | 247 | /* LOCATION: Window 'W' */ |
249 | 248 | ||
diff --git a/arch/sparc/mm/fault.c b/arch/sparc/mm/fault.c index 0a3cd8f6cfe4..3604c2e86709 100644 --- a/arch/sparc/mm/fault.c +++ b/arch/sparc/mm/fault.c | |||
@@ -451,7 +451,7 @@ asmlinkage void do_sun4c_fault(struct pt_regs *regs, int text_fault, int write, | |||
451 | } | 451 | } |
452 | 452 | ||
453 | /* This always deals with user addresses. */ | 453 | /* This always deals with user addresses. */ |
454 | inline void force_user_fault(unsigned long address, int write) | 454 | static void force_user_fault(unsigned long address, int write) |
455 | { | 455 | { |
456 | struct vm_area_struct *vma; | 456 | struct vm_area_struct *vma; |
457 | struct task_struct *tsk = current; | 457 | struct task_struct *tsk = current; |
diff --git a/arch/sparc/mm/init.c b/arch/sparc/mm/init.c index 7794ecb896e3..e103f1bb3777 100644 --- a/arch/sparc/mm/init.c +++ b/arch/sparc/mm/init.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/init.h> | 22 | #include <linux/init.h> |
23 | #include <linux/highmem.h> | 23 | #include <linux/highmem.h> |
24 | #include <linux/bootmem.h> | 24 | #include <linux/bootmem.h> |
25 | #include <linux/pagemap.h> | ||
25 | 26 | ||
26 | #include <asm/system.h> | 27 | #include <asm/system.h> |
27 | #include <asm/vac-ops.h> | 28 | #include <asm/vac-ops.h> |
@@ -128,7 +129,7 @@ unsigned long calc_highpages(void) | |||
128 | return nr; | 129 | return nr; |
129 | } | 130 | } |
130 | 131 | ||
131 | unsigned long calc_max_low_pfn(void) | 132 | static unsigned long calc_max_low_pfn(void) |
132 | { | 133 | { |
133 | int i; | 134 | int i; |
134 | unsigned long tmp = pfn_base + (SRMMU_MAXMEM >> PAGE_SHIFT); | 135 | unsigned long tmp = pfn_base + (SRMMU_MAXMEM >> PAGE_SHIFT); |
@@ -292,7 +293,7 @@ unsigned long __init bootmem_init(unsigned long *pages_avail) | |||
292 | * | 293 | * |
293 | * We simply copy the 2.4 implementation for now. | 294 | * We simply copy the 2.4 implementation for now. |
294 | */ | 295 | */ |
295 | int pgt_cache_water[2] = { 25, 50 }; | 296 | static int pgt_cache_water[2] = { 25, 50 }; |
296 | 297 | ||
297 | void check_pgt_cache(void) | 298 | void check_pgt_cache(void) |
298 | { | 299 | { |
@@ -356,8 +357,6 @@ void __init paging_init(void) | |||
356 | device_scan(); | 357 | device_scan(); |
357 | } | 358 | } |
358 | 359 | ||
359 | struct cache_palias *sparc_aliases; | ||
360 | |||
361 | static void __init taint_real_pages(void) | 360 | static void __init taint_real_pages(void) |
362 | { | 361 | { |
363 | int i; | 362 | int i; |
@@ -375,7 +374,7 @@ static void __init taint_real_pages(void) | |||
375 | } | 374 | } |
376 | } | 375 | } |
377 | 376 | ||
378 | void map_high_region(unsigned long start_pfn, unsigned long end_pfn) | 377 | static void map_high_region(unsigned long start_pfn, unsigned long end_pfn) |
379 | { | 378 | { |
380 | unsigned long tmp; | 379 | unsigned long tmp; |
381 | 380 | ||
diff --git a/arch/sparc/mm/srmmu.c b/arch/sparc/mm/srmmu.c index 23d3291a3e81..c624e04ff03e 100644 --- a/arch/sparc/mm/srmmu.c +++ b/arch/sparc/mm/srmmu.c | |||
@@ -50,7 +50,7 @@ | |||
50 | #include <asm/btfixup.h> | 50 | #include <asm/btfixup.h> |
51 | 51 | ||
52 | enum mbus_module srmmu_modtype; | 52 | enum mbus_module srmmu_modtype; |
53 | unsigned int hwbug_bitmask; | 53 | static unsigned int hwbug_bitmask; |
54 | int vac_cache_size; | 54 | int vac_cache_size; |
55 | int vac_line_size; | 55 | int vac_line_size; |
56 | 56 | ||
@@ -60,7 +60,7 @@ extern unsigned long last_valid_pfn; | |||
60 | 60 | ||
61 | extern unsigned long page_kernel; | 61 | extern unsigned long page_kernel; |
62 | 62 | ||
63 | pgd_t *srmmu_swapper_pg_dir; | 63 | static pgd_t *srmmu_swapper_pg_dir; |
64 | 64 | ||
65 | #ifdef CONFIG_SMP | 65 | #ifdef CONFIG_SMP |
66 | #define FLUSH_BEGIN(mm) | 66 | #define FLUSH_BEGIN(mm) |
@@ -83,12 +83,12 @@ BTFIXUPDEF_CALL(void, local_flush_page_for_dma, unsigned long) | |||
83 | char *srmmu_name; | 83 | char *srmmu_name; |
84 | 84 | ||
85 | ctxd_t *srmmu_ctx_table_phys; | 85 | ctxd_t *srmmu_ctx_table_phys; |
86 | ctxd_t *srmmu_context_table; | 86 | static ctxd_t *srmmu_context_table; |
87 | 87 | ||
88 | int viking_mxcc_present; | 88 | int viking_mxcc_present; |
89 | static DEFINE_SPINLOCK(srmmu_context_spinlock); | 89 | static DEFINE_SPINLOCK(srmmu_context_spinlock); |
90 | 90 | ||
91 | int is_hypersparc; | 91 | static int is_hypersparc; |
92 | 92 | ||
93 | /* | 93 | /* |
94 | * In general all page table modifications should use the V8 atomic | 94 | * In general all page table modifications should use the V8 atomic |
@@ -112,11 +112,11 @@ static inline int srmmu_device_memory(unsigned long x) | |||
112 | return ((x & 0xF0000000) != 0); | 112 | return ((x & 0xF0000000) != 0); |
113 | } | 113 | } |
114 | 114 | ||
115 | int srmmu_cache_pagetables; | 115 | static int srmmu_cache_pagetables; |
116 | 116 | ||
117 | /* these will be initialized in srmmu_nocache_calcsize() */ | 117 | /* these will be initialized in srmmu_nocache_calcsize() */ |
118 | unsigned long srmmu_nocache_size; | 118 | static unsigned long srmmu_nocache_size; |
119 | unsigned long srmmu_nocache_end; | 119 | static unsigned long srmmu_nocache_end; |
120 | 120 | ||
121 | /* 1 bit <=> 256 bytes of nocache <=> 64 PTEs */ | 121 | /* 1 bit <=> 256 bytes of nocache <=> 64 PTEs */ |
122 | #define SRMMU_NOCACHE_BITMAP_SHIFT (PAGE_SHIFT - 4) | 122 | #define SRMMU_NOCACHE_BITMAP_SHIFT (PAGE_SHIFT - 4) |
@@ -324,7 +324,7 @@ static unsigned long __srmmu_get_nocache(int size, int align) | |||
324 | return (SRMMU_NOCACHE_VADDR + (offset << SRMMU_NOCACHE_BITMAP_SHIFT)); | 324 | return (SRMMU_NOCACHE_VADDR + (offset << SRMMU_NOCACHE_BITMAP_SHIFT)); |
325 | } | 325 | } |
326 | 326 | ||
327 | unsigned inline long srmmu_get_nocache(int size, int align) | 327 | static unsigned long srmmu_get_nocache(int size, int align) |
328 | { | 328 | { |
329 | unsigned long tmp; | 329 | unsigned long tmp; |
330 | 330 | ||
@@ -336,7 +336,7 @@ unsigned inline long srmmu_get_nocache(int size, int align) | |||
336 | return tmp; | 336 | return tmp; |
337 | } | 337 | } |
338 | 338 | ||
339 | void srmmu_free_nocache(unsigned long vaddr, int size) | 339 | static void srmmu_free_nocache(unsigned long vaddr, int size) |
340 | { | 340 | { |
341 | int offset; | 341 | int offset; |
342 | 342 | ||
@@ -369,7 +369,8 @@ void srmmu_free_nocache(unsigned long vaddr, int size) | |||
369 | bit_map_clear(&srmmu_nocache_map, offset, size); | 369 | bit_map_clear(&srmmu_nocache_map, offset, size); |
370 | } | 370 | } |
371 | 371 | ||
372 | void srmmu_early_allocate_ptable_skeleton(unsigned long start, unsigned long end); | 372 | static void srmmu_early_allocate_ptable_skeleton(unsigned long start, |
373 | unsigned long end); | ||
373 | 374 | ||
374 | extern unsigned long probe_memory(void); /* in fault.c */ | 375 | extern unsigned long probe_memory(void); /* in fault.c */ |
375 | 376 | ||
@@ -377,7 +378,7 @@ extern unsigned long probe_memory(void); /* in fault.c */ | |||
377 | * Reserve nocache dynamically proportionally to the amount of | 378 | * Reserve nocache dynamically proportionally to the amount of |
378 | * system RAM. -- Tomas Szepe <szepe@pinerecords.com>, June 2002 | 379 | * system RAM. -- Tomas Szepe <szepe@pinerecords.com>, June 2002 |
379 | */ | 380 | */ |
380 | void srmmu_nocache_calcsize(void) | 381 | static void srmmu_nocache_calcsize(void) |
381 | { | 382 | { |
382 | unsigned long sysmemavail = probe_memory() / 1024; | 383 | unsigned long sysmemavail = probe_memory() / 1024; |
383 | int srmmu_nocache_npages; | 384 | int srmmu_nocache_npages; |
@@ -398,7 +399,7 @@ void srmmu_nocache_calcsize(void) | |||
398 | srmmu_nocache_end = SRMMU_NOCACHE_VADDR + srmmu_nocache_size; | 399 | srmmu_nocache_end = SRMMU_NOCACHE_VADDR + srmmu_nocache_size; |
399 | } | 400 | } |
400 | 401 | ||
401 | void __init srmmu_nocache_init(void) | 402 | static void __init srmmu_nocache_init(void) |
402 | { | 403 | { |
403 | unsigned int bitmap_bits; | 404 | unsigned int bitmap_bits; |
404 | pgd_t *pgd; | 405 | pgd_t *pgd; |
@@ -645,7 +646,7 @@ static void srmmu_unmapiorange(unsigned long virt_addr, unsigned int len) | |||
645 | * mappings on the kernel stack without any special code as we did | 646 | * mappings on the kernel stack without any special code as we did |
646 | * need on the sun4c. | 647 | * need on the sun4c. |
647 | */ | 648 | */ |
648 | struct thread_info *srmmu_alloc_thread_info(void) | 649 | static struct thread_info *srmmu_alloc_thread_info(void) |
649 | { | 650 | { |
650 | struct thread_info *ret; | 651 | struct thread_info *ret; |
651 | 652 | ||
@@ -1045,13 +1046,14 @@ extern void hypersparc_setup_blockops(void); | |||
1045 | * around 8mb mapped for us. | 1046 | * around 8mb mapped for us. |
1046 | */ | 1047 | */ |
1047 | 1048 | ||
1048 | void __init early_pgtable_allocfail(char *type) | 1049 | static void __init early_pgtable_allocfail(char *type) |
1049 | { | 1050 | { |
1050 | prom_printf("inherit_prom_mappings: Cannot alloc kernel %s.\n", type); | 1051 | prom_printf("inherit_prom_mappings: Cannot alloc kernel %s.\n", type); |
1051 | prom_halt(); | 1052 | prom_halt(); |
1052 | } | 1053 | } |
1053 | 1054 | ||
1054 | void __init srmmu_early_allocate_ptable_skeleton(unsigned long start, unsigned long end) | 1055 | static void __init srmmu_early_allocate_ptable_skeleton(unsigned long start, |
1056 | unsigned long end) | ||
1055 | { | 1057 | { |
1056 | pgd_t *pgdp; | 1058 | pgd_t *pgdp; |
1057 | pmd_t *pmdp; | 1059 | pmd_t *pmdp; |
@@ -1081,7 +1083,8 @@ void __init srmmu_early_allocate_ptable_skeleton(unsigned long start, unsigned l | |||
1081 | } | 1083 | } |
1082 | } | 1084 | } |
1083 | 1085 | ||
1084 | void __init srmmu_allocate_ptable_skeleton(unsigned long start, unsigned long end) | 1086 | static void __init srmmu_allocate_ptable_skeleton(unsigned long start, |
1087 | unsigned long end) | ||
1085 | { | 1088 | { |
1086 | pgd_t *pgdp; | 1089 | pgd_t *pgdp; |
1087 | pmd_t *pmdp; | 1090 | pmd_t *pmdp; |
@@ -1116,7 +1119,8 @@ void __init srmmu_allocate_ptable_skeleton(unsigned long start, unsigned long en | |||
1116 | * looking at the prom's page table directly which is what most | 1119 | * looking at the prom's page table directly which is what most |
1117 | * other OS's do. Yuck... this is much better. | 1120 | * other OS's do. Yuck... this is much better. |
1118 | */ | 1121 | */ |
1119 | void __init srmmu_inherit_prom_mappings(unsigned long start,unsigned long end) | 1122 | static void __init srmmu_inherit_prom_mappings(unsigned long start, |
1123 | unsigned long end) | ||
1120 | { | 1124 | { |
1121 | pgd_t *pgdp; | 1125 | pgd_t *pgdp; |
1122 | pmd_t *pmdp; | 1126 | pmd_t *pmdp; |
diff --git a/arch/sparc/mm/tsunami.S b/arch/sparc/mm/tsunami.S index db0d6de33a87..4e55e8f76648 100644 --- a/arch/sparc/mm/tsunami.S +++ b/arch/sparc/mm/tsunami.S | |||
@@ -93,7 +93,6 @@ tsunami_flush_tlb_page_out: | |||
93 | ldd [src + offset + 0x00], t2; \ | 93 | ldd [src + offset + 0x00], t2; \ |
94 | std t2, [dst + offset + 0x00]; | 94 | std t2, [dst + offset + 0x00]; |
95 | 95 | ||
96 | .globl tsunami_copy_1page | ||
97 | tsunami_copy_1page: | 96 | tsunami_copy_1page: |
98 | /* NOTE: This routine has to be shorter than 70insns --jj */ | 97 | /* NOTE: This routine has to be shorter than 70insns --jj */ |
99 | or %g0, (PAGE_SIZE >> 8), %g1 | 98 | or %g0, (PAGE_SIZE >> 8), %g1 |
diff --git a/arch/sparc64/Kconfig b/arch/sparc64/Kconfig index fca9246470b1..7c88263256af 100644 --- a/arch/sparc64/Kconfig +++ b/arch/sparc64/Kconfig | |||
@@ -16,6 +16,7 @@ config SPARC64 | |||
16 | select HAVE_IDE | 16 | select HAVE_IDE |
17 | select HAVE_LMB | 17 | select HAVE_LMB |
18 | select HAVE_ARCH_KGDB | 18 | select HAVE_ARCH_KGDB |
19 | select USE_GENERIC_SMP_HELPERS if SMP | ||
19 | 20 | ||
20 | config GENERIC_TIME | 21 | config GENERIC_TIME |
21 | bool | 22 | bool |
@@ -81,6 +82,10 @@ config GENERIC_HARDIRQS_NO__DO_IRQ | |||
81 | bool | 82 | bool |
82 | def_bool y | 83 | def_bool y |
83 | 84 | ||
85 | source "init/Kconfig" | ||
86 | |||
87 | menu "Processor type and features" | ||
88 | |||
84 | choice | 89 | choice |
85 | prompt "Kernel page size" | 90 | prompt "Kernel page size" |
86 | default SPARC64_PAGE_SIZE_8KB | 91 | default SPARC64_PAGE_SIZE_8KB |
@@ -93,19 +98,11 @@ config SPARC64_PAGE_SIZE_8KB | |||
93 | 8KB and 64KB work quite well, since SPARC ELF sections | 98 | 8KB and 64KB work quite well, since SPARC ELF sections |
94 | provide for up to 64KB alignment. | 99 | provide for up to 64KB alignment. |
95 | 100 | ||
96 | Therefore, 512KB and 4MB are for expert hackers only. | ||
97 | |||
98 | If you don't know what to do, choose 8KB. | 101 | If you don't know what to do, choose 8KB. |
99 | 102 | ||
100 | config SPARC64_PAGE_SIZE_64KB | 103 | config SPARC64_PAGE_SIZE_64KB |
101 | bool "64KB" | 104 | bool "64KB" |
102 | 105 | ||
103 | config SPARC64_PAGE_SIZE_512KB | ||
104 | bool "512KB" | ||
105 | |||
106 | config SPARC64_PAGE_SIZE_4MB | ||
107 | bool "4MB" | ||
108 | |||
109 | endchoice | 106 | endchoice |
110 | 107 | ||
111 | config SECCOMP | 108 | config SECCOMP |
@@ -136,14 +133,10 @@ config HOTPLUG_CPU | |||
136 | can be controlled through /sys/devices/system/cpu/cpu#. | 133 | can be controlled through /sys/devices/system/cpu/cpu#. |
137 | Say N if you want to disable CPU hotplug. | 134 | Say N if you want to disable CPU hotplug. |
138 | 135 | ||
139 | source "init/Kconfig" | ||
140 | |||
141 | config GENERIC_HARDIRQS | 136 | config GENERIC_HARDIRQS |
142 | bool | 137 | bool |
143 | default y | 138 | default y |
144 | 139 | ||
145 | menu "General machine setup" | ||
146 | |||
147 | source "kernel/time/Kconfig" | 140 | source "kernel/time/Kconfig" |
148 | 141 | ||
149 | config SMP | 142 | config SMP |
@@ -225,11 +218,10 @@ config HUGETLB_PAGE_SIZE_4MB | |||
225 | bool "4MB" | 218 | bool "4MB" |
226 | 219 | ||
227 | config HUGETLB_PAGE_SIZE_512K | 220 | config HUGETLB_PAGE_SIZE_512K |
228 | depends on !SPARC64_PAGE_SIZE_4MB && !SPARC64_PAGE_SIZE_512KB | ||
229 | bool "512K" | 221 | bool "512K" |
230 | 222 | ||
231 | config HUGETLB_PAGE_SIZE_64K | 223 | config HUGETLB_PAGE_SIZE_64K |
232 | depends on !SPARC64_PAGE_SIZE_4MB && !SPARC64_PAGE_SIZE_512KB && !SPARC64_PAGE_SIZE_64KB | 224 | depends on !SPARC64_PAGE_SIZE_64KB |
233 | bool "64K" | 225 | bool "64K" |
234 | 226 | ||
235 | endchoice | 227 | endchoice |
diff --git a/arch/sparc64/Makefile b/arch/sparc64/Makefile index 4b8f2b084c21..b785a395b12f 100644 --- a/arch/sparc64/Makefile +++ b/arch/sparc64/Makefile | |||
@@ -9,7 +9,9 @@ | |||
9 | 9 | ||
10 | CHECKFLAGS += -D__sparc__ -D__sparc_v9__ -m64 | 10 | CHECKFLAGS += -D__sparc__ -D__sparc_v9__ -m64 |
11 | 11 | ||
12 | CPPFLAGS_vmlinux.lds += -Usparc | 12 | # Undefine sparc when processing vmlinux.lds - it is used |
13 | # And teach CPP we are doing 64 bit builds (for this case) | ||
14 | CPPFLAGS_vmlinux.lds += -m64 -Usparc | ||
13 | 15 | ||
14 | LDFLAGS := -m elf64_sparc | 16 | LDFLAGS := -m elf64_sparc |
15 | 17 | ||
diff --git a/arch/sparc64/defconfig b/arch/sparc64/defconfig index 76eb832527f2..82cab5cc8070 100644 --- a/arch/sparc64/defconfig +++ b/arch/sparc64/defconfig | |||
@@ -1,7 +1,7 @@ | |||
1 | # | 1 | # |
2 | # Automatically generated make config: don't edit | 2 | # Automatically generated make config: don't edit |
3 | # Linux kernel version: 2.6.26-rc2 | 3 | # Linux kernel version: 2.6.26 |
4 | # Fri May 16 13:36:07 2008 | 4 | # Fri Jul 18 00:47:07 2008 |
5 | # | 5 | # |
6 | CONFIG_SPARC=y | 6 | CONFIG_SPARC=y |
7 | CONFIG_SPARC64=y | 7 | CONFIG_SPARC64=y |
@@ -22,18 +22,6 @@ CONFIG_HAVE_SETUP_PER_CPU_AREA=y | |||
22 | CONFIG_ARCH_NO_VIRT_TO_BUS=y | 22 | CONFIG_ARCH_NO_VIRT_TO_BUS=y |
23 | CONFIG_OF=y | 23 | CONFIG_OF=y |
24 | CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y | 24 | CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y |
25 | CONFIG_SPARC64_PAGE_SIZE_8KB=y | ||
26 | # CONFIG_SPARC64_PAGE_SIZE_64KB is not set | ||
27 | # CONFIG_SPARC64_PAGE_SIZE_512KB is not set | ||
28 | # CONFIG_SPARC64_PAGE_SIZE_4MB is not set | ||
29 | CONFIG_SECCOMP=y | ||
30 | CONFIG_HZ_100=y | ||
31 | # CONFIG_HZ_250 is not set | ||
32 | # CONFIG_HZ_300 is not set | ||
33 | # CONFIG_HZ_1000 is not set | ||
34 | CONFIG_HZ=100 | ||
35 | # CONFIG_SCHED_HRTICK is not set | ||
36 | CONFIG_HOTPLUG_CPU=y | ||
37 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | 25 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" |
38 | 26 | ||
39 | # | 27 | # |
@@ -105,6 +93,7 @@ CONFIG_KRETPROBES=y | |||
105 | CONFIG_HAVE_KPROBES=y | 93 | CONFIG_HAVE_KPROBES=y |
106 | CONFIG_HAVE_KRETPROBES=y | 94 | CONFIG_HAVE_KRETPROBES=y |
107 | # CONFIG_HAVE_DMA_ATTRS is not set | 95 | # CONFIG_HAVE_DMA_ATTRS is not set |
96 | CONFIG_USE_GENERIC_SMP_HELPERS=y | ||
108 | CONFIG_PROC_PAGE_MONITOR=y | 97 | CONFIG_PROC_PAGE_MONITOR=y |
109 | CONFIG_SLABINFO=y | 98 | CONFIG_SLABINFO=y |
110 | CONFIG_RT_MUTEXES=y | 99 | CONFIG_RT_MUTEXES=y |
@@ -121,6 +110,7 @@ CONFIG_STOP_MACHINE=y | |||
121 | CONFIG_BLOCK=y | 110 | CONFIG_BLOCK=y |
122 | CONFIG_BLK_DEV_IO_TRACE=y | 111 | CONFIG_BLK_DEV_IO_TRACE=y |
123 | CONFIG_BLK_DEV_BSG=y | 112 | CONFIG_BLK_DEV_BSG=y |
113 | # CONFIG_BLK_DEV_INTEGRITY is not set | ||
124 | CONFIG_BLOCK_COMPAT=y | 114 | CONFIG_BLOCK_COMPAT=y |
125 | 115 | ||
126 | # | 116 | # |
@@ -136,11 +126,21 @@ CONFIG_DEFAULT_AS=y | |||
136 | # CONFIG_DEFAULT_NOOP is not set | 126 | # CONFIG_DEFAULT_NOOP is not set |
137 | CONFIG_DEFAULT_IOSCHED="anticipatory" | 127 | CONFIG_DEFAULT_IOSCHED="anticipatory" |
138 | CONFIG_CLASSIC_RCU=y | 128 | CONFIG_CLASSIC_RCU=y |
139 | CONFIG_GENERIC_HARDIRQS=y | ||
140 | 129 | ||
141 | # | 130 | # |
142 | # General machine setup | 131 | # Processor type and features |
143 | # | 132 | # |
133 | CONFIG_SPARC64_PAGE_SIZE_8KB=y | ||
134 | # CONFIG_SPARC64_PAGE_SIZE_64KB is not set | ||
135 | CONFIG_SECCOMP=y | ||
136 | CONFIG_HZ_100=y | ||
137 | # CONFIG_HZ_250 is not set | ||
138 | # CONFIG_HZ_300 is not set | ||
139 | # CONFIG_HZ_1000 is not set | ||
140 | CONFIG_HZ=100 | ||
141 | # CONFIG_SCHED_HRTICK is not set | ||
142 | CONFIG_HOTPLUG_CPU=y | ||
143 | CONFIG_GENERIC_HARDIRQS=y | ||
144 | CONFIG_TICK_ONESHOT=y | 144 | CONFIG_TICK_ONESHOT=y |
145 | CONFIG_NO_HZ=y | 145 | CONFIG_NO_HZ=y |
146 | CONFIG_HIGH_RES_TIMERS=y | 146 | CONFIG_HIGH_RES_TIMERS=y |
@@ -342,6 +342,8 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | |||
342 | CONFIG_STANDALONE=y | 342 | CONFIG_STANDALONE=y |
343 | # CONFIG_PREVENT_FIRMWARE_BUILD is not set | 343 | # CONFIG_PREVENT_FIRMWARE_BUILD is not set |
344 | CONFIG_FW_LOADER=y | 344 | CONFIG_FW_LOADER=y |
345 | CONFIG_FIRMWARE_IN_KERNEL=y | ||
346 | CONFIG_EXTRA_FIRMWARE="" | ||
345 | # CONFIG_DEBUG_DRIVER is not set | 347 | # CONFIG_DEBUG_DRIVER is not set |
346 | # CONFIG_DEBUG_DEVRES is not set | 348 | # CONFIG_DEBUG_DEVRES is not set |
347 | # CONFIG_SYS_HYPERVISOR is not set | 349 | # CONFIG_SYS_HYPERVISOR is not set |
@@ -366,6 +368,7 @@ CONFIG_CDROM_PKTCDVD_BUFFERS=8 | |||
366 | CONFIG_CDROM_PKTCDVD_WCACHE=y | 368 | CONFIG_CDROM_PKTCDVD_WCACHE=y |
367 | CONFIG_ATA_OVER_ETH=m | 369 | CONFIG_ATA_OVER_ETH=m |
368 | CONFIG_SUNVDC=m | 370 | CONFIG_SUNVDC=m |
371 | # CONFIG_BLK_DEV_HD is not set | ||
369 | CONFIG_MISC_DEVICES=y | 372 | CONFIG_MISC_DEVICES=y |
370 | # CONFIG_PHANTOM is not set | 373 | # CONFIG_PHANTOM is not set |
371 | # CONFIG_EEPROM_93CX6 is not set | 374 | # CONFIG_EEPROM_93CX6 is not set |
@@ -379,6 +382,7 @@ CONFIG_BLK_DEV_IDE=y | |||
379 | # | 382 | # |
380 | # Please see Documentation/ide/ide.txt for help/info on IDE drives | 383 | # Please see Documentation/ide/ide.txt for help/info on IDE drives |
381 | # | 384 | # |
385 | CONFIG_IDE_TIMINGS=y | ||
382 | # CONFIG_BLK_DEV_IDE_SATA is not set | 386 | # CONFIG_BLK_DEV_IDE_SATA is not set |
383 | CONFIG_BLK_DEV_IDEDISK=y | 387 | CONFIG_BLK_DEV_IDEDISK=y |
384 | # CONFIG_IDEDISK_MULTI_MODE is not set | 388 | # CONFIG_IDEDISK_MULTI_MODE is not set |
@@ -429,8 +433,6 @@ CONFIG_BLK_DEV_ALI15X3=y | |||
429 | # CONFIG_BLK_DEV_VIA82CXXX is not set | 433 | # CONFIG_BLK_DEV_VIA82CXXX is not set |
430 | # CONFIG_BLK_DEV_TC86C001 is not set | 434 | # CONFIG_BLK_DEV_TC86C001 is not set |
431 | CONFIG_BLK_DEV_IDEDMA=y | 435 | CONFIG_BLK_DEV_IDEDMA=y |
432 | # CONFIG_BLK_DEV_HD_ONLY is not set | ||
433 | # CONFIG_BLK_DEV_HD is not set | ||
434 | 436 | ||
435 | # | 437 | # |
436 | # SCSI device support | 438 | # SCSI device support |
@@ -504,6 +506,7 @@ CONFIG_SCSI_LOWLEVEL=y | |||
504 | # CONFIG_SCSI_DEBUG is not set | 506 | # CONFIG_SCSI_DEBUG is not set |
505 | # CONFIG_SCSI_SUNESP is not set | 507 | # CONFIG_SCSI_SUNESP is not set |
506 | # CONFIG_SCSI_SRP is not set | 508 | # CONFIG_SCSI_SRP is not set |
509 | # CONFIG_SCSI_DH is not set | ||
507 | # CONFIG_ATA is not set | 510 | # CONFIG_ATA is not set |
508 | CONFIG_MD=y | 511 | CONFIG_MD=y |
509 | CONFIG_BLK_DEV_MD=m | 512 | CONFIG_BLK_DEV_MD=m |
@@ -529,6 +532,10 @@ CONFIG_DM_ZERO=m | |||
529 | # | 532 | # |
530 | # IEEE 1394 (FireWire) support | 533 | # IEEE 1394 (FireWire) support |
531 | # | 534 | # |
535 | |||
536 | # | ||
537 | # Enable only one of the two stacks, unless you know what you are doing | ||
538 | # | ||
532 | # CONFIG_FIREWIRE is not set | 539 | # CONFIG_FIREWIRE is not set |
533 | # CONFIG_IEEE1394 is not set | 540 | # CONFIG_IEEE1394 is not set |
534 | # CONFIG_I2O is not set | 541 | # CONFIG_I2O is not set |
@@ -745,7 +752,8 @@ CONFIG_SERIAL_CORE_CONSOLE=y | |||
745 | CONFIG_UNIX98_PTYS=y | 752 | CONFIG_UNIX98_PTYS=y |
746 | # CONFIG_LEGACY_PTYS is not set | 753 | # CONFIG_LEGACY_PTYS is not set |
747 | # CONFIG_IPMI_HANDLER is not set | 754 | # CONFIG_IPMI_HANDLER is not set |
748 | # CONFIG_HW_RANDOM is not set | 755 | CONFIG_HW_RANDOM=m |
756 | CONFIG_HW_RANDOM_N2RNG=m | ||
749 | # CONFIG_R3964 is not set | 757 | # CONFIG_R3964 is not set |
750 | # CONFIG_APPLICOM is not set | 758 | # CONFIG_APPLICOM is not set |
751 | # CONFIG_RAW_DRIVER is not set | 759 | # CONFIG_RAW_DRIVER is not set |
@@ -759,38 +767,58 @@ CONFIG_I2C_ALGOBIT=y | |||
759 | # | 767 | # |
760 | # I2C Hardware Bus support | 768 | # I2C Hardware Bus support |
761 | # | 769 | # |
770 | |||
771 | # | ||
772 | # PC SMBus host controller drivers | ||
773 | # | ||
762 | # CONFIG_I2C_ALI1535 is not set | 774 | # CONFIG_I2C_ALI1535 is not set |
763 | # CONFIG_I2C_ALI1563 is not set | 775 | # CONFIG_I2C_ALI1563 is not set |
764 | # CONFIG_I2C_ALI15X3 is not set | 776 | # CONFIG_I2C_ALI15X3 is not set |
765 | # CONFIG_I2C_AMD756 is not set | 777 | # CONFIG_I2C_AMD756 is not set |
766 | # CONFIG_I2C_AMD8111 is not set | 778 | # CONFIG_I2C_AMD8111 is not set |
767 | # CONFIG_I2C_I801 is not set | 779 | # CONFIG_I2C_I801 is not set |
768 | # CONFIG_I2C_I810 is not set | 780 | # CONFIG_I2C_ISCH is not set |
769 | # CONFIG_I2C_PIIX4 is not set | 781 | # CONFIG_I2C_PIIX4 is not set |
770 | # CONFIG_I2C_NFORCE2 is not set | 782 | # CONFIG_I2C_NFORCE2 is not set |
771 | # CONFIG_I2C_OCORES is not set | ||
772 | # CONFIG_I2C_PARPORT_LIGHT is not set | ||
773 | # CONFIG_I2C_PROSAVAGE is not set | ||
774 | # CONFIG_I2C_SAVAGE4 is not set | ||
775 | # CONFIG_I2C_SIMTEC is not set | ||
776 | # CONFIG_I2C_SIS5595 is not set | 783 | # CONFIG_I2C_SIS5595 is not set |
777 | # CONFIG_I2C_SIS630 is not set | 784 | # CONFIG_I2C_SIS630 is not set |
778 | # CONFIG_I2C_SIS96X is not set | 785 | # CONFIG_I2C_SIS96X is not set |
779 | # CONFIG_I2C_TAOS_EVM is not set | ||
780 | # CONFIG_I2C_STUB is not set | ||
781 | # CONFIG_I2C_TINY_USB is not set | ||
782 | # CONFIG_I2C_VIA is not set | 786 | # CONFIG_I2C_VIA is not set |
783 | # CONFIG_I2C_VIAPRO is not set | 787 | # CONFIG_I2C_VIAPRO is not set |
788 | |||
789 | # | ||
790 | # I2C system bus drivers (mostly embedded / system-on-chip) | ||
791 | # | ||
792 | # CONFIG_I2C_OCORES is not set | ||
793 | # CONFIG_I2C_SIMTEC is not set | ||
794 | |||
795 | # | ||
796 | # External I2C/SMBus adapter drivers | ||
797 | # | ||
798 | # CONFIG_I2C_PARPORT_LIGHT is not set | ||
799 | # CONFIG_I2C_TAOS_EVM is not set | ||
800 | # CONFIG_I2C_TINY_USB is not set | ||
801 | |||
802 | # | ||
803 | # Graphics adapter I2C/DDC channel drivers | ||
804 | # | ||
784 | # CONFIG_I2C_VOODOO3 is not set | 805 | # CONFIG_I2C_VOODOO3 is not set |
806 | |||
807 | # | ||
808 | # Other I2C/SMBus bus drivers | ||
809 | # | ||
785 | # CONFIG_I2C_PCA_PLATFORM is not set | 810 | # CONFIG_I2C_PCA_PLATFORM is not set |
811 | # CONFIG_I2C_STUB is not set | ||
786 | 812 | ||
787 | # | 813 | # |
788 | # Miscellaneous I2C Chip support | 814 | # Miscellaneous I2C Chip support |
789 | # | 815 | # |
790 | # CONFIG_DS1682 is not set | 816 | # CONFIG_DS1682 is not set |
817 | # CONFIG_AT24 is not set | ||
791 | # CONFIG_SENSORS_EEPROM is not set | 818 | # CONFIG_SENSORS_EEPROM is not set |
792 | # CONFIG_SENSORS_PCF8574 is not set | 819 | # CONFIG_SENSORS_PCF8574 is not set |
793 | # CONFIG_PCF8575 is not set | 820 | # CONFIG_PCF8575 is not set |
821 | # CONFIG_SENSORS_PCA9539 is not set | ||
794 | # CONFIG_SENSORS_PCF8591 is not set | 822 | # CONFIG_SENSORS_PCF8591 is not set |
795 | # CONFIG_SENSORS_MAX6875 is not set | 823 | # CONFIG_SENSORS_MAX6875 is not set |
796 | # CONFIG_SENSORS_TSL2550 is not set | 824 | # CONFIG_SENSORS_TSL2550 is not set |
@@ -856,6 +884,7 @@ CONFIG_HWMON=y | |||
856 | # CONFIG_SENSORS_W83627EHF is not set | 884 | # CONFIG_SENSORS_W83627EHF is not set |
857 | # CONFIG_HWMON_DEBUG_CHIP is not set | 885 | # CONFIG_HWMON_DEBUG_CHIP is not set |
858 | # CONFIG_THERMAL is not set | 886 | # CONFIG_THERMAL is not set |
887 | # CONFIG_THERMAL_HWMON is not set | ||
859 | # CONFIG_WATCHDOG is not set | 888 | # CONFIG_WATCHDOG is not set |
860 | 889 | ||
861 | # | 890 | # |
@@ -985,15 +1014,7 @@ CONFIG_LOGO=y | |||
985 | # CONFIG_LOGO_LINUX_VGA16 is not set | 1014 | # CONFIG_LOGO_LINUX_VGA16 is not set |
986 | # CONFIG_LOGO_LINUX_CLUT224 is not set | 1015 | # CONFIG_LOGO_LINUX_CLUT224 is not set |
987 | CONFIG_LOGO_SUN_CLUT224=y | 1016 | CONFIG_LOGO_SUN_CLUT224=y |
988 | |||
989 | # | ||
990 | # Sound | ||
991 | # | ||
992 | CONFIG_SOUND=m | 1017 | CONFIG_SOUND=m |
993 | |||
994 | # | ||
995 | # Advanced Linux Sound Architecture | ||
996 | # | ||
997 | CONFIG_SND=m | 1018 | CONFIG_SND=m |
998 | CONFIG_SND_TIMER=m | 1019 | CONFIG_SND_TIMER=m |
999 | CONFIG_SND_PCM=m | 1020 | CONFIG_SND_PCM=m |
@@ -1010,21 +1031,17 @@ CONFIG_SND_SUPPORT_OLD_API=y | |||
1010 | CONFIG_SND_VERBOSE_PROCFS=y | 1031 | CONFIG_SND_VERBOSE_PROCFS=y |
1011 | # CONFIG_SND_VERBOSE_PRINTK is not set | 1032 | # CONFIG_SND_VERBOSE_PRINTK is not set |
1012 | # CONFIG_SND_DEBUG is not set | 1033 | # CONFIG_SND_DEBUG is not set |
1013 | 1034 | CONFIG_SND_VMASTER=y | |
1014 | # | ||
1015 | # Generic devices | ||
1016 | # | ||
1017 | CONFIG_SND_MPU401_UART=m | 1035 | CONFIG_SND_MPU401_UART=m |
1018 | CONFIG_SND_AC97_CODEC=m | 1036 | CONFIG_SND_AC97_CODEC=m |
1037 | CONFIG_SND_DRIVERS=y | ||
1019 | CONFIG_SND_DUMMY=m | 1038 | CONFIG_SND_DUMMY=m |
1020 | CONFIG_SND_VIRMIDI=m | 1039 | CONFIG_SND_VIRMIDI=m |
1021 | CONFIG_SND_MTPAV=m | 1040 | CONFIG_SND_MTPAV=m |
1022 | # CONFIG_SND_SERIAL_U16550 is not set | 1041 | # CONFIG_SND_SERIAL_U16550 is not set |
1023 | # CONFIG_SND_MPU401 is not set | 1042 | # CONFIG_SND_MPU401 is not set |
1024 | 1043 | # CONFIG_SND_AC97_POWER_SAVE is not set | |
1025 | # | 1044 | CONFIG_SND_PCI=y |
1026 | # PCI devices | ||
1027 | # | ||
1028 | # CONFIG_SND_AD1889 is not set | 1045 | # CONFIG_SND_AD1889 is not set |
1029 | # CONFIG_SND_ALS300 is not set | 1046 | # CONFIG_SND_ALS300 is not set |
1030 | CONFIG_SND_ALI5451=m | 1047 | CONFIG_SND_ALI5451=m |
@@ -1084,37 +1101,14 @@ CONFIG_SND_ALI5451=m | |||
1084 | # CONFIG_SND_VIRTUOSO is not set | 1101 | # CONFIG_SND_VIRTUOSO is not set |
1085 | # CONFIG_SND_VX222 is not set | 1102 | # CONFIG_SND_VX222 is not set |
1086 | # CONFIG_SND_YMFPCI is not set | 1103 | # CONFIG_SND_YMFPCI is not set |
1087 | # CONFIG_SND_AC97_POWER_SAVE is not set | 1104 | CONFIG_SND_USB=y |
1088 | |||
1089 | # | ||
1090 | # USB devices | ||
1091 | # | ||
1092 | # CONFIG_SND_USB_AUDIO is not set | 1105 | # CONFIG_SND_USB_AUDIO is not set |
1093 | # CONFIG_SND_USB_CAIAQ is not set | 1106 | # CONFIG_SND_USB_CAIAQ is not set |
1094 | 1107 | CONFIG_SND_SPARC=y | |
1095 | # | ||
1096 | # ALSA Sparc devices | ||
1097 | # | ||
1098 | # CONFIG_SND_SUN_AMD7930 is not set | 1108 | # CONFIG_SND_SUN_AMD7930 is not set |
1099 | CONFIG_SND_SUN_CS4231=m | 1109 | CONFIG_SND_SUN_CS4231=m |
1100 | # CONFIG_SND_SUN_DBRI is not set | 1110 | # CONFIG_SND_SUN_DBRI is not set |
1101 | |||
1102 | # | ||
1103 | # System on Chip audio support | ||
1104 | # | ||
1105 | # CONFIG_SND_SOC is not set | 1111 | # CONFIG_SND_SOC is not set |
1106 | |||
1107 | # | ||
1108 | # ALSA SoC audio for Freescale SOCs | ||
1109 | # | ||
1110 | |||
1111 | # | ||
1112 | # SoC Audio for the Texas Instruments OMAP | ||
1113 | # | ||
1114 | |||
1115 | # | ||
1116 | # Open Sound System | ||
1117 | # | ||
1118 | # CONFIG_SOUND_PRIME is not set | 1112 | # CONFIG_SOUND_PRIME is not set |
1119 | CONFIG_AC97_BUS=m | 1113 | CONFIG_AC97_BUS=m |
1120 | CONFIG_HID_SUPPORT=y | 1114 | CONFIG_HID_SUPPORT=y |
@@ -1167,6 +1161,7 @@ CONFIG_USB_UHCI_HCD=m | |||
1167 | # | 1161 | # |
1168 | # CONFIG_USB_ACM is not set | 1162 | # CONFIG_USB_ACM is not set |
1169 | # CONFIG_USB_PRINTER is not set | 1163 | # CONFIG_USB_PRINTER is not set |
1164 | # CONFIG_USB_WDM is not set | ||
1170 | 1165 | ||
1171 | # | 1166 | # |
1172 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | 1167 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' |
@@ -1226,6 +1221,7 @@ CONFIG_USB_STORAGE=m | |||
1226 | # CONFIG_USB_TRANCEVIBRATOR is not set | 1221 | # CONFIG_USB_TRANCEVIBRATOR is not set |
1227 | # CONFIG_USB_IOWARRIOR is not set | 1222 | # CONFIG_USB_IOWARRIOR is not set |
1228 | # CONFIG_USB_TEST is not set | 1223 | # CONFIG_USB_TEST is not set |
1224 | # CONFIG_USB_ISIGHTFW is not set | ||
1229 | # CONFIG_USB_GADGET is not set | 1225 | # CONFIG_USB_GADGET is not set |
1230 | # CONFIG_MMC is not set | 1226 | # CONFIG_MMC is not set |
1231 | # CONFIG_MEMSTICK is not set | 1227 | # CONFIG_MEMSTICK is not set |
@@ -1420,6 +1416,12 @@ CONFIG_DEBUG_BUGVERBOSE=y | |||
1420 | # CONFIG_BACKTRACE_SELF_TEST is not set | 1416 | # CONFIG_BACKTRACE_SELF_TEST is not set |
1421 | # CONFIG_LKDTM is not set | 1417 | # CONFIG_LKDTM is not set |
1422 | # CONFIG_FAULT_INJECTION is not set | 1418 | # CONFIG_FAULT_INJECTION is not set |
1419 | CONFIG_HAVE_FTRACE=y | ||
1420 | CONFIG_HAVE_DYNAMIC_FTRACE=y | ||
1421 | # CONFIG_FTRACE is not set | ||
1422 | # CONFIG_IRQSOFF_TRACER is not set | ||
1423 | # CONFIG_SCHED_TRACER is not set | ||
1424 | # CONFIG_CONTEXT_SWITCH_TRACER is not set | ||
1423 | # CONFIG_SAMPLES is not set | 1425 | # CONFIG_SAMPLES is not set |
1424 | CONFIG_HAVE_ARCH_KGDB=y | 1426 | CONFIG_HAVE_ARCH_KGDB=y |
1425 | # CONFIG_KGDB is not set | 1427 | # CONFIG_KGDB is not set |
@@ -1486,6 +1488,10 @@ CONFIG_CRYPTO_CRC32C=m | |||
1486 | CONFIG_CRYPTO_MD4=y | 1488 | CONFIG_CRYPTO_MD4=y |
1487 | CONFIG_CRYPTO_MD5=y | 1489 | CONFIG_CRYPTO_MD5=y |
1488 | CONFIG_CRYPTO_MICHAEL_MIC=m | 1490 | CONFIG_CRYPTO_MICHAEL_MIC=m |
1491 | # CONFIG_CRYPTO_RMD128 is not set | ||
1492 | # CONFIG_CRYPTO_RMD160 is not set | ||
1493 | # CONFIG_CRYPTO_RMD256 is not set | ||
1494 | # CONFIG_CRYPTO_RMD320 is not set | ||
1489 | CONFIG_CRYPTO_SHA1=y | 1495 | CONFIG_CRYPTO_SHA1=y |
1490 | CONFIG_CRYPTO_SHA256=m | 1496 | CONFIG_CRYPTO_SHA256=m |
1491 | CONFIG_CRYPTO_SHA512=m | 1497 | CONFIG_CRYPTO_SHA512=m |
@@ -1527,6 +1533,7 @@ CONFIG_BITREVERSE=y | |||
1527 | # CONFIG_GENERIC_FIND_FIRST_BIT is not set | 1533 | # CONFIG_GENERIC_FIND_FIRST_BIT is not set |
1528 | CONFIG_CRC_CCITT=m | 1534 | CONFIG_CRC_CCITT=m |
1529 | CONFIG_CRC16=m | 1535 | CONFIG_CRC16=m |
1536 | # CONFIG_CRC_T10DIF is not set | ||
1530 | # CONFIG_CRC_ITU_T is not set | 1537 | # CONFIG_CRC_ITU_T is not set |
1531 | CONFIG_CRC32=y | 1538 | CONFIG_CRC32=y |
1532 | # CONFIG_CRC7 is not set | 1539 | # CONFIG_CRC7 is not set |
diff --git a/arch/sparc64/kernel/central.c b/arch/sparc64/kernel/central.c index b61b8dfb09cf..f2e87d0d7e1d 100644 --- a/arch/sparc64/kernel/central.c +++ b/arch/sparc64/kernel/central.c | |||
@@ -16,8 +16,8 @@ | |||
16 | #include <asm/fhc.h> | 16 | #include <asm/fhc.h> |
17 | #include <asm/starfire.h> | 17 | #include <asm/starfire.h> |
18 | 18 | ||
19 | struct linux_central *central_bus = NULL; | 19 | static struct linux_central *central_bus = NULL; |
20 | struct linux_fhc *fhc_list = NULL; | 20 | static struct linux_fhc *fhc_list = NULL; |
21 | 21 | ||
22 | #define IS_CENTRAL_FHC(__fhc) ((__fhc) == central_bus->child) | 22 | #define IS_CENTRAL_FHC(__fhc) ((__fhc) == central_bus->child) |
23 | 23 | ||
@@ -79,9 +79,9 @@ static void adjust_regs(struct linux_prom_registers *regp, int nregs, | |||
79 | } | 79 | } |
80 | 80 | ||
81 | /* Apply probed fhc ranges to registers passed, if no ranges return. */ | 81 | /* Apply probed fhc ranges to registers passed, if no ranges return. */ |
82 | void apply_fhc_ranges(struct linux_fhc *fhc, | 82 | static void apply_fhc_ranges(struct linux_fhc *fhc, |
83 | struct linux_prom_registers *regs, | 83 | struct linux_prom_registers *regs, |
84 | int nregs) | 84 | int nregs) |
85 | { | 85 | { |
86 | if (fhc->num_fhc_ranges) | 86 | if (fhc->num_fhc_ranges) |
87 | adjust_regs(regs, nregs, fhc->fhc_ranges, | 87 | adjust_regs(regs, nregs, fhc->fhc_ranges, |
@@ -89,8 +89,8 @@ void apply_fhc_ranges(struct linux_fhc *fhc, | |||
89 | } | 89 | } |
90 | 90 | ||
91 | /* Apply probed central ranges to registers passed, if no ranges return. */ | 91 | /* Apply probed central ranges to registers passed, if no ranges return. */ |
92 | void apply_central_ranges(struct linux_central *central, | 92 | static void apply_central_ranges(struct linux_central *central, |
93 | struct linux_prom_registers *regs, int nregs) | 93 | struct linux_prom_registers *regs, int nregs) |
94 | { | 94 | { |
95 | if (central->num_central_ranges) | 95 | if (central->num_central_ranges) |
96 | adjust_regs(regs, nregs, central->central_ranges, | 96 | adjust_regs(regs, nregs, central->central_ranges, |
diff --git a/arch/sparc64/kernel/ds.c b/arch/sparc64/kernel/ds.c index edb74f5a1186..d0fa5aa38934 100644 --- a/arch/sparc64/kernel/ds.c +++ b/arch/sparc64/kernel/ds.c | |||
@@ -159,7 +159,7 @@ static void ds_var_data(struct ds_info *dp, | |||
159 | struct ds_cap_state *cp, | 159 | struct ds_cap_state *cp, |
160 | void *buf, int len); | 160 | void *buf, int len); |
161 | 161 | ||
162 | struct ds_cap_state ds_states_template[] = { | 162 | static struct ds_cap_state ds_states_template[] = { |
163 | { | 163 | { |
164 | .service_id = "md-update", | 164 | .service_id = "md-update", |
165 | .data = md_update_data, | 165 | .data = md_update_data, |
diff --git a/arch/sparc64/kernel/ebus.c b/arch/sparc64/kernel/ebus.c index c49d0388b793..4d58d7ce708d 100644 --- a/arch/sparc64/kernel/ebus.c +++ b/arch/sparc64/kernel/ebus.c | |||
@@ -401,7 +401,7 @@ static void __init fill_ebus_device(struct device_node *dp, struct linux_ebus_de | |||
401 | dev->ofdev.node = dp; | 401 | dev->ofdev.node = dp; |
402 | dev->ofdev.dev.parent = &dev->bus->ofdev.dev; | 402 | dev->ofdev.dev.parent = &dev->bus->ofdev.dev; |
403 | dev->ofdev.dev.bus = &ebus_bus_type; | 403 | dev->ofdev.dev.bus = &ebus_bus_type; |
404 | sprintf(dev->ofdev.dev.bus_id, "ebus[%08x]", dp->node); | 404 | dev_set_name(&dev->ofdev.dev, "ebus[%08x]", dp->node); |
405 | 405 | ||
406 | /* Register with core */ | 406 | /* Register with core */ |
407 | if (of_device_register(&dev->ofdev) != 0) | 407 | if (of_device_register(&dev->ofdev) != 0) |
@@ -501,7 +501,7 @@ void __init ebus_init(void) | |||
501 | ebus->ofdev.node = dp; | 501 | ebus->ofdev.node = dp; |
502 | ebus->ofdev.dev.parent = &pdev->dev; | 502 | ebus->ofdev.dev.parent = &pdev->dev; |
503 | ebus->ofdev.dev.bus = &ebus_bus_type; | 503 | ebus->ofdev.dev.bus = &ebus_bus_type; |
504 | sprintf(ebus->ofdev.dev.bus_id, "ebus%d", num_ebus); | 504 | dev_set_name(&ebus->ofdev.dev, "ebus%d", num_ebus); |
505 | 505 | ||
506 | /* Register with core */ | 506 | /* Register with core */ |
507 | if (of_device_register(&ebus->ofdev) != 0) | 507 | if (of_device_register(&ebus->ofdev) != 0) |
diff --git a/arch/sparc64/kernel/hvapi.c b/arch/sparc64/kernel/hvapi.c index f34f5d6181ef..691760b5b012 100644 --- a/arch/sparc64/kernel/hvapi.c +++ b/arch/sparc64/kernel/hvapi.c | |||
@@ -34,8 +34,12 @@ static struct api_info api_table[] = { | |||
34 | { .group = HV_GRP_LDOM, }, | 34 | { .group = HV_GRP_LDOM, }, |
35 | { .group = HV_GRP_SVC_CHAN, .flags = FLAG_PRE_API }, | 35 | { .group = HV_GRP_SVC_CHAN, .flags = FLAG_PRE_API }, |
36 | { .group = HV_GRP_NCS, .flags = FLAG_PRE_API }, | 36 | { .group = HV_GRP_NCS, .flags = FLAG_PRE_API }, |
37 | { .group = HV_GRP_RNG, }, | ||
37 | { .group = HV_GRP_NIAG_PERF, .flags = FLAG_PRE_API }, | 38 | { .group = HV_GRP_NIAG_PERF, .flags = FLAG_PRE_API }, |
38 | { .group = HV_GRP_FIRE_PERF, }, | 39 | { .group = HV_GRP_FIRE_PERF, }, |
40 | { .group = HV_GRP_N2_CPU, }, | ||
41 | { .group = HV_GRP_NIU, }, | ||
42 | { .group = HV_GRP_VF_CPU, }, | ||
39 | { .group = HV_GRP_DIAG, .flags = FLAG_PRE_API }, | 43 | { .group = HV_GRP_DIAG, .flags = FLAG_PRE_API }, |
40 | }; | 44 | }; |
41 | 45 | ||
diff --git a/arch/sparc64/kernel/of_device.c b/arch/sparc64/kernel/of_device.c index d569f60c24b8..4fd48ab7dda4 100644 --- a/arch/sparc64/kernel/of_device.c +++ b/arch/sparc64/kernel/of_device.c | |||
@@ -797,9 +797,9 @@ static struct of_device * __init scan_one_device(struct device_node *dp, | |||
797 | op->dev.parent = parent; | 797 | op->dev.parent = parent; |
798 | op->dev.bus = &of_platform_bus_type; | 798 | op->dev.bus = &of_platform_bus_type; |
799 | if (!parent) | 799 | if (!parent) |
800 | strcpy(op->dev.bus_id, "root"); | 800 | dev_set_name(&op->dev, "root"); |
801 | else | 801 | else |
802 | sprintf(op->dev.bus_id, "%08x", dp->node); | 802 | dev_set_name(&op->dev, "%08x", dp->node); |
803 | 803 | ||
804 | if (of_device_register(op)) { | 804 | if (of_device_register(op)) { |
805 | printk("%s: Could not register of device.\n", | 805 | printk("%s: Could not register of device.\n", |
diff --git a/arch/sparc64/kernel/pci.c b/arch/sparc64/kernel/pci.c index d00a3656c287..55096195458f 100644 --- a/arch/sparc64/kernel/pci.c +++ b/arch/sparc64/kernel/pci.c | |||
@@ -408,7 +408,7 @@ struct pci_dev *of_create_pci_dev(struct pci_pbm_info *pbm, | |||
408 | dev->class = class >> 8; | 408 | dev->class = class >> 8; |
409 | dev->revision = class & 0xff; | 409 | dev->revision = class & 0xff; |
410 | 410 | ||
411 | sprintf(dev->dev.bus_id, "%04x:%02x:%02x.%d", pci_domain_nr(bus), | 411 | dev_set_name(&dev->dev, "%04x:%02x:%02x.%d", pci_domain_nr(bus), |
412 | dev->bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn)); | 412 | dev->bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn)); |
413 | 413 | ||
414 | if (ofpci_verbose) | 414 | if (ofpci_verbose) |
diff --git a/arch/sparc64/kernel/pci_msi.c b/arch/sparc64/kernel/pci_msi.c index db5e8fd8f674..60c71e350212 100644 --- a/arch/sparc64/kernel/pci_msi.c +++ b/arch/sparc64/kernel/pci_msi.c | |||
@@ -120,9 +120,9 @@ static struct irq_chip msi_irq = { | |||
120 | /* XXX affinity XXX */ | 120 | /* XXX affinity XXX */ |
121 | }; | 121 | }; |
122 | 122 | ||
123 | int sparc64_setup_msi_irq(unsigned int *virt_irq_p, | 123 | static int sparc64_setup_msi_irq(unsigned int *virt_irq_p, |
124 | struct pci_dev *pdev, | 124 | struct pci_dev *pdev, |
125 | struct msi_desc *entry) | 125 | struct msi_desc *entry) |
126 | { | 126 | { |
127 | struct pci_pbm_info *pbm = pdev->dev.archdata.host_controller; | 127 | struct pci_pbm_info *pbm = pdev->dev.archdata.host_controller; |
128 | const struct sparc64_msiq_ops *ops = pbm->msi_ops; | 128 | const struct sparc64_msiq_ops *ops = pbm->msi_ops; |
@@ -179,8 +179,8 @@ out_err: | |||
179 | return err; | 179 | return err; |
180 | } | 180 | } |
181 | 181 | ||
182 | void sparc64_teardown_msi_irq(unsigned int virt_irq, | 182 | static void sparc64_teardown_msi_irq(unsigned int virt_irq, |
183 | struct pci_dev *pdev) | 183 | struct pci_dev *pdev) |
184 | { | 184 | { |
185 | struct pci_pbm_info *pbm = pdev->dev.archdata.host_controller; | 185 | struct pci_pbm_info *pbm = pdev->dev.archdata.host_controller; |
186 | const struct sparc64_msiq_ops *ops = pbm->msi_ops; | 186 | const struct sparc64_msiq_ops *ops = pbm->msi_ops; |
diff --git a/arch/sparc64/kernel/pci_sun4v.c b/arch/sparc64/kernel/pci_sun4v.c index e2bb9790039c..a104c80d319d 100644 --- a/arch/sparc64/kernel/pci_sun4v.c +++ b/arch/sparc64/kernel/pci_sun4v.c | |||
@@ -531,7 +531,7 @@ static void dma_4v_sync_sg_for_cpu(struct device *dev, | |||
531 | /* Nothing to do... */ | 531 | /* Nothing to do... */ |
532 | } | 532 | } |
533 | 533 | ||
534 | const struct dma_ops sun4v_dma_ops = { | 534 | static const struct dma_ops sun4v_dma_ops = { |
535 | .alloc_coherent = dma_4v_alloc_coherent, | 535 | .alloc_coherent = dma_4v_alloc_coherent, |
536 | .free_coherent = dma_4v_free_coherent, | 536 | .free_coherent = dma_4v_free_coherent, |
537 | .map_single = dma_4v_map_single, | 537 | .map_single = dma_4v_map_single, |
diff --git a/arch/sparc64/kernel/process.c b/arch/sparc64/kernel/process.c index 2084f81a76e1..31ea752d307b 100644 --- a/arch/sparc64/kernel/process.c +++ b/arch/sparc64/kernel/process.c | |||
@@ -15,7 +15,6 @@ | |||
15 | #include <linux/module.h> | 15 | #include <linux/module.h> |
16 | #include <linux/sched.h> | 16 | #include <linux/sched.h> |
17 | #include <linux/kernel.h> | 17 | #include <linux/kernel.h> |
18 | #include <linux/kallsyms.h> | ||
19 | #include <linux/mm.h> | 18 | #include <linux/mm.h> |
20 | #include <linux/fs.h> | 19 | #include <linux/fs.h> |
21 | #include <linux/smp.h> | 20 | #include <linux/smp.h> |
@@ -211,7 +210,7 @@ static void show_regwindow(struct pt_regs *regs) | |||
211 | printk("i4: %016lx i5: %016lx i6: %016lx i7: %016lx\n", | 210 | printk("i4: %016lx i5: %016lx i6: %016lx i7: %016lx\n", |
212 | rwk->ins[4], rwk->ins[5], rwk->ins[6], rwk->ins[7]); | 211 | rwk->ins[4], rwk->ins[5], rwk->ins[6], rwk->ins[7]); |
213 | if (regs->tstate & TSTATE_PRIV) | 212 | if (regs->tstate & TSTATE_PRIV) |
214 | print_symbol("I7: <%s>\n", rwk->ins[7]); | 213 | printk("I7: <%pS>\n", (void *) rwk->ins[7]); |
215 | } | 214 | } |
216 | 215 | ||
217 | #ifdef CONFIG_SMP | 216 | #ifdef CONFIG_SMP |
@@ -232,7 +231,7 @@ void __show_regs(struct pt_regs * regs) | |||
232 | #endif | 231 | #endif |
233 | printk("TSTATE: %016lx TPC: %016lx TNPC: %016lx Y: %08x %s\n", regs->tstate, | 232 | printk("TSTATE: %016lx TPC: %016lx TNPC: %016lx Y: %08x %s\n", regs->tstate, |
234 | regs->tpc, regs->tnpc, regs->y, print_tainted()); | 233 | regs->tpc, regs->tnpc, regs->y, print_tainted()); |
235 | print_symbol("TPC: <%s>\n", regs->tpc); | 234 | printk("TPC: <%pS>\n", (void *) regs->tpc); |
236 | printk("g0: %016lx g1: %016lx g2: %016lx g3: %016lx\n", | 235 | printk("g0: %016lx g1: %016lx g2: %016lx g3: %016lx\n", |
237 | regs->u_regs[0], regs->u_regs[1], regs->u_regs[2], | 236 | regs->u_regs[0], regs->u_regs[1], regs->u_regs[2], |
238 | regs->u_regs[3]); | 237 | regs->u_regs[3]); |
@@ -245,7 +244,7 @@ void __show_regs(struct pt_regs * regs) | |||
245 | printk("o4: %016lx o5: %016lx sp: %016lx ret_pc: %016lx\n", | 244 | printk("o4: %016lx o5: %016lx sp: %016lx ret_pc: %016lx\n", |
246 | regs->u_regs[12], regs->u_regs[13], regs->u_regs[14], | 245 | regs->u_regs[12], regs->u_regs[13], regs->u_regs[14], |
247 | regs->u_regs[15]); | 246 | regs->u_regs[15]); |
248 | print_symbol("RPC: <%s>\n", regs->u_regs[15]); | 247 | printk("RPC: <%pS>\n", (void *) regs->u_regs[15]); |
249 | show_regwindow(regs); | 248 | show_regwindow(regs); |
250 | #ifdef CONFIG_SMP | 249 | #ifdef CONFIG_SMP |
251 | spin_unlock(®dump_lock); | 250 | spin_unlock(®dump_lock); |
@@ -346,9 +345,6 @@ static void sysrq_handle_globreg(int key, struct tty_struct *tty) | |||
346 | { | 345 | { |
347 | struct thread_info *tp = current_thread_info(); | 346 | struct thread_info *tp = current_thread_info(); |
348 | struct pt_regs *regs = get_irq_regs(); | 347 | struct pt_regs *regs = get_irq_regs(); |
349 | #ifdef CONFIG_KALLSYMS | ||
350 | char buffer[KSYM_SYMBOL_LEN]; | ||
351 | #endif | ||
352 | unsigned long flags; | 348 | unsigned long flags; |
353 | int this_cpu, cpu; | 349 | int this_cpu, cpu; |
354 | 350 | ||
@@ -377,17 +373,13 @@ static void sysrq_handle_globreg(int key, struct tty_struct *tty) | |||
377 | gp->tstate, gp->tpc, gp->tnpc, | 373 | gp->tstate, gp->tpc, gp->tnpc, |
378 | ((tp && tp->task) ? tp->task->comm : "NULL"), | 374 | ((tp && tp->task) ? tp->task->comm : "NULL"), |
379 | ((tp && tp->task) ? tp->task->pid : -1)); | 375 | ((tp && tp->task) ? tp->task->pid : -1)); |
380 | #ifdef CONFIG_KALLSYMS | 376 | |
381 | if (gp->tstate & TSTATE_PRIV) { | 377 | if (gp->tstate & TSTATE_PRIV) { |
382 | sprint_symbol(buffer, gp->tpc); | 378 | printk(" TPC[%pS] O7[%pS] I7[%pS]\n", |
383 | printk(" TPC[%s] ", buffer); | 379 | (void *) gp->tpc, |
384 | sprint_symbol(buffer, gp->o7); | 380 | (void *) gp->o7, |
385 | printk("O7[%s] ", buffer); | 381 | (void *) gp->i7); |
386 | sprint_symbol(buffer, gp->i7); | 382 | } else { |
387 | printk("I7[%s]\n", buffer); | ||
388 | } else | ||
389 | #endif | ||
390 | { | ||
391 | printk(" TPC[%lx] O7[%lx] I7[%lx]\n", | 383 | printk(" TPC[%lx] O7[%lx] I7[%lx]\n", |
392 | gp->tpc, gp->o7, gp->i7); | 384 | gp->tpc, gp->o7, gp->i7); |
393 | } | 385 | } |
@@ -691,9 +683,9 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long sp, | |||
691 | ((unsigned long) child_sf) - STACK_BIAS; | 683 | ((unsigned long) child_sf) - STACK_BIAS; |
692 | 684 | ||
693 | /* Special case, if we are spawning a kernel thread from | 685 | /* Special case, if we are spawning a kernel thread from |
694 | * a userspace task (via KMOD, NFS, or similar) we must | 686 | * a userspace task (usermode helper, NFS or similar), we |
695 | * disable performance counters in the child because the | 687 | * must disable performance counters in the child because |
696 | * address space and protection realm are changing. | 688 | * the address space and protection realm are changing. |
697 | */ | 689 | */ |
698 | if (t->flags & _TIF_PERFCTR) { | 690 | if (t->flags & _TIF_PERFCTR) { |
699 | t->user_cntd0 = t->user_cntd1 = NULL; | 691 | t->user_cntd0 = t->user_cntd1 = NULL; |
diff --git a/arch/sparc64/kernel/smp.c b/arch/sparc64/kernel/smp.c index c099d96f1239..7cf72b4bb108 100644 --- a/arch/sparc64/kernel/smp.c +++ b/arch/sparc64/kernel/smp.c | |||
@@ -788,89 +788,36 @@ static void smp_start_sync_tick_client(int cpu) | |||
788 | 0, 0, 0, mask); | 788 | 0, 0, 0, mask); |
789 | } | 789 | } |
790 | 790 | ||
791 | /* Send cross call to all processors except self. */ | ||
792 | #define smp_cross_call(func, ctx, data1, data2) \ | ||
793 | smp_cross_call_masked(func, ctx, data1, data2, cpu_online_map) | ||
794 | |||
795 | struct call_data_struct { | ||
796 | void (*func) (void *info); | ||
797 | void *info; | ||
798 | atomic_t finished; | ||
799 | int wait; | ||
800 | }; | ||
801 | |||
802 | static struct call_data_struct *call_data; | ||
803 | |||
804 | extern unsigned long xcall_call_function; | 791 | extern unsigned long xcall_call_function; |
805 | 792 | ||
806 | /** | 793 | void arch_send_call_function_ipi(cpumask_t mask) |
807 | * smp_call_function(): Run a function on all other CPUs. | ||
808 | * @func: The function to run. This must be fast and non-blocking. | ||
809 | * @info: An arbitrary pointer to pass to the function. | ||
810 | * @wait: If true, wait (atomically) until function has completed on other CPUs. | ||
811 | * | ||
812 | * Returns 0 on success, else a negative status code. Does not return until | ||
813 | * remote CPUs are nearly ready to execute <<func>> or are or have executed. | ||
814 | * | ||
815 | * You must not call this function with disabled interrupts or from a | ||
816 | * hardware interrupt handler or from a bottom half handler. | ||
817 | */ | ||
818 | static int sparc64_smp_call_function_mask(void (*func)(void *info), void *info, | ||
819 | int wait, cpumask_t mask) | ||
820 | { | 794 | { |
821 | struct call_data_struct data; | ||
822 | int cpus; | ||
823 | |||
824 | /* Can deadlock when called with interrupts disabled */ | ||
825 | WARN_ON(irqs_disabled()); | ||
826 | |||
827 | data.func = func; | ||
828 | data.info = info; | ||
829 | atomic_set(&data.finished, 0); | ||
830 | data.wait = wait; | ||
831 | |||
832 | spin_lock(&call_lock); | ||
833 | |||
834 | cpu_clear(smp_processor_id(), mask); | ||
835 | cpus = cpus_weight(mask); | ||
836 | if (!cpus) | ||
837 | goto out_unlock; | ||
838 | |||
839 | call_data = &data; | ||
840 | mb(); | ||
841 | |||
842 | smp_cross_call_masked(&xcall_call_function, 0, 0, 0, mask); | 795 | smp_cross_call_masked(&xcall_call_function, 0, 0, 0, mask); |
796 | } | ||
843 | 797 | ||
844 | /* Wait for response */ | 798 | extern unsigned long xcall_call_function_single; |
845 | while (atomic_read(&data.finished) != cpus) | ||
846 | cpu_relax(); | ||
847 | 799 | ||
848 | out_unlock: | 800 | void arch_send_call_function_single_ipi(int cpu) |
849 | spin_unlock(&call_lock); | 801 | { |
802 | cpumask_t mask = cpumask_of_cpu(cpu); | ||
850 | 803 | ||
851 | return 0; | 804 | smp_cross_call_masked(&xcall_call_function_single, 0, 0, 0, mask); |
852 | } | 805 | } |
853 | 806 | ||
854 | int smp_call_function(void (*func)(void *info), void *info, int wait) | 807 | /* Send cross call to all processors except self. */ |
855 | { | 808 | #define smp_cross_call(func, ctx, data1, data2) \ |
856 | return sparc64_smp_call_function_mask(func, info, wait, cpu_online_map); | 809 | smp_cross_call_masked(func, ctx, data1, data2, cpu_online_map) |
857 | } | ||
858 | 810 | ||
859 | void smp_call_function_client(int irq, struct pt_regs *regs) | 811 | void smp_call_function_client(int irq, struct pt_regs *regs) |
860 | { | 812 | { |
861 | void (*func) (void *info) = call_data->func; | 813 | clear_softint(1 << irq); |
862 | void *info = call_data->info; | 814 | generic_smp_call_function_interrupt(); |
815 | } | ||
863 | 816 | ||
817 | void smp_call_function_single_client(int irq, struct pt_regs *regs) | ||
818 | { | ||
864 | clear_softint(1 << irq); | 819 | clear_softint(1 << irq); |
865 | if (call_data->wait) { | 820 | generic_smp_call_function_single_interrupt(); |
866 | /* let initiator proceed only after completion */ | ||
867 | func(info); | ||
868 | atomic_inc(&call_data->finished); | ||
869 | } else { | ||
870 | /* let initiator proceed after getting data */ | ||
871 | atomic_inc(&call_data->finished); | ||
872 | func(info); | ||
873 | } | ||
874 | } | 821 | } |
875 | 822 | ||
876 | static void tsb_sync(void *info) | 823 | static void tsb_sync(void *info) |
@@ -890,7 +837,7 @@ static void tsb_sync(void *info) | |||
890 | 837 | ||
891 | void smp_tsb_sync(struct mm_struct *mm) | 838 | void smp_tsb_sync(struct mm_struct *mm) |
892 | { | 839 | { |
893 | sparc64_smp_call_function_mask(tsb_sync, mm, 1, mm->cpu_vm_mask); | 840 | smp_call_function_mask(mm->cpu_vm_mask, tsb_sync, mm, 1); |
894 | } | 841 | } |
895 | 842 | ||
896 | extern unsigned long xcall_flush_tlb_mm; | 843 | extern unsigned long xcall_flush_tlb_mm; |
diff --git a/arch/sparc64/kernel/sparc64_ksyms.c b/arch/sparc64/kernel/sparc64_ksyms.c index 49d3ea50c247..504e678ee128 100644 --- a/arch/sparc64/kernel/sparc64_ksyms.c +++ b/arch/sparc64/kernel/sparc64_ksyms.c | |||
@@ -108,8 +108,6 @@ EXPORT_SYMBOL(__read_unlock); | |||
108 | EXPORT_SYMBOL(__write_lock); | 108 | EXPORT_SYMBOL(__write_lock); |
109 | EXPORT_SYMBOL(__write_unlock); | 109 | EXPORT_SYMBOL(__write_unlock); |
110 | EXPORT_SYMBOL(__write_trylock); | 110 | EXPORT_SYMBOL(__write_trylock); |
111 | |||
112 | EXPORT_SYMBOL(smp_call_function); | ||
113 | #endif /* CONFIG_SMP */ | 111 | #endif /* CONFIG_SMP */ |
114 | 112 | ||
115 | #ifdef CONFIG_MCOUNT | 113 | #ifdef CONFIG_MCOUNT |
diff --git a/arch/sparc64/kernel/sys_sparc.c b/arch/sparc64/kernel/sys_sparc.c index ac1bff58c1ac..e1f4eba2e576 100644 --- a/arch/sparc64/kernel/sys_sparc.c +++ b/arch/sparc64/kernel/sys_sparc.c | |||
@@ -542,7 +542,7 @@ asmlinkage long sparc64_personality(unsigned long personality) | |||
542 | return ret; | 542 | return ret; |
543 | } | 543 | } |
544 | 544 | ||
545 | int sparc64_mmap_check(unsigned long addr, unsigned long len) | 545 | int sparc_mmap_check(unsigned long addr, unsigned long len) |
546 | { | 546 | { |
547 | if (test_thread_flag(TIF_32BIT)) { | 547 | if (test_thread_flag(TIF_32BIT)) { |
548 | if (len >= STACK_TOP32) | 548 | if (len >= STACK_TOP32) |
@@ -614,9 +614,9 @@ asmlinkage unsigned long sys64_mremap(unsigned long addr, | |||
614 | goto out; | 614 | goto out; |
615 | if (unlikely(new_len >= VA_EXCLUDE_START)) | 615 | if (unlikely(new_len >= VA_EXCLUDE_START)) |
616 | goto out; | 616 | goto out; |
617 | if (unlikely(sparc64_mmap_check(addr, old_len))) | 617 | if (unlikely(sparc_mmap_check(addr, old_len))) |
618 | goto out; | 618 | goto out; |
619 | if (unlikely(sparc64_mmap_check(new_addr, new_len))) | 619 | if (unlikely(sparc_mmap_check(new_addr, new_len))) |
620 | goto out; | 620 | goto out; |
621 | 621 | ||
622 | down_write(¤t->mm->mmap_sem); | 622 | down_write(¤t->mm->mmap_sem); |
diff --git a/arch/sparc64/kernel/sys_sparc32.c b/arch/sparc64/kernel/sys_sparc32.c index ba5bd626b39e..97b77fb5c50e 100644 --- a/arch/sparc64/kernel/sys_sparc32.c +++ b/arch/sparc64/kernel/sys_sparc32.c | |||
@@ -359,7 +359,8 @@ int cp_compat_stat(struct kstat *stat, struct compat_stat __user *statbuf) | |||
359 | return err; | 359 | return err; |
360 | } | 360 | } |
361 | 361 | ||
362 | int cp_compat_stat64(struct kstat *stat, struct compat_stat64 __user *statbuf) | 362 | static int cp_compat_stat64(struct kstat *stat, |
363 | struct compat_stat64 __user *statbuf) | ||
363 | { | 364 | { |
364 | int err; | 365 | int err; |
365 | 366 | ||
@@ -870,9 +871,9 @@ asmlinkage unsigned long sys32_mremap(unsigned long addr, | |||
870 | unsigned long ret = -EINVAL; | 871 | unsigned long ret = -EINVAL; |
871 | unsigned long new_addr = __new_addr; | 872 | unsigned long new_addr = __new_addr; |
872 | 873 | ||
873 | if (unlikely(sparc64_mmap_check(addr, old_len))) | 874 | if (unlikely(sparc_mmap_check(addr, old_len))) |
874 | goto out; | 875 | goto out; |
875 | if (unlikely(sparc64_mmap_check(new_addr, new_len))) | 876 | if (unlikely(sparc_mmap_check(new_addr, new_len))) |
876 | goto out; | 877 | goto out; |
877 | down_write(¤t->mm->mmap_sem); | 878 | down_write(¤t->mm->mmap_sem); |
878 | ret = do_mremap(addr, old_len, new_len, flags, new_addr); | 879 | ret = do_mremap(addr, old_len, new_len, flags, new_addr); |
diff --git a/arch/sparc64/kernel/sysfs.c b/arch/sparc64/kernel/sysfs.c index e885034a6b73..84e5ce146713 100644 --- a/arch/sparc64/kernel/sysfs.c +++ b/arch/sparc64/kernel/sysfs.c | |||
@@ -14,7 +14,8 @@ | |||
14 | static DEFINE_PER_CPU(struct hv_mmu_statistics, mmu_stats) __attribute__((aligned(64))); | 14 | static DEFINE_PER_CPU(struct hv_mmu_statistics, mmu_stats) __attribute__((aligned(64))); |
15 | 15 | ||
16 | #define SHOW_MMUSTAT_ULONG(NAME) \ | 16 | #define SHOW_MMUSTAT_ULONG(NAME) \ |
17 | static ssize_t show_##NAME(struct sys_device *dev, char *buf) \ | 17 | static ssize_t show_##NAME(struct sys_device *dev, \ |
18 | struct sysdev_attribute *attr, char *buf) \ | ||
18 | { \ | 19 | { \ |
19 | struct hv_mmu_statistics *p = &per_cpu(mmu_stats, dev->id); \ | 20 | struct hv_mmu_statistics *p = &per_cpu(mmu_stats, dev->id); \ |
20 | return sprintf(buf, "%lu\n", p->NAME); \ | 21 | return sprintf(buf, "%lu\n", p->NAME); \ |
@@ -135,13 +136,16 @@ static unsigned long write_mmustat_enable(unsigned long val) | |||
135 | return sun4v_mmustat_conf(ra, &orig_ra); | 136 | return sun4v_mmustat_conf(ra, &orig_ra); |
136 | } | 137 | } |
137 | 138 | ||
138 | static ssize_t show_mmustat_enable(struct sys_device *s, char *buf) | 139 | static ssize_t show_mmustat_enable(struct sys_device *s, |
140 | struct sysdev_attribute *attr, char *buf) | ||
139 | { | 141 | { |
140 | unsigned long val = run_on_cpu(s->id, read_mmustat_enable, 0); | 142 | unsigned long val = run_on_cpu(s->id, read_mmustat_enable, 0); |
141 | return sprintf(buf, "%lx\n", val); | 143 | return sprintf(buf, "%lx\n", val); |
142 | } | 144 | } |
143 | 145 | ||
144 | static ssize_t store_mmustat_enable(struct sys_device *s, const char *buf, size_t count) | 146 | static ssize_t store_mmustat_enable(struct sys_device *s, |
147 | struct sysdev_attribute *attr, const char *buf, | ||
148 | size_t count) | ||
145 | { | 149 | { |
146 | unsigned long val, err; | 150 | unsigned long val, err; |
147 | int ret = sscanf(buf, "%ld", &val); | 151 | int ret = sscanf(buf, "%ld", &val); |
@@ -179,14 +183,16 @@ static void unregister_mmu_stats(struct sys_device *s) | |||
179 | #endif | 183 | #endif |
180 | 184 | ||
181 | #define SHOW_CPUDATA_ULONG_NAME(NAME, MEMBER) \ | 185 | #define SHOW_CPUDATA_ULONG_NAME(NAME, MEMBER) \ |
182 | static ssize_t show_##NAME(struct sys_device *dev, char *buf) \ | 186 | static ssize_t show_##NAME(struct sys_device *dev, \ |
187 | struct sysdev_attribute *attr, char *buf) \ | ||
183 | { \ | 188 | { \ |
184 | cpuinfo_sparc *c = &cpu_data(dev->id); \ | 189 | cpuinfo_sparc *c = &cpu_data(dev->id); \ |
185 | return sprintf(buf, "%lu\n", c->MEMBER); \ | 190 | return sprintf(buf, "%lu\n", c->MEMBER); \ |
186 | } | 191 | } |
187 | 192 | ||
188 | #define SHOW_CPUDATA_UINT_NAME(NAME, MEMBER) \ | 193 | #define SHOW_CPUDATA_UINT_NAME(NAME, MEMBER) \ |
189 | static ssize_t show_##NAME(struct sys_device *dev, char *buf) \ | 194 | static ssize_t show_##NAME(struct sys_device *dev, \ |
195 | struct sysdev_attribute *attr, char *buf) \ | ||
190 | { \ | 196 | { \ |
191 | cpuinfo_sparc *c = &cpu_data(dev->id); \ | 197 | cpuinfo_sparc *c = &cpu_data(dev->id); \ |
192 | return sprintf(buf, "%u\n", c->MEMBER); \ | 198 | return sprintf(buf, "%u\n", c->MEMBER); \ |
diff --git a/arch/sparc64/kernel/traps.c b/arch/sparc64/kernel/traps.c index 369749262653..bd30ecba5630 100644 --- a/arch/sparc64/kernel/traps.c +++ b/arch/sparc64/kernel/traps.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* arch/sparc64/kernel/traps.c | 1 | /* arch/sparc64/kernel/traps.c |
2 | * | 2 | * |
3 | * Copyright (C) 1995,1997 David S. Miller (davem@davemloft.net) | 3 | * Copyright (C) 1995,1997,2008 David S. Miller (davem@davemloft.net) |
4 | * Copyright (C) 1997,1999,2000 Jakub Jelinek (jakub@redhat.com) | 4 | * Copyright (C) 1997,1999,2000 Jakub Jelinek (jakub@redhat.com) |
5 | */ | 5 | */ |
6 | 6 | ||
@@ -11,7 +11,6 @@ | |||
11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
12 | #include <linux/sched.h> | 12 | #include <linux/sched.h> |
13 | #include <linux/kernel.h> | 13 | #include <linux/kernel.h> |
14 | #include <linux/kallsyms.h> | ||
15 | #include <linux/signal.h> | 14 | #include <linux/signal.h> |
16 | #include <linux/smp.h> | 15 | #include <linux/smp.h> |
17 | #include <linux/mm.h> | 16 | #include <linux/mm.h> |
@@ -37,9 +36,6 @@ | |||
37 | #include <asm/processor.h> | 36 | #include <asm/processor.h> |
38 | #include <asm/timer.h> | 37 | #include <asm/timer.h> |
39 | #include <asm/head.h> | 38 | #include <asm/head.h> |
40 | #ifdef CONFIG_KMOD | ||
41 | #include <linux/kmod.h> | ||
42 | #endif | ||
43 | #include <asm/prom.h> | 39 | #include <asm/prom.h> |
44 | 40 | ||
45 | #include "entry.h" | 41 | #include "entry.h" |
@@ -74,7 +70,7 @@ static void dump_tl1_traplog(struct tl1_traplog *p) | |||
74 | i + 1, | 70 | i + 1, |
75 | p->trapstack[i].tstate, p->trapstack[i].tpc, | 71 | p->trapstack[i].tstate, p->trapstack[i].tpc, |
76 | p->trapstack[i].tnpc, p->trapstack[i].tt); | 72 | p->trapstack[i].tnpc, p->trapstack[i].tt); |
77 | print_symbol("TRAPLOG: TPC<%s>\n", p->trapstack[i].tpc); | 73 | printk("TRAPLOG: TPC<%pS>\n", (void *) p->trapstack[i].tpc); |
78 | } | 74 | } |
79 | } | 75 | } |
80 | 76 | ||
@@ -1081,7 +1077,7 @@ static void cheetah_log_errors(struct pt_regs *regs, struct cheetah_err_info *in | |||
1081 | regs->tpc, regs->tnpc, regs->u_regs[UREG_I7], regs->tstate); | 1077 | regs->tpc, regs->tnpc, regs->u_regs[UREG_I7], regs->tstate); |
1082 | printk("%s" "ERROR(%d): ", | 1078 | printk("%s" "ERROR(%d): ", |
1083 | (recoverable ? KERN_WARNING : KERN_CRIT), smp_processor_id()); | 1079 | (recoverable ? KERN_WARNING : KERN_CRIT), smp_processor_id()); |
1084 | print_symbol("TPC<%s>\n", regs->tpc); | 1080 | printk("TPC<%pS>\n", (void *) regs->tpc); |
1085 | printk("%s" "ERROR(%d): M_SYND(%lx), E_SYND(%lx)%s%s\n", | 1081 | printk("%s" "ERROR(%d): M_SYND(%lx), E_SYND(%lx)%s%s\n", |
1086 | (recoverable ? KERN_WARNING : KERN_CRIT), smp_processor_id(), | 1082 | (recoverable ? KERN_WARNING : KERN_CRIT), smp_processor_id(), |
1087 | (afsr & CHAFSR_M_SYNDROME) >> CHAFSR_M_SYNDROME_SHIFT, | 1083 | (afsr & CHAFSR_M_SYNDROME) >> CHAFSR_M_SYNDROME_SHIFT, |
@@ -1689,7 +1685,7 @@ void cheetah_plus_parity_error(int type, struct pt_regs *regs) | |||
1689 | smp_processor_id(), | 1685 | smp_processor_id(), |
1690 | (type & 0x1) ? 'I' : 'D', | 1686 | (type & 0x1) ? 'I' : 'D', |
1691 | regs->tpc); | 1687 | regs->tpc); |
1692 | print_symbol(KERN_EMERG "TPC<%s>\n", regs->tpc); | 1688 | printk(KERN_EMERG "TPC<%pS>\n", (void *) regs->tpc); |
1693 | panic("Irrecoverable Cheetah+ parity error."); | 1689 | panic("Irrecoverable Cheetah+ parity error."); |
1694 | } | 1690 | } |
1695 | 1691 | ||
@@ -1697,7 +1693,7 @@ void cheetah_plus_parity_error(int type, struct pt_regs *regs) | |||
1697 | smp_processor_id(), | 1693 | smp_processor_id(), |
1698 | (type & 0x1) ? 'I' : 'D', | 1694 | (type & 0x1) ? 'I' : 'D', |
1699 | regs->tpc); | 1695 | regs->tpc); |
1700 | print_symbol(KERN_WARNING "TPC<%s>\n", regs->tpc); | 1696 | printk(KERN_WARNING "TPC<%pS>\n", (void *) regs->tpc); |
1701 | } | 1697 | } |
1702 | 1698 | ||
1703 | struct sun4v_error_entry { | 1699 | struct sun4v_error_entry { |
@@ -1904,9 +1900,10 @@ void sun4v_itlb_error_report(struct pt_regs *regs, int tl) | |||
1904 | 1900 | ||
1905 | printk(KERN_EMERG "SUN4V-ITLB: Error at TPC[%lx], tl %d\n", | 1901 | printk(KERN_EMERG "SUN4V-ITLB: Error at TPC[%lx], tl %d\n", |
1906 | regs->tpc, tl); | 1902 | regs->tpc, tl); |
1907 | print_symbol(KERN_EMERG "SUN4V-ITLB: TPC<%s>\n", regs->tpc); | 1903 | printk(KERN_EMERG "SUN4V-ITLB: TPC<%pS>\n", (void *) regs->tpc); |
1908 | printk(KERN_EMERG "SUN4V-ITLB: O7[%lx]\n", regs->u_regs[UREG_I7]); | 1904 | printk(KERN_EMERG "SUN4V-ITLB: O7[%lx]\n", regs->u_regs[UREG_I7]); |
1909 | print_symbol(KERN_EMERG "SUN4V-ITLB: O7<%s>\n", regs->u_regs[UREG_I7]); | 1905 | printk(KERN_EMERG "SUN4V-ITLB: O7<%pS>\n", |
1906 | (void *) regs->u_regs[UREG_I7]); | ||
1910 | printk(KERN_EMERG "SUN4V-ITLB: vaddr[%lx] ctx[%lx] " | 1907 | printk(KERN_EMERG "SUN4V-ITLB: vaddr[%lx] ctx[%lx] " |
1911 | "pte[%lx] error[%lx]\n", | 1908 | "pte[%lx] error[%lx]\n", |
1912 | sun4v_err_itlb_vaddr, sun4v_err_itlb_ctx, | 1909 | sun4v_err_itlb_vaddr, sun4v_err_itlb_ctx, |
@@ -1927,9 +1924,10 @@ void sun4v_dtlb_error_report(struct pt_regs *regs, int tl) | |||
1927 | 1924 | ||
1928 | printk(KERN_EMERG "SUN4V-DTLB: Error at TPC[%lx], tl %d\n", | 1925 | printk(KERN_EMERG "SUN4V-DTLB: Error at TPC[%lx], tl %d\n", |
1929 | regs->tpc, tl); | 1926 | regs->tpc, tl); |
1930 | print_symbol(KERN_EMERG "SUN4V-DTLB: TPC<%s>\n", regs->tpc); | 1927 | printk(KERN_EMERG "SUN4V-DTLB: TPC<%pS>\n", (void *) regs->tpc); |
1931 | printk(KERN_EMERG "SUN4V-DTLB: O7[%lx]\n", regs->u_regs[UREG_I7]); | 1928 | printk(KERN_EMERG "SUN4V-DTLB: O7[%lx]\n", regs->u_regs[UREG_I7]); |
1932 | print_symbol(KERN_EMERG "SUN4V-DTLB: O7<%s>\n", regs->u_regs[UREG_I7]); | 1929 | printk(KERN_EMERG "SUN4V-DTLB: O7<%pS>\n", |
1930 | (void *) regs->u_regs[UREG_I7]); | ||
1933 | printk(KERN_EMERG "SUN4V-DTLB: vaddr[%lx] ctx[%lx] " | 1931 | printk(KERN_EMERG "SUN4V-DTLB: vaddr[%lx] ctx[%lx] " |
1934 | "pte[%lx] error[%lx]\n", | 1932 | "pte[%lx] error[%lx]\n", |
1935 | sun4v_err_dtlb_vaddr, sun4v_err_dtlb_ctx, | 1933 | sun4v_err_dtlb_vaddr, sun4v_err_dtlb_ctx, |
@@ -2111,10 +2109,7 @@ void show_stack(struct task_struct *tsk, unsigned long *_ksp) | |||
2111 | fp = ksp + STACK_BIAS; | 2109 | fp = ksp + STACK_BIAS; |
2112 | thread_base = (unsigned long) tp; | 2110 | thread_base = (unsigned long) tp; |
2113 | 2111 | ||
2114 | printk("Call Trace:"); | 2112 | printk("Call Trace:\n"); |
2115 | #ifdef CONFIG_KALLSYMS | ||
2116 | printk("\n"); | ||
2117 | #endif | ||
2118 | do { | 2113 | do { |
2119 | struct sparc_stackf *sf; | 2114 | struct sparc_stackf *sf; |
2120 | struct pt_regs *regs; | 2115 | struct pt_regs *regs; |
@@ -2137,12 +2132,8 @@ void show_stack(struct task_struct *tsk, unsigned long *_ksp) | |||
2137 | fp = (unsigned long)sf->fp + STACK_BIAS; | 2132 | fp = (unsigned long)sf->fp + STACK_BIAS; |
2138 | } | 2133 | } |
2139 | 2134 | ||
2140 | printk(" [%016lx] ", pc); | 2135 | printk(" [%016lx] %pS\n", pc, (void *) pc); |
2141 | print_symbol("%s\n", pc); | ||
2142 | } while (++count < 16); | 2136 | } while (++count < 16); |
2143 | #ifndef CONFIG_KALLSYMS | ||
2144 | printk("\n"); | ||
2145 | #endif | ||
2146 | } | 2137 | } |
2147 | 2138 | ||
2148 | void dump_stack(void) | 2139 | void dump_stack(void) |
@@ -2211,9 +2202,8 @@ void die_if_kernel(char *str, struct pt_regs *regs) | |||
2211 | while (rw && | 2202 | while (rw && |
2212 | count++ < 30&& | 2203 | count++ < 30&& |
2213 | is_kernel_stack(current, rw)) { | 2204 | is_kernel_stack(current, rw)) { |
2214 | printk("Caller[%016lx]", rw->ins[7]); | 2205 | printk("Caller[%016lx]: %pS\n", rw->ins[7], |
2215 | print_symbol(": %s", rw->ins[7]); | 2206 | (void *) rw->ins[7]); |
2216 | printk("\n"); | ||
2217 | 2207 | ||
2218 | rw = kernel_stack_up(rw); | 2208 | rw = kernel_stack_up(rw); |
2219 | } | 2209 | } |
diff --git a/arch/sparc64/kernel/ttable.S b/arch/sparc64/kernel/ttable.S index 450053af039e..1ade3d6fb7fc 100644 --- a/arch/sparc64/kernel/ttable.S +++ b/arch/sparc64/kernel/ttable.S | |||
@@ -58,7 +58,12 @@ tl0_irq3: BTRAP(0x43) | |||
58 | tl0_irq4: BTRAP(0x44) | 58 | tl0_irq4: BTRAP(0x44) |
59 | #endif | 59 | #endif |
60 | tl0_irq5: TRAP_IRQ(handler_irq, 5) | 60 | tl0_irq5: TRAP_IRQ(handler_irq, 5) |
61 | tl0_irq6: BTRAP(0x46) BTRAP(0x47) BTRAP(0x48) BTRAP(0x49) | 61 | #ifdef CONFIG_SMP |
62 | tl0_irq6: TRAP_IRQ(smp_call_function_single_client, 6) | ||
63 | #else | ||
64 | tl0_irq6: BTRAP(0x46) | ||
65 | #endif | ||
66 | tl0_irq7: BTRAP(0x47) BTRAP(0x48) BTRAP(0x49) | ||
62 | tl0_irq10: BTRAP(0x4a) BTRAP(0x4b) BTRAP(0x4c) BTRAP(0x4d) | 67 | tl0_irq10: BTRAP(0x4a) BTRAP(0x4b) BTRAP(0x4c) BTRAP(0x4d) |
63 | tl0_irq14: TRAP_IRQ(timer_interrupt, 14) | 68 | tl0_irq14: TRAP_IRQ(timer_interrupt, 14) |
64 | tl0_irq15: TRAP_IRQ(handler_irq, 15) | 69 | tl0_irq15: TRAP_IRQ(handler_irq, 15) |
diff --git a/arch/sparc64/kernel/unaligned.c b/arch/sparc64/kernel/unaligned.c index afa7fc4f5193..203ddfad9f27 100644 --- a/arch/sparc64/kernel/unaligned.c +++ b/arch/sparc64/kernel/unaligned.c | |||
@@ -2,7 +2,7 @@ | |||
2 | * unaligned.c: Unaligned load/store trap handling with special | 2 | * unaligned.c: Unaligned load/store trap handling with special |
3 | * cases for the kernel to do them more quickly. | 3 | * cases for the kernel to do them more quickly. |
4 | * | 4 | * |
5 | * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) | 5 | * Copyright (C) 1996,2008 David S. Miller (davem@davemloft.net) |
6 | * Copyright (C) 1996,1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz) | 6 | * Copyright (C) 1996,1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz) |
7 | */ | 7 | */ |
8 | 8 | ||
@@ -20,7 +20,6 @@ | |||
20 | #include <asm/uaccess.h> | 20 | #include <asm/uaccess.h> |
21 | #include <linux/smp.h> | 21 | #include <linux/smp.h> |
22 | #include <linux/bitops.h> | 22 | #include <linux/bitops.h> |
23 | #include <linux/kallsyms.h> | ||
24 | #include <asm/fpumacro.h> | 23 | #include <asm/fpumacro.h> |
25 | 24 | ||
26 | /* #define DEBUG_MNA */ | 25 | /* #define DEBUG_MNA */ |
@@ -289,8 +288,8 @@ static void log_unaligned(struct pt_regs *regs) | |||
289 | if (count < 5) { | 288 | if (count < 5) { |
290 | last_time = jiffies; | 289 | last_time = jiffies; |
291 | count++; | 290 | count++; |
292 | printk("Kernel unaligned access at TPC[%lx] ", regs->tpc); | 291 | printk("Kernel unaligned access at TPC[%lx] %pS\n", |
293 | print_symbol("%s\n", regs->tpc); | 292 | regs->tpc, (void *) regs->tpc); |
294 | } | 293 | } |
295 | } | 294 | } |
296 | 295 | ||
diff --git a/arch/sparc64/kernel/vio.c b/arch/sparc64/kernel/vio.c index e78b3517940b..a490077891a4 100644 --- a/arch/sparc64/kernel/vio.c +++ b/arch/sparc64/kernel/vio.c | |||
@@ -224,7 +224,7 @@ static struct vio_dev *vio_create_one(struct mdesc_handle *hp, u64 mp, | |||
224 | if (!strcmp(type, "domain-services-port")) | 224 | if (!strcmp(type, "domain-services-port")) |
225 | bus_id_name = "ds"; | 225 | bus_id_name = "ds"; |
226 | 226 | ||
227 | if (strlen(bus_id_name) >= KOBJ_NAME_LEN - 4) { | 227 | if (strlen(bus_id_name) >= BUS_ID_SIZE - 4) { |
228 | printk(KERN_ERR "VIO: bus_id_name [%s] is too long.\n", | 228 | printk(KERN_ERR "VIO: bus_id_name [%s] is too long.\n", |
229 | bus_id_name); | 229 | bus_id_name); |
230 | return NULL; | 230 | return NULL; |
@@ -260,16 +260,14 @@ static struct vio_dev *vio_create_one(struct mdesc_handle *hp, u64 mp, | |||
260 | vio_fill_channel_info(hp, mp, vdev); | 260 | vio_fill_channel_info(hp, mp, vdev); |
261 | 261 | ||
262 | if (!id) { | 262 | if (!id) { |
263 | snprintf(vdev->dev.bus_id, BUS_ID_SIZE, "%s", | 263 | dev_set_name(&vdev->dev, "%s", bus_id_name); |
264 | bus_id_name); | ||
265 | vdev->dev_no = ~(u64)0; | 264 | vdev->dev_no = ~(u64)0; |
266 | } else if (!cfg_handle) { | 265 | } else if (!cfg_handle) { |
267 | snprintf(vdev->dev.bus_id, BUS_ID_SIZE, "%s-%lu", | 266 | dev_set_name(&vdev->dev, "%s-%lu", bus_id_name, *id); |
268 | bus_id_name, *id); | ||
269 | vdev->dev_no = *id; | 267 | vdev->dev_no = *id; |
270 | } else { | 268 | } else { |
271 | snprintf(vdev->dev.bus_id, BUS_ID_SIZE, "%s-%lu-%lu", | 269 | dev_set_name(&vdev->dev, "%s-%lu-%lu", bus_id_name, |
272 | bus_id_name, *cfg_handle, *id); | 270 | *cfg_handle, *id); |
273 | vdev->dev_no = *cfg_handle; | 271 | vdev->dev_no = *cfg_handle; |
274 | } | 272 | } |
275 | 273 | ||
@@ -292,12 +290,12 @@ static struct vio_dev *vio_create_one(struct mdesc_handle *hp, u64 mp, | |||
292 | } | 290 | } |
293 | vdev->dp = dp; | 291 | vdev->dp = dp; |
294 | 292 | ||
295 | printk(KERN_INFO "VIO: Adding device %s\n", vdev->dev.bus_id); | 293 | printk(KERN_INFO "VIO: Adding device %s\n", dev_name(&vdev->dev)); |
296 | 294 | ||
297 | err = device_register(&vdev->dev); | 295 | err = device_register(&vdev->dev); |
298 | if (err) { | 296 | if (err) { |
299 | printk(KERN_ERR "VIO: Could not register device %s, err=%d\n", | 297 | printk(KERN_ERR "VIO: Could not register device %s, err=%d\n", |
300 | vdev->dev.bus_id, err); | 298 | dev_name(&vdev->dev), err); |
301 | kfree(vdev); | 299 | kfree(vdev); |
302 | return NULL; | 300 | return NULL; |
303 | } | 301 | } |
@@ -330,7 +328,7 @@ static void vio_remove(struct mdesc_handle *hp, u64 node) | |||
330 | dev = device_find_child(&root_vdev->dev, (void *) node, | 328 | dev = device_find_child(&root_vdev->dev, (void *) node, |
331 | vio_md_node_match); | 329 | vio_md_node_match); |
332 | if (dev) { | 330 | if (dev) { |
333 | printk(KERN_INFO "VIO: Removing device %s\n", dev->bus_id); | 331 | printk(KERN_INFO "VIO: Removing device %s\n", dev_name(dev)); |
334 | 332 | ||
335 | device_unregister(dev); | 333 | device_unregister(dev); |
336 | } | 334 | } |
diff --git a/arch/sparc64/lib/copy_page.S b/arch/sparc64/lib/copy_page.S index 37460666a5c3..b243d3b606ba 100644 --- a/arch/sparc64/lib/copy_page.S +++ b/arch/sparc64/lib/copy_page.S | |||
@@ -25,9 +25,9 @@ | |||
25 | 25 | ||
26 | #define DCACHE_SIZE (PAGE_SIZE * 2) | 26 | #define DCACHE_SIZE (PAGE_SIZE * 2) |
27 | 27 | ||
28 | #if (PAGE_SHIFT == 13) || (PAGE_SHIFT == 19) | 28 | #if (PAGE_SHIFT == 13) |
29 | #define PAGE_SIZE_REM 0x80 | 29 | #define PAGE_SIZE_REM 0x80 |
30 | #elif (PAGE_SHIFT == 16) || (PAGE_SHIFT == 22) | 30 | #elif (PAGE_SHIFT == 16) |
31 | #define PAGE_SIZE_REM 0x100 | 31 | #define PAGE_SIZE_REM 0x100 |
32 | #else | 32 | #else |
33 | #error Wrong PAGE_SHIFT specified | 33 | #error Wrong PAGE_SHIFT specified |
@@ -198,7 +198,7 @@ cheetah_copy_page_insn: | |||
198 | cmp %o2, PAGE_SIZE_REM | 198 | cmp %o2, PAGE_SIZE_REM |
199 | bne,pt %xcc, 1b | 199 | bne,pt %xcc, 1b |
200 | add %o0, 0x40, %o0 | 200 | add %o0, 0x40, %o0 |
201 | #if (PAGE_SHIFT == 16) || (PAGE_SHIFT == 22) | 201 | #if (PAGE_SHIFT == 16) |
202 | TOUCH(f0, f2, f4, f6, f8, f10, f12, f14) | 202 | TOUCH(f0, f2, f4, f6, f8, f10, f12, f14) |
203 | ldda [%o1] ASI_BLK_P, %f32 | 203 | ldda [%o1] ASI_BLK_P, %f32 |
204 | stda %f48, [%o0] %asi | 204 | stda %f48, [%o0] %asi |
diff --git a/arch/sparc64/mm/fault.c b/arch/sparc64/mm/fault.c index 236f4d228d2b..ea7d7ae76bc2 100644 --- a/arch/sparc64/mm/fault.c +++ b/arch/sparc64/mm/fault.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * arch/sparc64/mm/fault.c: Page fault handlers for the 64-bit Sparc. | 2 | * arch/sparc64/mm/fault.c: Page fault handlers for the 64-bit Sparc. |
3 | * | 3 | * |
4 | * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) | 4 | * Copyright (C) 1996, 2008 David S. Miller (davem@davemloft.net) |
5 | * Copyright (C) 1997, 1999 Jakub Jelinek (jj@ultra.linux.cz) | 5 | * Copyright (C) 1997, 1999 Jakub Jelinek (jj@ultra.linux.cz) |
6 | */ | 6 | */ |
7 | 7 | ||
@@ -18,7 +18,6 @@ | |||
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/interrupt.h> | 19 | #include <linux/interrupt.h> |
20 | #include <linux/kprobes.h> | 20 | #include <linux/kprobes.h> |
21 | #include <linux/kallsyms.h> | ||
22 | #include <linux/kdebug.h> | 21 | #include <linux/kdebug.h> |
23 | 22 | ||
24 | #include <asm/page.h> | 23 | #include <asm/page.h> |
@@ -115,7 +114,7 @@ static void bad_kernel_pc(struct pt_regs *regs, unsigned long vaddr) | |||
115 | printk(KERN_CRIT "OOPS: Bogus kernel PC [%016lx] in fault handler\n", | 114 | printk(KERN_CRIT "OOPS: Bogus kernel PC [%016lx] in fault handler\n", |
116 | regs->tpc); | 115 | regs->tpc); |
117 | printk(KERN_CRIT "OOPS: RPC [%016lx]\n", regs->u_regs[15]); | 116 | printk(KERN_CRIT "OOPS: RPC [%016lx]\n", regs->u_regs[15]); |
118 | print_symbol("RPC: <%s>\n", regs->u_regs[15]); | 117 | printk("OOPS: RPC <%pS>\n", (void *) regs->u_regs[15]); |
119 | printk(KERN_CRIT "OOPS: Fault was to vaddr[%lx]\n", vaddr); | 118 | printk(KERN_CRIT "OOPS: Fault was to vaddr[%lx]\n", vaddr); |
120 | dump_stack(); | 119 | dump_stack(); |
121 | unhandled_fault(regs->tpc, current, regs); | 120 | unhandled_fault(regs->tpc, current, regs); |
diff --git a/arch/sparc64/mm/tsb.c b/arch/sparc64/mm/tsb.c index fe70c8a557b5..3547937b17a2 100644 --- a/arch/sparc64/mm/tsb.c +++ b/arch/sparc64/mm/tsb.c | |||
@@ -96,12 +96,6 @@ void flush_tsb_user(struct mmu_gather *mp) | |||
96 | #elif defined(CONFIG_SPARC64_PAGE_SIZE_64KB) | 96 | #elif defined(CONFIG_SPARC64_PAGE_SIZE_64KB) |
97 | #define HV_PGSZ_IDX_BASE HV_PGSZ_IDX_64K | 97 | #define HV_PGSZ_IDX_BASE HV_PGSZ_IDX_64K |
98 | #define HV_PGSZ_MASK_BASE HV_PGSZ_MASK_64K | 98 | #define HV_PGSZ_MASK_BASE HV_PGSZ_MASK_64K |
99 | #elif defined(CONFIG_SPARC64_PAGE_SIZE_512KB) | ||
100 | #define HV_PGSZ_IDX_BASE HV_PGSZ_IDX_512K | ||
101 | #define HV_PGSZ_MASK_BASE HV_PGSZ_MASK_512K | ||
102 | #elif defined(CONFIG_SPARC64_PAGE_SIZE_4MB) | ||
103 | #define HV_PGSZ_IDX_BASE HV_PGSZ_IDX_4MB | ||
104 | #define HV_PGSZ_MASK_BASE HV_PGSZ_MASK_4MB | ||
105 | #else | 99 | #else |
106 | #error Broken base page size setting... | 100 | #error Broken base page size setting... |
107 | #endif | 101 | #endif |
diff --git a/arch/sparc64/mm/ultra.S b/arch/sparc64/mm/ultra.S index 9bb2d90a9df6..4c8ca131ffaf 100644 --- a/arch/sparc64/mm/ultra.S +++ b/arch/sparc64/mm/ultra.S | |||
@@ -688,6 +688,11 @@ xcall_call_function: | |||
688 | wr %g0, (1 << PIL_SMP_CALL_FUNC), %set_softint | 688 | wr %g0, (1 << PIL_SMP_CALL_FUNC), %set_softint |
689 | retry | 689 | retry |
690 | 690 | ||
691 | .globl xcall_call_function_single | ||
692 | xcall_call_function_single: | ||
693 | wr %g0, (1 << PIL_SMP_CALL_FUNC_SNGL), %set_softint | ||
694 | retry | ||
695 | |||
691 | .globl xcall_receive_signal | 696 | .globl xcall_receive_signal |
692 | xcall_receive_signal: | 697 | xcall_receive_signal: |
693 | wr %g0, (1 << PIL_SMP_RECEIVE_SIGNAL), %set_softint | 698 | wr %g0, (1 << PIL_SMP_RECEIVE_SIGNAL), %set_softint |
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 96e0c2ebc388..03980cb04291 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig | |||
@@ -447,7 +447,6 @@ config PARAVIRT_DEBUG | |||
447 | 447 | ||
448 | config MEMTEST | 448 | config MEMTEST |
449 | bool "Memtest" | 449 | bool "Memtest" |
450 | depends on X86_64 | ||
451 | help | 450 | help |
452 | This option adds a kernel parameter 'memtest', which allows memtest | 451 | This option adds a kernel parameter 'memtest', which allows memtest |
453 | to be set. | 452 | to be set. |
diff --git a/arch/x86/Kconfig.cpu b/arch/x86/Kconfig.cpu index abff1b84ed5b..2c518fbc52ec 100644 --- a/arch/x86/Kconfig.cpu +++ b/arch/x86/Kconfig.cpu | |||
@@ -362,10 +362,6 @@ config X86_ALIGNMENT_16 | |||
362 | def_bool y | 362 | def_bool y |
363 | depends on MWINCHIP3D || MWINCHIP2 || MWINCHIPC6 || MCYRIXIII || X86_ELAN || MK6 || M586MMX || M586TSC || M586 || M486 || MVIAC3_2 || MGEODEGX1 | 363 | depends on MWINCHIP3D || MWINCHIP2 || MWINCHIPC6 || MCYRIXIII || X86_ELAN || MK6 || M586MMX || M586TSC || M586 || M486 || MVIAC3_2 || MGEODEGX1 |
364 | 364 | ||
365 | config X86_GOOD_APIC | ||
366 | def_bool y | ||
367 | depends on MK7 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || MK8 || MEFFICEON || MCORE2 || MVIAC7 || X86_64 | ||
368 | |||
369 | config X86_INTEL_USERCOPY | 365 | config X86_INTEL_USERCOPY |
370 | def_bool y | 366 | def_bool y |
371 | depends on MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M586MMX || X86_GENERIC || MK8 || MK7 || MEFFICEON || MCORE2 | 367 | depends on MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M586MMX || X86_GENERIC || MK8 || MK7 || MEFFICEON || MCORE2 |
@@ -418,4 +414,4 @@ config X86_MINIMUM_CPU_FAMILY | |||
418 | 414 | ||
419 | config X86_DEBUGCTLMSR | 415 | config X86_DEBUGCTLMSR |
420 | def_bool y | 416 | def_bool y |
421 | depends on !(M586MMX || M586TSC || M586 || M486 || M386) | 417 | depends on !(MK6 || MWINCHIPC6 || MWINCHIP2 || MWINCHIP3D || MCYRIXIII || M586MMX || M586TSC || M586 || M486 || M386) |
diff --git a/arch/x86/Kconfig.debug b/arch/x86/Kconfig.debug index ae36bfa814e5..092f019e033a 100644 --- a/arch/x86/Kconfig.debug +++ b/arch/x86/Kconfig.debug | |||
@@ -5,13 +5,15 @@ config TRACE_IRQFLAGS_SUPPORT | |||
5 | 5 | ||
6 | source "lib/Kconfig.debug" | 6 | source "lib/Kconfig.debug" |
7 | 7 | ||
8 | config NONPROMISC_DEVMEM | 8 | config STRICT_DEVMEM |
9 | bool "Filter access to /dev/mem" | 9 | bool "Filter access to /dev/mem" |
10 | help | 10 | help |
11 | If this option is left off, you allow userspace access to all | 11 | If this option is disabled, you allow userspace (root) access to all |
12 | of memory, including kernel and userspace memory. Accidental | 12 | of memory, including kernel and userspace memory. Accidental |
13 | access to this is obviously disastrous, but specific access can | 13 | access to this is obviously disastrous, but specific access can |
14 | be used by people debugging the kernel. | 14 | be used by people debugging the kernel. Note that with PAT support |
15 | enabled, even in this case there are restrictions on /dev/mem | ||
16 | use due to the cache aliasing requirements. | ||
15 | 17 | ||
16 | If this option is switched on, the /dev/mem file only allows | 18 | If this option is switched on, the /dev/mem file only allows |
17 | userspace access to PCI space and the BIOS code and data regions. | 19 | userspace access to PCI space and the BIOS code and data regions. |
@@ -287,7 +289,6 @@ config CPA_DEBUG | |||
287 | 289 | ||
288 | config OPTIMIZE_INLINING | 290 | config OPTIMIZE_INLINING |
289 | bool "Allow gcc to uninline functions marked 'inline'" | 291 | bool "Allow gcc to uninline functions marked 'inline'" |
290 | depends on BROKEN | ||
291 | help | 292 | help |
292 | This option determines if the kernel forces gcc to inline the functions | 293 | This option determines if the kernel forces gcc to inline the functions |
293 | developers have marked 'inline'. Doing so takes away freedom from gcc to | 294 | developers have marked 'inline'. Doing so takes away freedom from gcc to |
@@ -298,5 +299,7 @@ config OPTIMIZE_INLINING | |||
298 | become the default in the future, until then this option is there to | 299 | become the default in the future, until then this option is there to |
299 | test gcc for this. | 300 | test gcc for this. |
300 | 301 | ||
302 | If unsure, say N. | ||
303 | |||
301 | endmenu | 304 | endmenu |
302 | 305 | ||
diff --git a/arch/x86/boot/edd.c b/arch/x86/boot/edd.c index 03399d64013b..d93cbc6464d0 100644 --- a/arch/x86/boot/edd.c +++ b/arch/x86/boot/edd.c | |||
@@ -167,9 +167,8 @@ void query_edd(void) | |||
167 | * Scan the BIOS-supported hard disks and query EDD | 167 | * Scan the BIOS-supported hard disks and query EDD |
168 | * information... | 168 | * information... |
169 | */ | 169 | */ |
170 | get_edd_info(devno, &ei); | 170 | if (!get_edd_info(devno, &ei) |
171 | 171 | && boot_params.eddbuf_entries < EDDMAXNR) { | |
172 | if (boot_params.eddbuf_entries < EDDMAXNR) { | ||
173 | memcpy(edp, &ei, sizeof ei); | 172 | memcpy(edp, &ei, sizeof ei); |
174 | edp++; | 173 | edp++; |
175 | boot_params.eddbuf_entries++; | 174 | boot_params.eddbuf_entries++; |
diff --git a/arch/x86/boot/pm.c b/arch/x86/boot/pm.c index 328956fdb59e..85a1cd8a8ff8 100644 --- a/arch/x86/boot/pm.c +++ b/arch/x86/boot/pm.c | |||
@@ -98,12 +98,6 @@ static void reset_coprocessor(void) | |||
98 | /* | 98 | /* |
99 | * Set up the GDT | 99 | * Set up the GDT |
100 | */ | 100 | */ |
101 | #define GDT_ENTRY(flags, base, limit) \ | ||
102 | (((u64)(base & 0xff000000) << 32) | \ | ||
103 | ((u64)flags << 40) | \ | ||
104 | ((u64)(limit & 0x00ff0000) << 32) | \ | ||
105 | ((u64)(base & 0x00ffffff) << 16) | \ | ||
106 | ((u64)(limit & 0x0000ffff))) | ||
107 | 101 | ||
108 | struct gdt_ptr { | 102 | struct gdt_ptr { |
109 | u16 len; | 103 | u16 len; |
diff --git a/arch/x86/configs/i386_defconfig b/arch/x86/configs/i386_defconfig index 9bc34e2033ec..4d73f53287b6 100644 --- a/arch/x86/configs/i386_defconfig +++ b/arch/x86/configs/i386_defconfig | |||
@@ -2047,7 +2047,7 @@ CONFIG_PROVIDE_OHCI1394_DMA_INIT=y | |||
2047 | # CONFIG_SAMPLES is not set | 2047 | # CONFIG_SAMPLES is not set |
2048 | # CONFIG_KGDB is not set | 2048 | # CONFIG_KGDB is not set |
2049 | CONFIG_HAVE_ARCH_KGDB=y | 2049 | CONFIG_HAVE_ARCH_KGDB=y |
2050 | # CONFIG_NONPROMISC_DEVMEM is not set | 2050 | # CONFIG_STRICT_DEVMEM is not set |
2051 | CONFIG_EARLY_PRINTK=y | 2051 | CONFIG_EARLY_PRINTK=y |
2052 | CONFIG_DEBUG_STACKOVERFLOW=y | 2052 | CONFIG_DEBUG_STACKOVERFLOW=y |
2053 | CONFIG_DEBUG_STACK_USAGE=y | 2053 | CONFIG_DEBUG_STACK_USAGE=y |
diff --git a/arch/x86/configs/x86_64_defconfig b/arch/x86/configs/x86_64_defconfig index ae5124e064d4..a40452429625 100644 --- a/arch/x86/configs/x86_64_defconfig +++ b/arch/x86/configs/x86_64_defconfig | |||
@@ -2012,7 +2012,7 @@ CONFIG_PROVIDE_OHCI1394_DMA_INIT=y | |||
2012 | # CONFIG_SAMPLES is not set | 2012 | # CONFIG_SAMPLES is not set |
2013 | # CONFIG_KGDB is not set | 2013 | # CONFIG_KGDB is not set |
2014 | CONFIG_HAVE_ARCH_KGDB=y | 2014 | CONFIG_HAVE_ARCH_KGDB=y |
2015 | # CONFIG_NONPROMISC_DEVMEM is not set | 2015 | # CONFIG_STRICT_DEVMEM is not set |
2016 | CONFIG_EARLY_PRINTK=y | 2016 | CONFIG_EARLY_PRINTK=y |
2017 | CONFIG_DEBUG_STACKOVERFLOW=y | 2017 | CONFIG_DEBUG_STACKOVERFLOW=y |
2018 | CONFIG_DEBUG_STACK_USAGE=y | 2018 | CONFIG_DEBUG_STACK_USAGE=y |
diff --git a/arch/x86/ia32/ia32_signal.c b/arch/x86/ia32/ia32_signal.c index cb3856a18c85..20af4c79579a 100644 --- a/arch/x86/ia32/ia32_signal.c +++ b/arch/x86/ia32/ia32_signal.c | |||
@@ -36,6 +36,11 @@ | |||
36 | 36 | ||
37 | #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) | 37 | #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP))) |
38 | 38 | ||
39 | #define FIX_EFLAGS (X86_EFLAGS_AC | X86_EFLAGS_OF | \ | ||
40 | X86_EFLAGS_DF | X86_EFLAGS_TF | X86_EFLAGS_SF | \ | ||
41 | X86_EFLAGS_ZF | X86_EFLAGS_AF | X86_EFLAGS_PF | \ | ||
42 | X86_EFLAGS_CF) | ||
43 | |||
39 | asmlinkage int do_signal(struct pt_regs *regs, sigset_t *oldset); | 44 | asmlinkage int do_signal(struct pt_regs *regs, sigset_t *oldset); |
40 | void signal_fault(struct pt_regs *regs, void __user *frame, char *where); | 45 | void signal_fault(struct pt_regs *regs, void __user *frame, char *where); |
41 | 46 | ||
@@ -248,7 +253,7 @@ static int ia32_restore_sigcontext(struct pt_regs *regs, | |||
248 | regs->ss |= 3; | 253 | regs->ss |= 3; |
249 | 254 | ||
250 | err |= __get_user(tmpflags, &sc->flags); | 255 | err |= __get_user(tmpflags, &sc->flags); |
251 | regs->flags = (regs->flags & ~0x40DD5) | (tmpflags & 0x40DD5); | 256 | regs->flags = (regs->flags & ~FIX_EFLAGS) | (tmpflags & FIX_EFLAGS); |
252 | /* disable syscall checks */ | 257 | /* disable syscall checks */ |
253 | regs->orig_ax = -1; | 258 | regs->orig_ax = -1; |
254 | 259 | ||
@@ -515,7 +520,6 @@ int ia32_setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, | |||
515 | compat_sigset_t *set, struct pt_regs *regs) | 520 | compat_sigset_t *set, struct pt_regs *regs) |
516 | { | 521 | { |
517 | struct rt_sigframe __user *frame; | 522 | struct rt_sigframe __user *frame; |
518 | struct exec_domain *ed = current_thread_info()->exec_domain; | ||
519 | void __user *restorer; | 523 | void __user *restorer; |
520 | int err = 0; | 524 | int err = 0; |
521 | 525 | ||
@@ -538,8 +542,7 @@ int ia32_setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, | |||
538 | if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame))) | 542 | if (!access_ok(VERIFY_WRITE, frame, sizeof(*frame))) |
539 | goto give_sigsegv; | 543 | goto give_sigsegv; |
540 | 544 | ||
541 | err |= __put_user((ed && ed->signal_invmap && sig < 32 | 545 | err |= __put_user(sig, &frame->sig); |
542 | ? ed->signal_invmap[sig] : sig), &frame->sig); | ||
543 | err |= __put_user(ptr_to_compat(&frame->info), &frame->pinfo); | 546 | err |= __put_user(ptr_to_compat(&frame->info), &frame->pinfo); |
544 | err |= __put_user(ptr_to_compat(&frame->uc), &frame->puc); | 547 | err |= __put_user(ptr_to_compat(&frame->uc), &frame->puc); |
545 | err |= copy_siginfo_to_user32(&frame->info, info); | 548 | err |= copy_siginfo_to_user32(&frame->info, info); |
diff --git a/arch/x86/ia32/ia32entry.S b/arch/x86/ia32/ia32entry.S index 20371d0635e4..23d146ce676b 100644 --- a/arch/x86/ia32/ia32entry.S +++ b/arch/x86/ia32/ia32entry.S | |||
@@ -37,6 +37,11 @@ | |||
37 | movq %rax,R8(%rsp) | 37 | movq %rax,R8(%rsp) |
38 | .endm | 38 | .endm |
39 | 39 | ||
40 | /* | ||
41 | * Reload arg registers from stack in case ptrace changed them. | ||
42 | * We don't reload %eax because syscall_trace_enter() returned | ||
43 | * the value it wants us to use in the table lookup. | ||
44 | */ | ||
40 | .macro LOAD_ARGS32 offset | 45 | .macro LOAD_ARGS32 offset |
41 | movl \offset(%rsp),%r11d | 46 | movl \offset(%rsp),%r11d |
42 | movl \offset+8(%rsp),%r10d | 47 | movl \offset+8(%rsp),%r10d |
@@ -46,7 +51,6 @@ | |||
46 | movl \offset+48(%rsp),%edx | 51 | movl \offset+48(%rsp),%edx |
47 | movl \offset+56(%rsp),%esi | 52 | movl \offset+56(%rsp),%esi |
48 | movl \offset+64(%rsp),%edi | 53 | movl \offset+64(%rsp),%edi |
49 | movl \offset+72(%rsp),%eax | ||
50 | .endm | 54 | .endm |
51 | 55 | ||
52 | .macro CFI_STARTPROC32 simple | 56 | .macro CFI_STARTPROC32 simple |
@@ -137,13 +141,12 @@ ENTRY(ia32_sysenter_target) | |||
137 | .previous | 141 | .previous |
138 | GET_THREAD_INFO(%r10) | 142 | GET_THREAD_INFO(%r10) |
139 | orl $TS_COMPAT,TI_status(%r10) | 143 | orl $TS_COMPAT,TI_status(%r10) |
140 | testl $(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SECCOMP), \ | 144 | testl $_TIF_WORK_SYSCALL_ENTRY,TI_flags(%r10) |
141 | TI_flags(%r10) | ||
142 | CFI_REMEMBER_STATE | 145 | CFI_REMEMBER_STATE |
143 | jnz sysenter_tracesys | 146 | jnz sysenter_tracesys |
144 | sysenter_do_call: | ||
145 | cmpl $(IA32_NR_syscalls-1),%eax | 147 | cmpl $(IA32_NR_syscalls-1),%eax |
146 | ja ia32_badsys | 148 | ja ia32_badsys |
149 | sysenter_do_call: | ||
147 | IA32_ARG_FIXUP 1 | 150 | IA32_ARG_FIXUP 1 |
148 | call *ia32_sys_call_table(,%rax,8) | 151 | call *ia32_sys_call_table(,%rax,8) |
149 | movq %rax,RAX-ARGOFFSET(%rsp) | 152 | movq %rax,RAX-ARGOFFSET(%rsp) |
@@ -242,8 +245,7 @@ ENTRY(ia32_cstar_target) | |||
242 | .previous | 245 | .previous |
243 | GET_THREAD_INFO(%r10) | 246 | GET_THREAD_INFO(%r10) |
244 | orl $TS_COMPAT,TI_status(%r10) | 247 | orl $TS_COMPAT,TI_status(%r10) |
245 | testl $(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SECCOMP), \ | 248 | testl $_TIF_WORK_SYSCALL_ENTRY,TI_flags(%r10) |
246 | TI_flags(%r10) | ||
247 | CFI_REMEMBER_STATE | 249 | CFI_REMEMBER_STATE |
248 | jnz cstar_tracesys | 250 | jnz cstar_tracesys |
249 | cstar_do_call: | 251 | cstar_do_call: |
@@ -321,6 +323,7 @@ ENTRY(ia32_syscall) | |||
321 | /*CFI_REL_OFFSET rflags,EFLAGS-RIP*/ | 323 | /*CFI_REL_OFFSET rflags,EFLAGS-RIP*/ |
322 | /*CFI_REL_OFFSET cs,CS-RIP*/ | 324 | /*CFI_REL_OFFSET cs,CS-RIP*/ |
323 | CFI_REL_OFFSET rip,RIP-RIP | 325 | CFI_REL_OFFSET rip,RIP-RIP |
326 | PARAVIRT_ADJUST_EXCEPTION_FRAME | ||
324 | SWAPGS | 327 | SWAPGS |
325 | /* | 328 | /* |
326 | * No need to follow this irqs on/off section: the syscall | 329 | * No need to follow this irqs on/off section: the syscall |
@@ -336,8 +339,7 @@ ENTRY(ia32_syscall) | |||
336 | SAVE_ARGS 0,0,1 | 339 | SAVE_ARGS 0,0,1 |
337 | GET_THREAD_INFO(%r10) | 340 | GET_THREAD_INFO(%r10) |
338 | orl $TS_COMPAT,TI_status(%r10) | 341 | orl $TS_COMPAT,TI_status(%r10) |
339 | testl $(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SECCOMP), \ | 342 | testl $_TIF_WORK_SYSCALL_ENTRY,TI_flags(%r10) |
340 | TI_flags(%r10) | ||
341 | jnz ia32_tracesys | 343 | jnz ia32_tracesys |
342 | ia32_do_syscall: | 344 | ia32_do_syscall: |
343 | cmpl $(IA32_NR_syscalls-1),%eax | 345 | cmpl $(IA32_NR_syscalls-1),%eax |
diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile index da140611bb57..3db651fc8ec5 100644 --- a/arch/x86/kernel/Makefile +++ b/arch/x86/kernel/Makefile | |||
@@ -7,9 +7,10 @@ extra-y := head_$(BITS).o head$(BITS).o head.o init_task.o vmlinu | |||
7 | CPPFLAGS_vmlinux.lds += -U$(UTS_MACHINE) | 7 | CPPFLAGS_vmlinux.lds += -U$(UTS_MACHINE) |
8 | 8 | ||
9 | ifdef CONFIG_FTRACE | 9 | ifdef CONFIG_FTRACE |
10 | # Do not profile debug utilities | 10 | # Do not profile debug and lowlevel utilities |
11 | CFLAGS_REMOVE_tsc.o = -pg | 11 | CFLAGS_REMOVE_tsc.o = -pg |
12 | CFLAGS_REMOVE_rtc.o = -pg | 12 | CFLAGS_REMOVE_rtc.o = -pg |
13 | CFLAGS_REMOVE_paravirt.o = -pg | ||
13 | endif | 14 | endif |
14 | 15 | ||
15 | # | 16 | # |
@@ -102,6 +103,7 @@ obj-$(CONFIG_OLPC) += olpc.o | |||
102 | # 64 bit specific files | 103 | # 64 bit specific files |
103 | ifeq ($(CONFIG_X86_64),y) | 104 | ifeq ($(CONFIG_X86_64),y) |
104 | obj-y += genapic_64.o genapic_flat_64.o genx2apic_uv_x.o tlb_uv.o | 105 | obj-y += genapic_64.o genapic_flat_64.o genx2apic_uv_x.o tlb_uv.o |
106 | obj-y += bios_uv.o | ||
105 | obj-$(CONFIG_X86_PM_TIMER) += pmtimer_64.o | 107 | obj-$(CONFIG_X86_PM_TIMER) += pmtimer_64.o |
106 | obj-$(CONFIG_AUDIT) += audit_64.o | 108 | obj-$(CONFIG_AUDIT) += audit_64.o |
107 | 109 | ||
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c index f489d7a9be92..fa88a1d71290 100644 --- a/arch/x86/kernel/acpi/boot.c +++ b/arch/x86/kernel/acpi/boot.c | |||
@@ -1021,7 +1021,7 @@ void __init mp_config_acpi_legacy_irqs(void) | |||
1021 | mp_bus_id_to_type[MP_ISA_BUS] = MP_BUS_ISA; | 1021 | mp_bus_id_to_type[MP_ISA_BUS] = MP_BUS_ISA; |
1022 | #endif | 1022 | #endif |
1023 | set_bit(MP_ISA_BUS, mp_bus_not_pci); | 1023 | set_bit(MP_ISA_BUS, mp_bus_not_pci); |
1024 | Dprintk("Bus #%d is ISA\n", MP_ISA_BUS); | 1024 | pr_debug("Bus #%d is ISA\n", MP_ISA_BUS); |
1025 | 1025 | ||
1026 | #ifdef CONFIG_X86_ES7000 | 1026 | #ifdef CONFIG_X86_ES7000 |
1027 | /* | 1027 | /* |
@@ -1127,8 +1127,8 @@ int mp_register_gsi(u32 gsi, int triggering, int polarity) | |||
1127 | return gsi; | 1127 | return gsi; |
1128 | } | 1128 | } |
1129 | if (test_bit(ioapic_pin, mp_ioapic_routing[ioapic].pin_programmed)) { | 1129 | if (test_bit(ioapic_pin, mp_ioapic_routing[ioapic].pin_programmed)) { |
1130 | Dprintk(KERN_DEBUG "Pin %d-%d already programmed\n", | 1130 | pr_debug(KERN_DEBUG "Pin %d-%d already programmed\n", |
1131 | mp_ioapic_routing[ioapic].apic_id, ioapic_pin); | 1131 | mp_ioapic_routing[ioapic].apic_id, ioapic_pin); |
1132 | #ifdef CONFIG_X86_32 | 1132 | #ifdef CONFIG_X86_32 |
1133 | return (gsi < IRQ_COMPRESSION_START ? gsi : gsi_to_irq[gsi]); | 1133 | return (gsi < IRQ_COMPRESSION_START ? gsi : gsi_to_irq[gsi]); |
1134 | #else | 1134 | #else |
diff --git a/arch/x86/kernel/acpi/sleep.c b/arch/x86/kernel/acpi/sleep.c index 868de3d5c39d..a3ddad18aaa3 100644 --- a/arch/x86/kernel/acpi/sleep.c +++ b/arch/x86/kernel/acpi/sleep.c | |||
@@ -9,6 +9,7 @@ | |||
9 | #include <linux/bootmem.h> | 9 | #include <linux/bootmem.h> |
10 | #include <linux/dmi.h> | 10 | #include <linux/dmi.h> |
11 | #include <linux/cpumask.h> | 11 | #include <linux/cpumask.h> |
12 | #include <asm/segment.h> | ||
12 | 13 | ||
13 | #include "realmode/wakeup.h" | 14 | #include "realmode/wakeup.h" |
14 | #include "sleep.h" | 15 | #include "sleep.h" |
@@ -23,15 +24,6 @@ static unsigned long acpi_realmode; | |||
23 | static char temp_stack[10240]; | 24 | static char temp_stack[10240]; |
24 | #endif | 25 | #endif |
25 | 26 | ||
26 | /* XXX: this macro should move to asm-x86/segment.h and be shared with the | ||
27 | boot code... */ | ||
28 | #define GDT_ENTRY(flags, base, limit) \ | ||
29 | (((u64)(base & 0xff000000) << 32) | \ | ||
30 | ((u64)flags << 40) | \ | ||
31 | ((u64)(limit & 0x00ff0000) << 32) | \ | ||
32 | ((u64)(base & 0x00ffffff) << 16) | \ | ||
33 | ((u64)(limit & 0x0000ffff))) | ||
34 | |||
35 | /** | 27 | /** |
36 | * acpi_save_state_mem - save kernel state | 28 | * acpi_save_state_mem - save kernel state |
37 | * | 29 | * |
diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c index f2766d84c7a0..c25210e6ac88 100644 --- a/arch/x86/kernel/amd_iommu.c +++ b/arch/x86/kernel/amd_iommu.c | |||
@@ -23,7 +23,7 @@ | |||
23 | #include <linux/scatterlist.h> | 23 | #include <linux/scatterlist.h> |
24 | #include <linux/iommu-helper.h> | 24 | #include <linux/iommu-helper.h> |
25 | #include <asm/proto.h> | 25 | #include <asm/proto.h> |
26 | #include <asm/gart.h> | 26 | #include <asm/iommu.h> |
27 | #include <asm/amd_iommu_types.h> | 27 | #include <asm/amd_iommu_types.h> |
28 | #include <asm/amd_iommu.h> | 28 | #include <asm/amd_iommu.h> |
29 | 29 | ||
@@ -32,21 +32,37 @@ | |||
32 | #define to_pages(addr, size) \ | 32 | #define to_pages(addr, size) \ |
33 | (round_up(((addr) & ~PAGE_MASK) + (size), PAGE_SIZE) >> PAGE_SHIFT) | 33 | (round_up(((addr) & ~PAGE_MASK) + (size), PAGE_SIZE) >> PAGE_SHIFT) |
34 | 34 | ||
35 | #define EXIT_LOOP_COUNT 10000000 | ||
36 | |||
35 | static DEFINE_RWLOCK(amd_iommu_devtable_lock); | 37 | static DEFINE_RWLOCK(amd_iommu_devtable_lock); |
36 | 38 | ||
37 | struct command { | 39 | /* |
40 | * general struct to manage commands send to an IOMMU | ||
41 | */ | ||
42 | struct iommu_cmd { | ||
38 | u32 data[4]; | 43 | u32 data[4]; |
39 | }; | 44 | }; |
40 | 45 | ||
41 | static int dma_ops_unity_map(struct dma_ops_domain *dma_dom, | 46 | static int dma_ops_unity_map(struct dma_ops_domain *dma_dom, |
42 | struct unity_map_entry *e); | 47 | struct unity_map_entry *e); |
43 | 48 | ||
49 | /* returns !0 if the IOMMU is caching non-present entries in its TLB */ | ||
44 | static int iommu_has_npcache(struct amd_iommu *iommu) | 50 | static int iommu_has_npcache(struct amd_iommu *iommu) |
45 | { | 51 | { |
46 | return iommu->cap & IOMMU_CAP_NPCACHE; | 52 | return iommu->cap & IOMMU_CAP_NPCACHE; |
47 | } | 53 | } |
48 | 54 | ||
49 | static int __iommu_queue_command(struct amd_iommu *iommu, struct command *cmd) | 55 | /**************************************************************************** |
56 | * | ||
57 | * IOMMU command queuing functions | ||
58 | * | ||
59 | ****************************************************************************/ | ||
60 | |||
61 | /* | ||
62 | * Writes the command to the IOMMUs command buffer and informs the | ||
63 | * hardware about the new command. Must be called with iommu->lock held. | ||
64 | */ | ||
65 | static int __iommu_queue_command(struct amd_iommu *iommu, struct iommu_cmd *cmd) | ||
50 | { | 66 | { |
51 | u32 tail, head; | 67 | u32 tail, head; |
52 | u8 *target; | 68 | u8 *target; |
@@ -63,7 +79,11 @@ static int __iommu_queue_command(struct amd_iommu *iommu, struct command *cmd) | |||
63 | return 0; | 79 | return 0; |
64 | } | 80 | } |
65 | 81 | ||
66 | static int iommu_queue_command(struct amd_iommu *iommu, struct command *cmd) | 82 | /* |
83 | * General queuing function for commands. Takes iommu->lock and calls | ||
84 | * __iommu_queue_command(). | ||
85 | */ | ||
86 | static int iommu_queue_command(struct amd_iommu *iommu, struct iommu_cmd *cmd) | ||
67 | { | 87 | { |
68 | unsigned long flags; | 88 | unsigned long flags; |
69 | int ret; | 89 | int ret; |
@@ -75,16 +95,24 @@ static int iommu_queue_command(struct amd_iommu *iommu, struct command *cmd) | |||
75 | return ret; | 95 | return ret; |
76 | } | 96 | } |
77 | 97 | ||
98 | /* | ||
99 | * This function is called whenever we need to ensure that the IOMMU has | ||
100 | * completed execution of all commands we sent. It sends a | ||
101 | * COMPLETION_WAIT command and waits for it to finish. The IOMMU informs | ||
102 | * us about that by writing a value to a physical address we pass with | ||
103 | * the command. | ||
104 | */ | ||
78 | static int iommu_completion_wait(struct amd_iommu *iommu) | 105 | static int iommu_completion_wait(struct amd_iommu *iommu) |
79 | { | 106 | { |
80 | int ret; | 107 | int ret; |
81 | struct command cmd; | 108 | struct iommu_cmd cmd; |
82 | volatile u64 ready = 0; | 109 | volatile u64 ready = 0; |
83 | unsigned long ready_phys = virt_to_phys(&ready); | 110 | unsigned long ready_phys = virt_to_phys(&ready); |
111 | unsigned long i = 0; | ||
84 | 112 | ||
85 | memset(&cmd, 0, sizeof(cmd)); | 113 | memset(&cmd, 0, sizeof(cmd)); |
86 | cmd.data[0] = LOW_U32(ready_phys) | CMD_COMPL_WAIT_STORE_MASK; | 114 | cmd.data[0] = LOW_U32(ready_phys) | CMD_COMPL_WAIT_STORE_MASK; |
87 | cmd.data[1] = HIGH_U32(ready_phys); | 115 | cmd.data[1] = upper_32_bits(ready_phys); |
88 | cmd.data[2] = 1; /* value written to 'ready' */ | 116 | cmd.data[2] = 1; /* value written to 'ready' */ |
89 | CMD_SET_TYPE(&cmd, CMD_COMPL_WAIT); | 117 | CMD_SET_TYPE(&cmd, CMD_COMPL_WAIT); |
90 | 118 | ||
@@ -95,15 +123,23 @@ static int iommu_completion_wait(struct amd_iommu *iommu) | |||
95 | if (ret) | 123 | if (ret) |
96 | return ret; | 124 | return ret; |
97 | 125 | ||
98 | while (!ready) | 126 | while (!ready && (i < EXIT_LOOP_COUNT)) { |
127 | ++i; | ||
99 | cpu_relax(); | 128 | cpu_relax(); |
129 | } | ||
130 | |||
131 | if (unlikely((i == EXIT_LOOP_COUNT) && printk_ratelimit())) | ||
132 | printk(KERN_WARNING "AMD IOMMU: Completion wait loop failed\n"); | ||
100 | 133 | ||
101 | return 0; | 134 | return 0; |
102 | } | 135 | } |
103 | 136 | ||
137 | /* | ||
138 | * Command send function for invalidating a device table entry | ||
139 | */ | ||
104 | static int iommu_queue_inv_dev_entry(struct amd_iommu *iommu, u16 devid) | 140 | static int iommu_queue_inv_dev_entry(struct amd_iommu *iommu, u16 devid) |
105 | { | 141 | { |
106 | struct command cmd; | 142 | struct iommu_cmd cmd; |
107 | 143 | ||
108 | BUG_ON(iommu == NULL); | 144 | BUG_ON(iommu == NULL); |
109 | 145 | ||
@@ -116,20 +152,23 @@ static int iommu_queue_inv_dev_entry(struct amd_iommu *iommu, u16 devid) | |||
116 | return iommu_queue_command(iommu, &cmd); | 152 | return iommu_queue_command(iommu, &cmd); |
117 | } | 153 | } |
118 | 154 | ||
155 | /* | ||
156 | * Generic command send function for invalidaing TLB entries | ||
157 | */ | ||
119 | static int iommu_queue_inv_iommu_pages(struct amd_iommu *iommu, | 158 | static int iommu_queue_inv_iommu_pages(struct amd_iommu *iommu, |
120 | u64 address, u16 domid, int pde, int s) | 159 | u64 address, u16 domid, int pde, int s) |
121 | { | 160 | { |
122 | struct command cmd; | 161 | struct iommu_cmd cmd; |
123 | 162 | ||
124 | memset(&cmd, 0, sizeof(cmd)); | 163 | memset(&cmd, 0, sizeof(cmd)); |
125 | address &= PAGE_MASK; | 164 | address &= PAGE_MASK; |
126 | CMD_SET_TYPE(&cmd, CMD_INV_IOMMU_PAGES); | 165 | CMD_SET_TYPE(&cmd, CMD_INV_IOMMU_PAGES); |
127 | cmd.data[1] |= domid; | 166 | cmd.data[1] |= domid; |
128 | cmd.data[2] = LOW_U32(address); | 167 | cmd.data[2] = LOW_U32(address); |
129 | cmd.data[3] = HIGH_U32(address); | 168 | cmd.data[3] = upper_32_bits(address); |
130 | if (s) | 169 | if (s) /* size bit - we flush more than one 4kb page */ |
131 | cmd.data[2] |= CMD_INV_IOMMU_PAGES_SIZE_MASK; | 170 | cmd.data[2] |= CMD_INV_IOMMU_PAGES_SIZE_MASK; |
132 | if (pde) | 171 | if (pde) /* PDE bit - we wan't flush everything not only the PTEs */ |
133 | cmd.data[2] |= CMD_INV_IOMMU_PAGES_PDE_MASK; | 172 | cmd.data[2] |= CMD_INV_IOMMU_PAGES_PDE_MASK; |
134 | 173 | ||
135 | iommu->need_sync = 1; | 174 | iommu->need_sync = 1; |
@@ -137,6 +176,11 @@ static int iommu_queue_inv_iommu_pages(struct amd_iommu *iommu, | |||
137 | return iommu_queue_command(iommu, &cmd); | 176 | return iommu_queue_command(iommu, &cmd); |
138 | } | 177 | } |
139 | 178 | ||
179 | /* | ||
180 | * TLB invalidation function which is called from the mapping functions. | ||
181 | * It invalidates a single PTE if the range to flush is within a single | ||
182 | * page. Otherwise it flushes the whole TLB of the IOMMU. | ||
183 | */ | ||
140 | static int iommu_flush_pages(struct amd_iommu *iommu, u16 domid, | 184 | static int iommu_flush_pages(struct amd_iommu *iommu, u16 domid, |
141 | u64 address, size_t size) | 185 | u64 address, size_t size) |
142 | { | 186 | { |
@@ -159,6 +203,20 @@ static int iommu_flush_pages(struct amd_iommu *iommu, u16 domid, | |||
159 | return 0; | 203 | return 0; |
160 | } | 204 | } |
161 | 205 | ||
206 | /**************************************************************************** | ||
207 | * | ||
208 | * The functions below are used the create the page table mappings for | ||
209 | * unity mapped regions. | ||
210 | * | ||
211 | ****************************************************************************/ | ||
212 | |||
213 | /* | ||
214 | * Generic mapping functions. It maps a physical address into a DMA | ||
215 | * address space. It allocates the page table pages if necessary. | ||
216 | * In the future it can be extended to a generic mapping function | ||
217 | * supporting all features of AMD IOMMU page tables like level skipping | ||
218 | * and full 64 bit address spaces. | ||
219 | */ | ||
162 | static int iommu_map(struct protection_domain *dom, | 220 | static int iommu_map(struct protection_domain *dom, |
163 | unsigned long bus_addr, | 221 | unsigned long bus_addr, |
164 | unsigned long phys_addr, | 222 | unsigned long phys_addr, |
@@ -209,6 +267,10 @@ static int iommu_map(struct protection_domain *dom, | |||
209 | return 0; | 267 | return 0; |
210 | } | 268 | } |
211 | 269 | ||
270 | /* | ||
271 | * This function checks if a specific unity mapping entry is needed for | ||
272 | * this specific IOMMU. | ||
273 | */ | ||
212 | static int iommu_for_unity_map(struct amd_iommu *iommu, | 274 | static int iommu_for_unity_map(struct amd_iommu *iommu, |
213 | struct unity_map_entry *entry) | 275 | struct unity_map_entry *entry) |
214 | { | 276 | { |
@@ -223,6 +285,12 @@ static int iommu_for_unity_map(struct amd_iommu *iommu, | |||
223 | return 0; | 285 | return 0; |
224 | } | 286 | } |
225 | 287 | ||
288 | /* | ||
289 | * Init the unity mappings for a specific IOMMU in the system | ||
290 | * | ||
291 | * Basically iterates over all unity mapping entries and applies them to | ||
292 | * the default domain DMA of that IOMMU if necessary. | ||
293 | */ | ||
226 | static int iommu_init_unity_mappings(struct amd_iommu *iommu) | 294 | static int iommu_init_unity_mappings(struct amd_iommu *iommu) |
227 | { | 295 | { |
228 | struct unity_map_entry *entry; | 296 | struct unity_map_entry *entry; |
@@ -239,6 +307,10 @@ static int iommu_init_unity_mappings(struct amd_iommu *iommu) | |||
239 | return 0; | 307 | return 0; |
240 | } | 308 | } |
241 | 309 | ||
310 | /* | ||
311 | * This function actually applies the mapping to the page table of the | ||
312 | * dma_ops domain. | ||
313 | */ | ||
242 | static int dma_ops_unity_map(struct dma_ops_domain *dma_dom, | 314 | static int dma_ops_unity_map(struct dma_ops_domain *dma_dom, |
243 | struct unity_map_entry *e) | 315 | struct unity_map_entry *e) |
244 | { | 316 | { |
@@ -261,6 +333,9 @@ static int dma_ops_unity_map(struct dma_ops_domain *dma_dom, | |||
261 | return 0; | 333 | return 0; |
262 | } | 334 | } |
263 | 335 | ||
336 | /* | ||
337 | * Inits the unity mappings required for a specific device | ||
338 | */ | ||
264 | static int init_unity_mappings_for_device(struct dma_ops_domain *dma_dom, | 339 | static int init_unity_mappings_for_device(struct dma_ops_domain *dma_dom, |
265 | u16 devid) | 340 | u16 devid) |
266 | { | 341 | { |
@@ -278,12 +353,26 @@ static int init_unity_mappings_for_device(struct dma_ops_domain *dma_dom, | |||
278 | return 0; | 353 | return 0; |
279 | } | 354 | } |
280 | 355 | ||
356 | /**************************************************************************** | ||
357 | * | ||
358 | * The next functions belong to the address allocator for the dma_ops | ||
359 | * interface functions. They work like the allocators in the other IOMMU | ||
360 | * drivers. Its basically a bitmap which marks the allocated pages in | ||
361 | * the aperture. Maybe it could be enhanced in the future to a more | ||
362 | * efficient allocator. | ||
363 | * | ||
364 | ****************************************************************************/ | ||
281 | static unsigned long dma_mask_to_pages(unsigned long mask) | 365 | static unsigned long dma_mask_to_pages(unsigned long mask) |
282 | { | 366 | { |
283 | return (mask >> PAGE_SHIFT) + | 367 | return (mask >> PAGE_SHIFT) + |
284 | (PAGE_ALIGN(mask & ~PAGE_MASK) >> PAGE_SHIFT); | 368 | (PAGE_ALIGN(mask & ~PAGE_MASK) >> PAGE_SHIFT); |
285 | } | 369 | } |
286 | 370 | ||
371 | /* | ||
372 | * The address allocator core function. | ||
373 | * | ||
374 | * called with domain->lock held | ||
375 | */ | ||
287 | static unsigned long dma_ops_alloc_addresses(struct device *dev, | 376 | static unsigned long dma_ops_alloc_addresses(struct device *dev, |
288 | struct dma_ops_domain *dom, | 377 | struct dma_ops_domain *dom, |
289 | unsigned int pages) | 378 | unsigned int pages) |
@@ -317,6 +406,11 @@ static unsigned long dma_ops_alloc_addresses(struct device *dev, | |||
317 | return address; | 406 | return address; |
318 | } | 407 | } |
319 | 408 | ||
409 | /* | ||
410 | * The address free function. | ||
411 | * | ||
412 | * called with domain->lock held | ||
413 | */ | ||
320 | static void dma_ops_free_addresses(struct dma_ops_domain *dom, | 414 | static void dma_ops_free_addresses(struct dma_ops_domain *dom, |
321 | unsigned long address, | 415 | unsigned long address, |
322 | unsigned int pages) | 416 | unsigned int pages) |
@@ -325,6 +419,16 @@ static void dma_ops_free_addresses(struct dma_ops_domain *dom, | |||
325 | iommu_area_free(dom->bitmap, address, pages); | 419 | iommu_area_free(dom->bitmap, address, pages); |
326 | } | 420 | } |
327 | 421 | ||
422 | /**************************************************************************** | ||
423 | * | ||
424 | * The next functions belong to the domain allocation. A domain is | ||
425 | * allocated for every IOMMU as the default domain. If device isolation | ||
426 | * is enabled, every device get its own domain. The most important thing | ||
427 | * about domains is the page table mapping the DMA address space they | ||
428 | * contain. | ||
429 | * | ||
430 | ****************************************************************************/ | ||
431 | |||
328 | static u16 domain_id_alloc(void) | 432 | static u16 domain_id_alloc(void) |
329 | { | 433 | { |
330 | unsigned long flags; | 434 | unsigned long flags; |
@@ -342,6 +446,10 @@ static u16 domain_id_alloc(void) | |||
342 | return id; | 446 | return id; |
343 | } | 447 | } |
344 | 448 | ||
449 | /* | ||
450 | * Used to reserve address ranges in the aperture (e.g. for exclusion | ||
451 | * ranges. | ||
452 | */ | ||
345 | static void dma_ops_reserve_addresses(struct dma_ops_domain *dom, | 453 | static void dma_ops_reserve_addresses(struct dma_ops_domain *dom, |
346 | unsigned long start_page, | 454 | unsigned long start_page, |
347 | unsigned int pages) | 455 | unsigned int pages) |
@@ -382,6 +490,10 @@ static void dma_ops_free_pagetable(struct dma_ops_domain *dma_dom) | |||
382 | free_page((unsigned long)p1); | 490 | free_page((unsigned long)p1); |
383 | } | 491 | } |
384 | 492 | ||
493 | /* | ||
494 | * Free a domain, only used if something went wrong in the | ||
495 | * allocation path and we need to free an already allocated page table | ||
496 | */ | ||
385 | static void dma_ops_domain_free(struct dma_ops_domain *dom) | 497 | static void dma_ops_domain_free(struct dma_ops_domain *dom) |
386 | { | 498 | { |
387 | if (!dom) | 499 | if (!dom) |
@@ -396,6 +508,11 @@ static void dma_ops_domain_free(struct dma_ops_domain *dom) | |||
396 | kfree(dom); | 508 | kfree(dom); |
397 | } | 509 | } |
398 | 510 | ||
511 | /* | ||
512 | * Allocates a new protection domain usable for the dma_ops functions. | ||
513 | * It also intializes the page table and the address allocator data | ||
514 | * structures required for the dma_ops interface | ||
515 | */ | ||
399 | static struct dma_ops_domain *dma_ops_domain_alloc(struct amd_iommu *iommu, | 516 | static struct dma_ops_domain *dma_ops_domain_alloc(struct amd_iommu *iommu, |
400 | unsigned order) | 517 | unsigned order) |
401 | { | 518 | { |
@@ -436,6 +553,7 @@ static struct dma_ops_domain *dma_ops_domain_alloc(struct amd_iommu *iommu, | |||
436 | dma_dom->bitmap[0] = 1; | 553 | dma_dom->bitmap[0] = 1; |
437 | dma_dom->next_bit = 0; | 554 | dma_dom->next_bit = 0; |
438 | 555 | ||
556 | /* Intialize the exclusion range if necessary */ | ||
439 | if (iommu->exclusion_start && | 557 | if (iommu->exclusion_start && |
440 | iommu->exclusion_start < dma_dom->aperture_size) { | 558 | iommu->exclusion_start < dma_dom->aperture_size) { |
441 | unsigned long startpage = iommu->exclusion_start >> PAGE_SHIFT; | 559 | unsigned long startpage = iommu->exclusion_start >> PAGE_SHIFT; |
@@ -444,6 +562,11 @@ static struct dma_ops_domain *dma_ops_domain_alloc(struct amd_iommu *iommu, | |||
444 | dma_ops_reserve_addresses(dma_dom, startpage, pages); | 562 | dma_ops_reserve_addresses(dma_dom, startpage, pages); |
445 | } | 563 | } |
446 | 564 | ||
565 | /* | ||
566 | * At the last step, build the page tables so we don't need to | ||
567 | * allocate page table pages in the dma_ops mapping/unmapping | ||
568 | * path. | ||
569 | */ | ||
447 | num_pte_pages = dma_dom->aperture_size / (PAGE_SIZE * 512); | 570 | num_pte_pages = dma_dom->aperture_size / (PAGE_SIZE * 512); |
448 | dma_dom->pte_pages = kzalloc(num_pte_pages * sizeof(void *), | 571 | dma_dom->pte_pages = kzalloc(num_pte_pages * sizeof(void *), |
449 | GFP_KERNEL); | 572 | GFP_KERNEL); |
@@ -472,6 +595,10 @@ free_dma_dom: | |||
472 | return NULL; | 595 | return NULL; |
473 | } | 596 | } |
474 | 597 | ||
598 | /* | ||
599 | * Find out the protection domain structure for a given PCI device. This | ||
600 | * will give us the pointer to the page table root for example. | ||
601 | */ | ||
475 | static struct protection_domain *domain_for_device(u16 devid) | 602 | static struct protection_domain *domain_for_device(u16 devid) |
476 | { | 603 | { |
477 | struct protection_domain *dom; | 604 | struct protection_domain *dom; |
@@ -484,6 +611,10 @@ static struct protection_domain *domain_for_device(u16 devid) | |||
484 | return dom; | 611 | return dom; |
485 | } | 612 | } |
486 | 613 | ||
614 | /* | ||
615 | * If a device is not yet associated with a domain, this function does | ||
616 | * assigns it visible for the hardware | ||
617 | */ | ||
487 | static void set_device_domain(struct amd_iommu *iommu, | 618 | static void set_device_domain(struct amd_iommu *iommu, |
488 | struct protection_domain *domain, | 619 | struct protection_domain *domain, |
489 | u16 devid) | 620 | u16 devid) |
@@ -508,6 +639,19 @@ static void set_device_domain(struct amd_iommu *iommu, | |||
508 | iommu->need_sync = 1; | 639 | iommu->need_sync = 1; |
509 | } | 640 | } |
510 | 641 | ||
642 | /***************************************************************************** | ||
643 | * | ||
644 | * The next functions belong to the dma_ops mapping/unmapping code. | ||
645 | * | ||
646 | *****************************************************************************/ | ||
647 | |||
648 | /* | ||
649 | * In the dma_ops path we only have the struct device. This function | ||
650 | * finds the corresponding IOMMU, the protection domain and the | ||
651 | * requestor id for a given device. | ||
652 | * If the device is not yet associated with a domain this is also done | ||
653 | * in this function. | ||
654 | */ | ||
511 | static int get_device_resources(struct device *dev, | 655 | static int get_device_resources(struct device *dev, |
512 | struct amd_iommu **iommu, | 656 | struct amd_iommu **iommu, |
513 | struct protection_domain **domain, | 657 | struct protection_domain **domain, |
@@ -520,8 +664,9 @@ static int get_device_resources(struct device *dev, | |||
520 | BUG_ON(!dev || dev->bus != &pci_bus_type || !dev->dma_mask); | 664 | BUG_ON(!dev || dev->bus != &pci_bus_type || !dev->dma_mask); |
521 | 665 | ||
522 | pcidev = to_pci_dev(dev); | 666 | pcidev = to_pci_dev(dev); |
523 | _bdf = (pcidev->bus->number << 8) | pcidev->devfn; | 667 | _bdf = calc_devid(pcidev->bus->number, pcidev->devfn); |
524 | 668 | ||
669 | /* device not translated by any IOMMU in the system? */ | ||
525 | if (_bdf >= amd_iommu_last_bdf) { | 670 | if (_bdf >= amd_iommu_last_bdf) { |
526 | *iommu = NULL; | 671 | *iommu = NULL; |
527 | *domain = NULL; | 672 | *domain = NULL; |
@@ -547,6 +692,10 @@ static int get_device_resources(struct device *dev, | |||
547 | return 1; | 692 | return 1; |
548 | } | 693 | } |
549 | 694 | ||
695 | /* | ||
696 | * This is the generic map function. It maps one 4kb page at paddr to | ||
697 | * the given address in the DMA address space for the domain. | ||
698 | */ | ||
550 | static dma_addr_t dma_ops_domain_map(struct amd_iommu *iommu, | 699 | static dma_addr_t dma_ops_domain_map(struct amd_iommu *iommu, |
551 | struct dma_ops_domain *dom, | 700 | struct dma_ops_domain *dom, |
552 | unsigned long address, | 701 | unsigned long address, |
@@ -578,6 +727,9 @@ static dma_addr_t dma_ops_domain_map(struct amd_iommu *iommu, | |||
578 | return (dma_addr_t)address; | 727 | return (dma_addr_t)address; |
579 | } | 728 | } |
580 | 729 | ||
730 | /* | ||
731 | * The generic unmapping function for on page in the DMA address space. | ||
732 | */ | ||
581 | static void dma_ops_domain_unmap(struct amd_iommu *iommu, | 733 | static void dma_ops_domain_unmap(struct amd_iommu *iommu, |
582 | struct dma_ops_domain *dom, | 734 | struct dma_ops_domain *dom, |
583 | unsigned long address) | 735 | unsigned long address) |
@@ -597,6 +749,12 @@ static void dma_ops_domain_unmap(struct amd_iommu *iommu, | |||
597 | *pte = 0ULL; | 749 | *pte = 0ULL; |
598 | } | 750 | } |
599 | 751 | ||
752 | /* | ||
753 | * This function contains common code for mapping of a physically | ||
754 | * contiguous memory region into DMA address space. It is uses by all | ||
755 | * mapping functions provided by this IOMMU driver. | ||
756 | * Must be called with the domain lock held. | ||
757 | */ | ||
600 | static dma_addr_t __map_single(struct device *dev, | 758 | static dma_addr_t __map_single(struct device *dev, |
601 | struct amd_iommu *iommu, | 759 | struct amd_iommu *iommu, |
602 | struct dma_ops_domain *dma_dom, | 760 | struct dma_ops_domain *dma_dom, |
@@ -628,6 +786,10 @@ out: | |||
628 | return address; | 786 | return address; |
629 | } | 787 | } |
630 | 788 | ||
789 | /* | ||
790 | * Does the reverse of the __map_single function. Must be called with | ||
791 | * the domain lock held too | ||
792 | */ | ||
631 | static void __unmap_single(struct amd_iommu *iommu, | 793 | static void __unmap_single(struct amd_iommu *iommu, |
632 | struct dma_ops_domain *dma_dom, | 794 | struct dma_ops_domain *dma_dom, |
633 | dma_addr_t dma_addr, | 795 | dma_addr_t dma_addr, |
@@ -652,6 +814,9 @@ static void __unmap_single(struct amd_iommu *iommu, | |||
652 | dma_ops_free_addresses(dma_dom, dma_addr, pages); | 814 | dma_ops_free_addresses(dma_dom, dma_addr, pages); |
653 | } | 815 | } |
654 | 816 | ||
817 | /* | ||
818 | * The exported map_single function for dma_ops. | ||
819 | */ | ||
655 | static dma_addr_t map_single(struct device *dev, phys_addr_t paddr, | 820 | static dma_addr_t map_single(struct device *dev, phys_addr_t paddr, |
656 | size_t size, int dir) | 821 | size_t size, int dir) |
657 | { | 822 | { |
@@ -664,6 +829,7 @@ static dma_addr_t map_single(struct device *dev, phys_addr_t paddr, | |||
664 | get_device_resources(dev, &iommu, &domain, &devid); | 829 | get_device_resources(dev, &iommu, &domain, &devid); |
665 | 830 | ||
666 | if (iommu == NULL || domain == NULL) | 831 | if (iommu == NULL || domain == NULL) |
832 | /* device not handled by any AMD IOMMU */ | ||
667 | return (dma_addr_t)paddr; | 833 | return (dma_addr_t)paddr; |
668 | 834 | ||
669 | spin_lock_irqsave(&domain->lock, flags); | 835 | spin_lock_irqsave(&domain->lock, flags); |
@@ -683,6 +849,9 @@ out: | |||
683 | return addr; | 849 | return addr; |
684 | } | 850 | } |
685 | 851 | ||
852 | /* | ||
853 | * The exported unmap_single function for dma_ops. | ||
854 | */ | ||
686 | static void unmap_single(struct device *dev, dma_addr_t dma_addr, | 855 | static void unmap_single(struct device *dev, dma_addr_t dma_addr, |
687 | size_t size, int dir) | 856 | size_t size, int dir) |
688 | { | 857 | { |
@@ -692,6 +861,7 @@ static void unmap_single(struct device *dev, dma_addr_t dma_addr, | |||
692 | u16 devid; | 861 | u16 devid; |
693 | 862 | ||
694 | if (!get_device_resources(dev, &iommu, &domain, &devid)) | 863 | if (!get_device_resources(dev, &iommu, &domain, &devid)) |
864 | /* device not handled by any AMD IOMMU */ | ||
695 | return; | 865 | return; |
696 | 866 | ||
697 | spin_lock_irqsave(&domain->lock, flags); | 867 | spin_lock_irqsave(&domain->lock, flags); |
@@ -706,6 +876,10 @@ static void unmap_single(struct device *dev, dma_addr_t dma_addr, | |||
706 | spin_unlock_irqrestore(&domain->lock, flags); | 876 | spin_unlock_irqrestore(&domain->lock, flags); |
707 | } | 877 | } |
708 | 878 | ||
879 | /* | ||
880 | * This is a special map_sg function which is used if we should map a | ||
881 | * device which is not handled by an AMD IOMMU in the system. | ||
882 | */ | ||
709 | static int map_sg_no_iommu(struct device *dev, struct scatterlist *sglist, | 883 | static int map_sg_no_iommu(struct device *dev, struct scatterlist *sglist, |
710 | int nelems, int dir) | 884 | int nelems, int dir) |
711 | { | 885 | { |
@@ -720,6 +894,10 @@ static int map_sg_no_iommu(struct device *dev, struct scatterlist *sglist, | |||
720 | return nelems; | 894 | return nelems; |
721 | } | 895 | } |
722 | 896 | ||
897 | /* | ||
898 | * The exported map_sg function for dma_ops (handles scatter-gather | ||
899 | * lists). | ||
900 | */ | ||
723 | static int map_sg(struct device *dev, struct scatterlist *sglist, | 901 | static int map_sg(struct device *dev, struct scatterlist *sglist, |
724 | int nelems, int dir) | 902 | int nelems, int dir) |
725 | { | 903 | { |
@@ -775,6 +953,10 @@ unmap: | |||
775 | goto out; | 953 | goto out; |
776 | } | 954 | } |
777 | 955 | ||
956 | /* | ||
957 | * The exported map_sg function for dma_ops (handles scatter-gather | ||
958 | * lists). | ||
959 | */ | ||
778 | static void unmap_sg(struct device *dev, struct scatterlist *sglist, | 960 | static void unmap_sg(struct device *dev, struct scatterlist *sglist, |
779 | int nelems, int dir) | 961 | int nelems, int dir) |
780 | { | 962 | { |
@@ -804,6 +986,9 @@ static void unmap_sg(struct device *dev, struct scatterlist *sglist, | |||
804 | spin_unlock_irqrestore(&domain->lock, flags); | 986 | spin_unlock_irqrestore(&domain->lock, flags); |
805 | } | 987 | } |
806 | 988 | ||
989 | /* | ||
990 | * The exported alloc_coherent function for dma_ops. | ||
991 | */ | ||
807 | static void *alloc_coherent(struct device *dev, size_t size, | 992 | static void *alloc_coherent(struct device *dev, size_t size, |
808 | dma_addr_t *dma_addr, gfp_t flag) | 993 | dma_addr_t *dma_addr, gfp_t flag) |
809 | { | 994 | { |
@@ -851,6 +1036,11 @@ out: | |||
851 | return virt_addr; | 1036 | return virt_addr; |
852 | } | 1037 | } |
853 | 1038 | ||
1039 | /* | ||
1040 | * The exported free_coherent function for dma_ops. | ||
1041 | * FIXME: fix the generic x86 DMA layer so that it actually calls that | ||
1042 | * function. | ||
1043 | */ | ||
854 | static void free_coherent(struct device *dev, size_t size, | 1044 | static void free_coherent(struct device *dev, size_t size, |
855 | void *virt_addr, dma_addr_t dma_addr) | 1045 | void *virt_addr, dma_addr_t dma_addr) |
856 | { | 1046 | { |
@@ -879,6 +1069,8 @@ free_mem: | |||
879 | } | 1069 | } |
880 | 1070 | ||
881 | /* | 1071 | /* |
1072 | * The function for pre-allocating protection domains. | ||
1073 | * | ||
882 | * If the driver core informs the DMA layer if a driver grabs a device | 1074 | * If the driver core informs the DMA layer if a driver grabs a device |
883 | * we don't need to preallocate the protection domains anymore. | 1075 | * we don't need to preallocate the protection domains anymore. |
884 | * For now we have to. | 1076 | * For now we have to. |
@@ -921,12 +1113,20 @@ static struct dma_mapping_ops amd_iommu_dma_ops = { | |||
921 | .unmap_sg = unmap_sg, | 1113 | .unmap_sg = unmap_sg, |
922 | }; | 1114 | }; |
923 | 1115 | ||
1116 | /* | ||
1117 | * The function which clues the AMD IOMMU driver into dma_ops. | ||
1118 | */ | ||
924 | int __init amd_iommu_init_dma_ops(void) | 1119 | int __init amd_iommu_init_dma_ops(void) |
925 | { | 1120 | { |
926 | struct amd_iommu *iommu; | 1121 | struct amd_iommu *iommu; |
927 | int order = amd_iommu_aperture_order; | 1122 | int order = amd_iommu_aperture_order; |
928 | int ret; | 1123 | int ret; |
929 | 1124 | ||
1125 | /* | ||
1126 | * first allocate a default protection domain for every IOMMU we | ||
1127 | * found in the system. Devices not assigned to any other | ||
1128 | * protection domain will be assigned to the default one. | ||
1129 | */ | ||
930 | list_for_each_entry(iommu, &amd_iommu_list, list) { | 1130 | list_for_each_entry(iommu, &amd_iommu_list, list) { |
931 | iommu->default_dom = dma_ops_domain_alloc(iommu, order); | 1131 | iommu->default_dom = dma_ops_domain_alloc(iommu, order); |
932 | if (iommu->default_dom == NULL) | 1132 | if (iommu->default_dom == NULL) |
@@ -936,6 +1136,10 @@ int __init amd_iommu_init_dma_ops(void) | |||
936 | goto free_domains; | 1136 | goto free_domains; |
937 | } | 1137 | } |
938 | 1138 | ||
1139 | /* | ||
1140 | * If device isolation is enabled, pre-allocate the protection | ||
1141 | * domains for each device. | ||
1142 | */ | ||
939 | if (amd_iommu_isolate) | 1143 | if (amd_iommu_isolate) |
940 | prealloc_protection_domains(); | 1144 | prealloc_protection_domains(); |
941 | 1145 | ||
@@ -947,6 +1151,7 @@ int __init amd_iommu_init_dma_ops(void) | |||
947 | gart_iommu_aperture = 0; | 1151 | gart_iommu_aperture = 0; |
948 | #endif | 1152 | #endif |
949 | 1153 | ||
1154 | /* Make the driver finally visible to the drivers */ | ||
950 | dma_ops = &amd_iommu_dma_ops; | 1155 | dma_ops = &amd_iommu_dma_ops; |
951 | 1156 | ||
952 | return 0; | 1157 | return 0; |
diff --git a/arch/x86/kernel/amd_iommu_init.c b/arch/x86/kernel/amd_iommu_init.c index 2a13e430437d..c9d8ff2eb130 100644 --- a/arch/x86/kernel/amd_iommu_init.c +++ b/arch/x86/kernel/amd_iommu_init.c | |||
@@ -25,20 +25,13 @@ | |||
25 | #include <asm/pci-direct.h> | 25 | #include <asm/pci-direct.h> |
26 | #include <asm/amd_iommu_types.h> | 26 | #include <asm/amd_iommu_types.h> |
27 | #include <asm/amd_iommu.h> | 27 | #include <asm/amd_iommu.h> |
28 | #include <asm/gart.h> | 28 | #include <asm/iommu.h> |
29 | 29 | ||
30 | /* | 30 | /* |
31 | * definitions for the ACPI scanning code | 31 | * definitions for the ACPI scanning code |
32 | */ | 32 | */ |
33 | #define UPDATE_LAST_BDF(x) do {\ | ||
34 | if ((x) > amd_iommu_last_bdf) \ | ||
35 | amd_iommu_last_bdf = (x); \ | ||
36 | } while (0); | ||
37 | |||
38 | #define DEVID(bus, devfn) (((bus) << 8) | (devfn)) | ||
39 | #define PCI_BUS(x) (((x) >> 8) & 0xff) | 33 | #define PCI_BUS(x) (((x) >> 8) & 0xff) |
40 | #define IVRS_HEADER_LENGTH 48 | 34 | #define IVRS_HEADER_LENGTH 48 |
41 | #define TBL_SIZE(x) (1 << (PAGE_SHIFT + get_order(amd_iommu_last_bdf * (x)))) | ||
42 | 35 | ||
43 | #define ACPI_IVHD_TYPE 0x10 | 36 | #define ACPI_IVHD_TYPE 0x10 |
44 | #define ACPI_IVMD_TYPE_ALL 0x20 | 37 | #define ACPI_IVMD_TYPE_ALL 0x20 |
@@ -71,6 +64,17 @@ | |||
71 | #define ACPI_DEVFLAG_LINT1 0x80 | 64 | #define ACPI_DEVFLAG_LINT1 0x80 |
72 | #define ACPI_DEVFLAG_ATSDIS 0x10000000 | 65 | #define ACPI_DEVFLAG_ATSDIS 0x10000000 |
73 | 66 | ||
67 | /* | ||
68 | * ACPI table definitions | ||
69 | * | ||
70 | * These data structures are laid over the table to parse the important values | ||
71 | * out of it. | ||
72 | */ | ||
73 | |||
74 | /* | ||
75 | * structure describing one IOMMU in the ACPI table. Typically followed by one | ||
76 | * or more ivhd_entrys. | ||
77 | */ | ||
74 | struct ivhd_header { | 78 | struct ivhd_header { |
75 | u8 type; | 79 | u8 type; |
76 | u8 flags; | 80 | u8 flags; |
@@ -83,6 +87,10 @@ struct ivhd_header { | |||
83 | u32 reserved; | 87 | u32 reserved; |
84 | } __attribute__((packed)); | 88 | } __attribute__((packed)); |
85 | 89 | ||
90 | /* | ||
91 | * A device entry describing which devices a specific IOMMU translates and | ||
92 | * which requestor ids they use. | ||
93 | */ | ||
86 | struct ivhd_entry { | 94 | struct ivhd_entry { |
87 | u8 type; | 95 | u8 type; |
88 | u16 devid; | 96 | u16 devid; |
@@ -90,6 +98,10 @@ struct ivhd_entry { | |||
90 | u32 ext; | 98 | u32 ext; |
91 | } __attribute__((packed)); | 99 | } __attribute__((packed)); |
92 | 100 | ||
101 | /* | ||
102 | * An AMD IOMMU memory definition structure. It defines things like exclusion | ||
103 | * ranges for devices and regions that should be unity mapped. | ||
104 | */ | ||
93 | struct ivmd_header { | 105 | struct ivmd_header { |
94 | u8 type; | 106 | u8 type; |
95 | u8 flags; | 107 | u8 flags; |
@@ -103,22 +115,80 @@ struct ivmd_header { | |||
103 | 115 | ||
104 | static int __initdata amd_iommu_detected; | 116 | static int __initdata amd_iommu_detected; |
105 | 117 | ||
106 | u16 amd_iommu_last_bdf; | 118 | u16 amd_iommu_last_bdf; /* largest PCI device id we have |
107 | struct list_head amd_iommu_unity_map; | 119 | to handle */ |
108 | unsigned amd_iommu_aperture_order = 26; | 120 | LIST_HEAD(amd_iommu_unity_map); /* a list of required unity mappings |
109 | int amd_iommu_isolate; | 121 | we find in ACPI */ |
122 | unsigned amd_iommu_aperture_order = 26; /* size of aperture in power of 2 */ | ||
123 | int amd_iommu_isolate; /* if 1, device isolation is enabled */ | ||
124 | |||
125 | LIST_HEAD(amd_iommu_list); /* list of all AMD IOMMUs in the | ||
126 | system */ | ||
110 | 127 | ||
111 | struct list_head amd_iommu_list; | 128 | /* |
129 | * Pointer to the device table which is shared by all AMD IOMMUs | ||
130 | * it is indexed by the PCI device id or the HT unit id and contains | ||
131 | * information about the domain the device belongs to as well as the | ||
132 | * page table root pointer. | ||
133 | */ | ||
112 | struct dev_table_entry *amd_iommu_dev_table; | 134 | struct dev_table_entry *amd_iommu_dev_table; |
135 | |||
136 | /* | ||
137 | * The alias table is a driver specific data structure which contains the | ||
138 | * mappings of the PCI device ids to the actual requestor ids on the IOMMU. | ||
139 | * More than one device can share the same requestor id. | ||
140 | */ | ||
113 | u16 *amd_iommu_alias_table; | 141 | u16 *amd_iommu_alias_table; |
142 | |||
143 | /* | ||
144 | * The rlookup table is used to find the IOMMU which is responsible | ||
145 | * for a specific device. It is also indexed by the PCI device id. | ||
146 | */ | ||
114 | struct amd_iommu **amd_iommu_rlookup_table; | 147 | struct amd_iommu **amd_iommu_rlookup_table; |
148 | |||
149 | /* | ||
150 | * The pd table (protection domain table) is used to find the protection domain | ||
151 | * data structure a device belongs to. Indexed with the PCI device id too. | ||
152 | */ | ||
115 | struct protection_domain **amd_iommu_pd_table; | 153 | struct protection_domain **amd_iommu_pd_table; |
154 | |||
155 | /* | ||
156 | * AMD IOMMU allows up to 2^16 differend protection domains. This is a bitmap | ||
157 | * to know which ones are already in use. | ||
158 | */ | ||
116 | unsigned long *amd_iommu_pd_alloc_bitmap; | 159 | unsigned long *amd_iommu_pd_alloc_bitmap; |
117 | 160 | ||
118 | static u32 dev_table_size; | 161 | static u32 dev_table_size; /* size of the device table */ |
119 | static u32 alias_table_size; | 162 | static u32 alias_table_size; /* size of the alias table */ |
120 | static u32 rlookup_table_size; | 163 | static u32 rlookup_table_size; /* size if the rlookup table */ |
121 | 164 | ||
165 | static inline void update_last_devid(u16 devid) | ||
166 | { | ||
167 | if (devid > amd_iommu_last_bdf) | ||
168 | amd_iommu_last_bdf = devid; | ||
169 | } | ||
170 | |||
171 | static inline unsigned long tbl_size(int entry_size) | ||
172 | { | ||
173 | unsigned shift = PAGE_SHIFT + | ||
174 | get_order(amd_iommu_last_bdf * entry_size); | ||
175 | |||
176 | return 1UL << shift; | ||
177 | } | ||
178 | |||
179 | /**************************************************************************** | ||
180 | * | ||
181 | * AMD IOMMU MMIO register space handling functions | ||
182 | * | ||
183 | * These functions are used to program the IOMMU device registers in | ||
184 | * MMIO space required for that driver. | ||
185 | * | ||
186 | ****************************************************************************/ | ||
187 | |||
188 | /* | ||
189 | * This function set the exclusion range in the IOMMU. DMA accesses to the | ||
190 | * exclusion range are passed through untranslated | ||
191 | */ | ||
122 | static void __init iommu_set_exclusion_range(struct amd_iommu *iommu) | 192 | static void __init iommu_set_exclusion_range(struct amd_iommu *iommu) |
123 | { | 193 | { |
124 | u64 start = iommu->exclusion_start & PAGE_MASK; | 194 | u64 start = iommu->exclusion_start & PAGE_MASK; |
@@ -137,6 +207,7 @@ static void __init iommu_set_exclusion_range(struct amd_iommu *iommu) | |||
137 | &entry, sizeof(entry)); | 207 | &entry, sizeof(entry)); |
138 | } | 208 | } |
139 | 209 | ||
210 | /* Programs the physical address of the device table into the IOMMU hardware */ | ||
140 | static void __init iommu_set_device_table(struct amd_iommu *iommu) | 211 | static void __init iommu_set_device_table(struct amd_iommu *iommu) |
141 | { | 212 | { |
142 | u32 entry; | 213 | u32 entry; |
@@ -149,6 +220,7 @@ static void __init iommu_set_device_table(struct amd_iommu *iommu) | |||
149 | &entry, sizeof(entry)); | 220 | &entry, sizeof(entry)); |
150 | } | 221 | } |
151 | 222 | ||
223 | /* Generic functions to enable/disable certain features of the IOMMU. */ | ||
152 | static void __init iommu_feature_enable(struct amd_iommu *iommu, u8 bit) | 224 | static void __init iommu_feature_enable(struct amd_iommu *iommu, u8 bit) |
153 | { | 225 | { |
154 | u32 ctrl; | 226 | u32 ctrl; |
@@ -167,6 +239,7 @@ static void __init iommu_feature_disable(struct amd_iommu *iommu, u8 bit) | |||
167 | writel(ctrl, iommu->mmio_base + MMIO_CONTROL_OFFSET); | 239 | writel(ctrl, iommu->mmio_base + MMIO_CONTROL_OFFSET); |
168 | } | 240 | } |
169 | 241 | ||
242 | /* Function to enable the hardware */ | ||
170 | void __init iommu_enable(struct amd_iommu *iommu) | 243 | void __init iommu_enable(struct amd_iommu *iommu) |
171 | { | 244 | { |
172 | printk(KERN_INFO "AMD IOMMU: Enabling IOMMU at "); | 245 | printk(KERN_INFO "AMD IOMMU: Enabling IOMMU at "); |
@@ -176,6 +249,10 @@ void __init iommu_enable(struct amd_iommu *iommu) | |||
176 | iommu_feature_enable(iommu, CONTROL_IOMMU_EN); | 249 | iommu_feature_enable(iommu, CONTROL_IOMMU_EN); |
177 | } | 250 | } |
178 | 251 | ||
252 | /* | ||
253 | * mapping and unmapping functions for the IOMMU MMIO space. Each AMD IOMMU in | ||
254 | * the system has one. | ||
255 | */ | ||
179 | static u8 * __init iommu_map_mmio_space(u64 address) | 256 | static u8 * __init iommu_map_mmio_space(u64 address) |
180 | { | 257 | { |
181 | u8 *ret; | 258 | u8 *ret; |
@@ -199,16 +276,33 @@ static void __init iommu_unmap_mmio_space(struct amd_iommu *iommu) | |||
199 | release_mem_region(iommu->mmio_phys, MMIO_REGION_LENGTH); | 276 | release_mem_region(iommu->mmio_phys, MMIO_REGION_LENGTH); |
200 | } | 277 | } |
201 | 278 | ||
279 | /**************************************************************************** | ||
280 | * | ||
281 | * The functions below belong to the first pass of AMD IOMMU ACPI table | ||
282 | * parsing. In this pass we try to find out the highest device id this | ||
283 | * code has to handle. Upon this information the size of the shared data | ||
284 | * structures is determined later. | ||
285 | * | ||
286 | ****************************************************************************/ | ||
287 | |||
288 | /* | ||
289 | * This function reads the last device id the IOMMU has to handle from the PCI | ||
290 | * capability header for this IOMMU | ||
291 | */ | ||
202 | static int __init find_last_devid_on_pci(int bus, int dev, int fn, int cap_ptr) | 292 | static int __init find_last_devid_on_pci(int bus, int dev, int fn, int cap_ptr) |
203 | { | 293 | { |
204 | u32 cap; | 294 | u32 cap; |
205 | 295 | ||
206 | cap = read_pci_config(bus, dev, fn, cap_ptr+MMIO_RANGE_OFFSET); | 296 | cap = read_pci_config(bus, dev, fn, cap_ptr+MMIO_RANGE_OFFSET); |
207 | UPDATE_LAST_BDF(DEVID(MMIO_GET_BUS(cap), MMIO_GET_LD(cap))); | 297 | update_last_devid(calc_devid(MMIO_GET_BUS(cap), MMIO_GET_LD(cap))); |
208 | 298 | ||
209 | return 0; | 299 | return 0; |
210 | } | 300 | } |
211 | 301 | ||
302 | /* | ||
303 | * After reading the highest device id from the IOMMU PCI capability header | ||
304 | * this function looks if there is a higher device id defined in the ACPI table | ||
305 | */ | ||
212 | static int __init find_last_devid_from_ivhd(struct ivhd_header *h) | 306 | static int __init find_last_devid_from_ivhd(struct ivhd_header *h) |
213 | { | 307 | { |
214 | u8 *p = (void *)h, *end = (void *)h; | 308 | u8 *p = (void *)h, *end = (void *)h; |
@@ -229,7 +323,8 @@ static int __init find_last_devid_from_ivhd(struct ivhd_header *h) | |||
229 | case IVHD_DEV_RANGE_END: | 323 | case IVHD_DEV_RANGE_END: |
230 | case IVHD_DEV_ALIAS: | 324 | case IVHD_DEV_ALIAS: |
231 | case IVHD_DEV_EXT_SELECT: | 325 | case IVHD_DEV_EXT_SELECT: |
232 | UPDATE_LAST_BDF(dev->devid); | 326 | /* all the above subfield types refer to device ids */ |
327 | update_last_devid(dev->devid); | ||
233 | break; | 328 | break; |
234 | default: | 329 | default: |
235 | break; | 330 | break; |
@@ -242,6 +337,11 @@ static int __init find_last_devid_from_ivhd(struct ivhd_header *h) | |||
242 | return 0; | 337 | return 0; |
243 | } | 338 | } |
244 | 339 | ||
340 | /* | ||
341 | * Iterate over all IVHD entries in the ACPI table and find the highest device | ||
342 | * id which we need to handle. This is the first of three functions which parse | ||
343 | * the ACPI table. So we check the checksum here. | ||
344 | */ | ||
245 | static int __init find_last_devid_acpi(struct acpi_table_header *table) | 345 | static int __init find_last_devid_acpi(struct acpi_table_header *table) |
246 | { | 346 | { |
247 | int i; | 347 | int i; |
@@ -277,19 +377,31 @@ static int __init find_last_devid_acpi(struct acpi_table_header *table) | |||
277 | return 0; | 377 | return 0; |
278 | } | 378 | } |
279 | 379 | ||
380 | /**************************************************************************** | ||
381 | * | ||
382 | * The following functions belong the the code path which parses the ACPI table | ||
383 | * the second time. In this ACPI parsing iteration we allocate IOMMU specific | ||
384 | * data structures, initialize the device/alias/rlookup table and also | ||
385 | * basically initialize the hardware. | ||
386 | * | ||
387 | ****************************************************************************/ | ||
388 | |||
389 | /* | ||
390 | * Allocates the command buffer. This buffer is per AMD IOMMU. We can | ||
391 | * write commands to that buffer later and the IOMMU will execute them | ||
392 | * asynchronously | ||
393 | */ | ||
280 | static u8 * __init alloc_command_buffer(struct amd_iommu *iommu) | 394 | static u8 * __init alloc_command_buffer(struct amd_iommu *iommu) |
281 | { | 395 | { |
282 | u8 *cmd_buf = (u8 *)__get_free_pages(GFP_KERNEL, | 396 | u8 *cmd_buf = (u8 *)__get_free_pages(GFP_KERNEL | __GFP_ZERO, |
283 | get_order(CMD_BUFFER_SIZE)); | 397 | get_order(CMD_BUFFER_SIZE)); |
284 | u64 entry = 0; | 398 | u64 entry; |
285 | 399 | ||
286 | if (cmd_buf == NULL) | 400 | if (cmd_buf == NULL) |
287 | return NULL; | 401 | return NULL; |
288 | 402 | ||
289 | iommu->cmd_buf_size = CMD_BUFFER_SIZE; | 403 | iommu->cmd_buf_size = CMD_BUFFER_SIZE; |
290 | 404 | ||
291 | memset(cmd_buf, 0, CMD_BUFFER_SIZE); | ||
292 | |||
293 | entry = (u64)virt_to_phys(cmd_buf); | 405 | entry = (u64)virt_to_phys(cmd_buf); |
294 | entry |= MMIO_CMD_SIZE_512; | 406 | entry |= MMIO_CMD_SIZE_512; |
295 | memcpy_toio(iommu->mmio_base + MMIO_CMD_BUF_OFFSET, | 407 | memcpy_toio(iommu->mmio_base + MMIO_CMD_BUF_OFFSET, |
@@ -302,11 +414,10 @@ static u8 * __init alloc_command_buffer(struct amd_iommu *iommu) | |||
302 | 414 | ||
303 | static void __init free_command_buffer(struct amd_iommu *iommu) | 415 | static void __init free_command_buffer(struct amd_iommu *iommu) |
304 | { | 416 | { |
305 | if (iommu->cmd_buf) | 417 | free_pages((unsigned long)iommu->cmd_buf, get_order(CMD_BUFFER_SIZE)); |
306 | free_pages((unsigned long)iommu->cmd_buf, | ||
307 | get_order(CMD_BUFFER_SIZE)); | ||
308 | } | 418 | } |
309 | 419 | ||
420 | /* sets a specific bit in the device table entry. */ | ||
310 | static void set_dev_entry_bit(u16 devid, u8 bit) | 421 | static void set_dev_entry_bit(u16 devid, u8 bit) |
311 | { | 422 | { |
312 | int i = (bit >> 5) & 0x07; | 423 | int i = (bit >> 5) & 0x07; |
@@ -315,7 +426,18 @@ static void set_dev_entry_bit(u16 devid, u8 bit) | |||
315 | amd_iommu_dev_table[devid].data[i] |= (1 << _bit); | 426 | amd_iommu_dev_table[devid].data[i] |= (1 << _bit); |
316 | } | 427 | } |
317 | 428 | ||
318 | static void __init set_dev_entry_from_acpi(u16 devid, u32 flags, u32 ext_flags) | 429 | /* Writes the specific IOMMU for a device into the rlookup table */ |
430 | static void __init set_iommu_for_device(struct amd_iommu *iommu, u16 devid) | ||
431 | { | ||
432 | amd_iommu_rlookup_table[devid] = iommu; | ||
433 | } | ||
434 | |||
435 | /* | ||
436 | * This function takes the device specific flags read from the ACPI | ||
437 | * table and sets up the device table entry with that information | ||
438 | */ | ||
439 | static void __init set_dev_entry_from_acpi(struct amd_iommu *iommu, | ||
440 | u16 devid, u32 flags, u32 ext_flags) | ||
319 | { | 441 | { |
320 | if (flags & ACPI_DEVFLAG_INITPASS) | 442 | if (flags & ACPI_DEVFLAG_INITPASS) |
321 | set_dev_entry_bit(devid, DEV_ENTRY_INIT_PASS); | 443 | set_dev_entry_bit(devid, DEV_ENTRY_INIT_PASS); |
@@ -331,13 +453,14 @@ static void __init set_dev_entry_from_acpi(u16 devid, u32 flags, u32 ext_flags) | |||
331 | set_dev_entry_bit(devid, DEV_ENTRY_LINT0_PASS); | 453 | set_dev_entry_bit(devid, DEV_ENTRY_LINT0_PASS); |
332 | if (flags & ACPI_DEVFLAG_LINT1) | 454 | if (flags & ACPI_DEVFLAG_LINT1) |
333 | set_dev_entry_bit(devid, DEV_ENTRY_LINT1_PASS); | 455 | set_dev_entry_bit(devid, DEV_ENTRY_LINT1_PASS); |
334 | } | ||
335 | 456 | ||
336 | static void __init set_iommu_for_device(struct amd_iommu *iommu, u16 devid) | 457 | set_iommu_for_device(iommu, devid); |
337 | { | ||
338 | amd_iommu_rlookup_table[devid] = iommu; | ||
339 | } | 458 | } |
340 | 459 | ||
460 | /* | ||
461 | * Reads the device exclusion range from ACPI and initialize IOMMU with | ||
462 | * it | ||
463 | */ | ||
341 | static void __init set_device_exclusion_range(u16 devid, struct ivmd_header *m) | 464 | static void __init set_device_exclusion_range(u16 devid, struct ivmd_header *m) |
342 | { | 465 | { |
343 | struct amd_iommu *iommu = amd_iommu_rlookup_table[devid]; | 466 | struct amd_iommu *iommu = amd_iommu_rlookup_table[devid]; |
@@ -346,12 +469,22 @@ static void __init set_device_exclusion_range(u16 devid, struct ivmd_header *m) | |||
346 | return; | 469 | return; |
347 | 470 | ||
348 | if (iommu) { | 471 | if (iommu) { |
472 | /* | ||
473 | * We only can configure exclusion ranges per IOMMU, not | ||
474 | * per device. But we can enable the exclusion range per | ||
475 | * device. This is done here | ||
476 | */ | ||
349 | set_dev_entry_bit(m->devid, DEV_ENTRY_EX); | 477 | set_dev_entry_bit(m->devid, DEV_ENTRY_EX); |
350 | iommu->exclusion_start = m->range_start; | 478 | iommu->exclusion_start = m->range_start; |
351 | iommu->exclusion_length = m->range_length; | 479 | iommu->exclusion_length = m->range_length; |
352 | } | 480 | } |
353 | } | 481 | } |
354 | 482 | ||
483 | /* | ||
484 | * This function reads some important data from the IOMMU PCI space and | ||
485 | * initializes the driver data structure with it. It reads the hardware | ||
486 | * capabilities and the first/last device entries | ||
487 | */ | ||
355 | static void __init init_iommu_from_pci(struct amd_iommu *iommu) | 488 | static void __init init_iommu_from_pci(struct amd_iommu *iommu) |
356 | { | 489 | { |
357 | int bus = PCI_BUS(iommu->devid); | 490 | int bus = PCI_BUS(iommu->devid); |
@@ -363,10 +496,16 @@ static void __init init_iommu_from_pci(struct amd_iommu *iommu) | |||
363 | iommu->cap = read_pci_config(bus, dev, fn, cap_ptr+MMIO_CAP_HDR_OFFSET); | 496 | iommu->cap = read_pci_config(bus, dev, fn, cap_ptr+MMIO_CAP_HDR_OFFSET); |
364 | 497 | ||
365 | range = read_pci_config(bus, dev, fn, cap_ptr+MMIO_RANGE_OFFSET); | 498 | range = read_pci_config(bus, dev, fn, cap_ptr+MMIO_RANGE_OFFSET); |
366 | iommu->first_device = DEVID(MMIO_GET_BUS(range), MMIO_GET_FD(range)); | 499 | iommu->first_device = calc_devid(MMIO_GET_BUS(range), |
367 | iommu->last_device = DEVID(MMIO_GET_BUS(range), MMIO_GET_LD(range)); | 500 | MMIO_GET_FD(range)); |
501 | iommu->last_device = calc_devid(MMIO_GET_BUS(range), | ||
502 | MMIO_GET_LD(range)); | ||
368 | } | 503 | } |
369 | 504 | ||
505 | /* | ||
506 | * Takes a pointer to an AMD IOMMU entry in the ACPI table and | ||
507 | * initializes the hardware and our data structures with it. | ||
508 | */ | ||
370 | static void __init init_iommu_from_acpi(struct amd_iommu *iommu, | 509 | static void __init init_iommu_from_acpi(struct amd_iommu *iommu, |
371 | struct ivhd_header *h) | 510 | struct ivhd_header *h) |
372 | { | 511 | { |
@@ -374,7 +513,7 @@ static void __init init_iommu_from_acpi(struct amd_iommu *iommu, | |||
374 | u8 *end = p, flags = 0; | 513 | u8 *end = p, flags = 0; |
375 | u16 dev_i, devid = 0, devid_start = 0, devid_to = 0; | 514 | u16 dev_i, devid = 0, devid_start = 0, devid_to = 0; |
376 | u32 ext_flags = 0; | 515 | u32 ext_flags = 0; |
377 | bool alias = 0; | 516 | bool alias = false; |
378 | struct ivhd_entry *e; | 517 | struct ivhd_entry *e; |
379 | 518 | ||
380 | /* | 519 | /* |
@@ -414,22 +553,23 @@ static void __init init_iommu_from_acpi(struct amd_iommu *iommu, | |||
414 | case IVHD_DEV_ALL: | 553 | case IVHD_DEV_ALL: |
415 | for (dev_i = iommu->first_device; | 554 | for (dev_i = iommu->first_device; |
416 | dev_i <= iommu->last_device; ++dev_i) | 555 | dev_i <= iommu->last_device; ++dev_i) |
417 | set_dev_entry_from_acpi(dev_i, e->flags, 0); | 556 | set_dev_entry_from_acpi(iommu, dev_i, |
557 | e->flags, 0); | ||
418 | break; | 558 | break; |
419 | case IVHD_DEV_SELECT: | 559 | case IVHD_DEV_SELECT: |
420 | devid = e->devid; | 560 | devid = e->devid; |
421 | set_dev_entry_from_acpi(devid, e->flags, 0); | 561 | set_dev_entry_from_acpi(iommu, devid, e->flags, 0); |
422 | break; | 562 | break; |
423 | case IVHD_DEV_SELECT_RANGE_START: | 563 | case IVHD_DEV_SELECT_RANGE_START: |
424 | devid_start = e->devid; | 564 | devid_start = e->devid; |
425 | flags = e->flags; | 565 | flags = e->flags; |
426 | ext_flags = 0; | 566 | ext_flags = 0; |
427 | alias = 0; | 567 | alias = false; |
428 | break; | 568 | break; |
429 | case IVHD_DEV_ALIAS: | 569 | case IVHD_DEV_ALIAS: |
430 | devid = e->devid; | 570 | devid = e->devid; |
431 | devid_to = e->ext >> 8; | 571 | devid_to = e->ext >> 8; |
432 | set_dev_entry_from_acpi(devid, e->flags, 0); | 572 | set_dev_entry_from_acpi(iommu, devid, e->flags, 0); |
433 | amd_iommu_alias_table[devid] = devid_to; | 573 | amd_iommu_alias_table[devid] = devid_to; |
434 | break; | 574 | break; |
435 | case IVHD_DEV_ALIAS_RANGE: | 575 | case IVHD_DEV_ALIAS_RANGE: |
@@ -437,24 +577,25 @@ static void __init init_iommu_from_acpi(struct amd_iommu *iommu, | |||
437 | flags = e->flags; | 577 | flags = e->flags; |
438 | devid_to = e->ext >> 8; | 578 | devid_to = e->ext >> 8; |
439 | ext_flags = 0; | 579 | ext_flags = 0; |
440 | alias = 1; | 580 | alias = true; |
441 | break; | 581 | break; |
442 | case IVHD_DEV_EXT_SELECT: | 582 | case IVHD_DEV_EXT_SELECT: |
443 | devid = e->devid; | 583 | devid = e->devid; |
444 | set_dev_entry_from_acpi(devid, e->flags, e->ext); | 584 | set_dev_entry_from_acpi(iommu, devid, e->flags, |
585 | e->ext); | ||
445 | break; | 586 | break; |
446 | case IVHD_DEV_EXT_SELECT_RANGE: | 587 | case IVHD_DEV_EXT_SELECT_RANGE: |
447 | devid_start = e->devid; | 588 | devid_start = e->devid; |
448 | flags = e->flags; | 589 | flags = e->flags; |
449 | ext_flags = e->ext; | 590 | ext_flags = e->ext; |
450 | alias = 0; | 591 | alias = false; |
451 | break; | 592 | break; |
452 | case IVHD_DEV_RANGE_END: | 593 | case IVHD_DEV_RANGE_END: |
453 | devid = e->devid; | 594 | devid = e->devid; |
454 | for (dev_i = devid_start; dev_i <= devid; ++dev_i) { | 595 | for (dev_i = devid_start; dev_i <= devid; ++dev_i) { |
455 | if (alias) | 596 | if (alias) |
456 | amd_iommu_alias_table[dev_i] = devid_to; | 597 | amd_iommu_alias_table[dev_i] = devid_to; |
457 | set_dev_entry_from_acpi( | 598 | set_dev_entry_from_acpi(iommu, |
458 | amd_iommu_alias_table[dev_i], | 599 | amd_iommu_alias_table[dev_i], |
459 | flags, ext_flags); | 600 | flags, ext_flags); |
460 | } | 601 | } |
@@ -467,6 +608,7 @@ static void __init init_iommu_from_acpi(struct amd_iommu *iommu, | |||
467 | } | 608 | } |
468 | } | 609 | } |
469 | 610 | ||
611 | /* Initializes the device->iommu mapping for the driver */ | ||
470 | static int __init init_iommu_devices(struct amd_iommu *iommu) | 612 | static int __init init_iommu_devices(struct amd_iommu *iommu) |
471 | { | 613 | { |
472 | u16 i; | 614 | u16 i; |
@@ -494,6 +636,11 @@ static void __init free_iommu_all(void) | |||
494 | } | 636 | } |
495 | } | 637 | } |
496 | 638 | ||
639 | /* | ||
640 | * This function clues the initialization function for one IOMMU | ||
641 | * together and also allocates the command buffer and programs the | ||
642 | * hardware. It does NOT enable the IOMMU. This is done afterwards. | ||
643 | */ | ||
497 | static int __init init_iommu_one(struct amd_iommu *iommu, struct ivhd_header *h) | 644 | static int __init init_iommu_one(struct amd_iommu *iommu, struct ivhd_header *h) |
498 | { | 645 | { |
499 | spin_lock_init(&iommu->lock); | 646 | spin_lock_init(&iommu->lock); |
@@ -521,6 +668,10 @@ static int __init init_iommu_one(struct amd_iommu *iommu, struct ivhd_header *h) | |||
521 | return 0; | 668 | return 0; |
522 | } | 669 | } |
523 | 670 | ||
671 | /* | ||
672 | * Iterates over all IOMMU entries in the ACPI table, allocates the | ||
673 | * IOMMU structure and initializes it with init_iommu_one() | ||
674 | */ | ||
524 | static int __init init_iommu_all(struct acpi_table_header *table) | 675 | static int __init init_iommu_all(struct acpi_table_header *table) |
525 | { | 676 | { |
526 | u8 *p = (u8 *)table, *end = (u8 *)table; | 677 | u8 *p = (u8 *)table, *end = (u8 *)table; |
@@ -528,8 +679,6 @@ static int __init init_iommu_all(struct acpi_table_header *table) | |||
528 | struct amd_iommu *iommu; | 679 | struct amd_iommu *iommu; |
529 | int ret; | 680 | int ret; |
530 | 681 | ||
531 | INIT_LIST_HEAD(&amd_iommu_list); | ||
532 | |||
533 | end += table->length; | 682 | end += table->length; |
534 | p += IVRS_HEADER_LENGTH; | 683 | p += IVRS_HEADER_LENGTH; |
535 | 684 | ||
@@ -555,6 +704,14 @@ static int __init init_iommu_all(struct acpi_table_header *table) | |||
555 | return 0; | 704 | return 0; |
556 | } | 705 | } |
557 | 706 | ||
707 | /**************************************************************************** | ||
708 | * | ||
709 | * The next functions belong to the third pass of parsing the ACPI | ||
710 | * table. In this last pass the memory mapping requirements are | ||
711 | * gathered (like exclusion and unity mapping reanges). | ||
712 | * | ||
713 | ****************************************************************************/ | ||
714 | |||
558 | static void __init free_unity_maps(void) | 715 | static void __init free_unity_maps(void) |
559 | { | 716 | { |
560 | struct unity_map_entry *entry, *next; | 717 | struct unity_map_entry *entry, *next; |
@@ -565,6 +722,7 @@ static void __init free_unity_maps(void) | |||
565 | } | 722 | } |
566 | } | 723 | } |
567 | 724 | ||
725 | /* called when we find an exclusion range definition in ACPI */ | ||
568 | static int __init init_exclusion_range(struct ivmd_header *m) | 726 | static int __init init_exclusion_range(struct ivmd_header *m) |
569 | { | 727 | { |
570 | int i; | 728 | int i; |
@@ -588,6 +746,7 @@ static int __init init_exclusion_range(struct ivmd_header *m) | |||
588 | return 0; | 746 | return 0; |
589 | } | 747 | } |
590 | 748 | ||
749 | /* called for unity map ACPI definition */ | ||
591 | static int __init init_unity_map_range(struct ivmd_header *m) | 750 | static int __init init_unity_map_range(struct ivmd_header *m) |
592 | { | 751 | { |
593 | struct unity_map_entry *e = 0; | 752 | struct unity_map_entry *e = 0; |
@@ -619,13 +778,12 @@ static int __init init_unity_map_range(struct ivmd_header *m) | |||
619 | return 0; | 778 | return 0; |
620 | } | 779 | } |
621 | 780 | ||
781 | /* iterates over all memory definitions we find in the ACPI table */ | ||
622 | static int __init init_memory_definitions(struct acpi_table_header *table) | 782 | static int __init init_memory_definitions(struct acpi_table_header *table) |
623 | { | 783 | { |
624 | u8 *p = (u8 *)table, *end = (u8 *)table; | 784 | u8 *p = (u8 *)table, *end = (u8 *)table; |
625 | struct ivmd_header *m; | 785 | struct ivmd_header *m; |
626 | 786 | ||
627 | INIT_LIST_HEAD(&amd_iommu_unity_map); | ||
628 | |||
629 | end += table->length; | 787 | end += table->length; |
630 | p += IVRS_HEADER_LENGTH; | 788 | p += IVRS_HEADER_LENGTH; |
631 | 789 | ||
@@ -642,6 +800,10 @@ static int __init init_memory_definitions(struct acpi_table_header *table) | |||
642 | return 0; | 800 | return 0; |
643 | } | 801 | } |
644 | 802 | ||
803 | /* | ||
804 | * This function finally enables all IOMMUs found in the system after | ||
805 | * they have been initialized | ||
806 | */ | ||
645 | static void __init enable_iommus(void) | 807 | static void __init enable_iommus(void) |
646 | { | 808 | { |
647 | struct amd_iommu *iommu; | 809 | struct amd_iommu *iommu; |
@@ -678,6 +840,34 @@ static struct sys_device device_amd_iommu = { | |||
678 | .cls = &amd_iommu_sysdev_class, | 840 | .cls = &amd_iommu_sysdev_class, |
679 | }; | 841 | }; |
680 | 842 | ||
843 | /* | ||
844 | * This is the core init function for AMD IOMMU hardware in the system. | ||
845 | * This function is called from the generic x86 DMA layer initialization | ||
846 | * code. | ||
847 | * | ||
848 | * This function basically parses the ACPI table for AMD IOMMU (IVRS) | ||
849 | * three times: | ||
850 | * | ||
851 | * 1 pass) Find the highest PCI device id the driver has to handle. | ||
852 | * Upon this information the size of the data structures is | ||
853 | * determined that needs to be allocated. | ||
854 | * | ||
855 | * 2 pass) Initialize the data structures just allocated with the | ||
856 | * information in the ACPI table about available AMD IOMMUs | ||
857 | * in the system. It also maps the PCI devices in the | ||
858 | * system to specific IOMMUs | ||
859 | * | ||
860 | * 3 pass) After the basic data structures are allocated and | ||
861 | * initialized we update them with information about memory | ||
862 | * remapping requirements parsed out of the ACPI table in | ||
863 | * this last pass. | ||
864 | * | ||
865 | * After that the hardware is initialized and ready to go. In the last | ||
866 | * step we do some Linux specific things like registering the driver in | ||
867 | * the dma_ops interface and initializing the suspend/resume support | ||
868 | * functions. Finally it prints some information about AMD IOMMUs and | ||
869 | * the driver state and enables the hardware. | ||
870 | */ | ||
681 | int __init amd_iommu_init(void) | 871 | int __init amd_iommu_init(void) |
682 | { | 872 | { |
683 | int i, ret = 0; | 873 | int i, ret = 0; |
@@ -699,14 +889,14 @@ int __init amd_iommu_init(void) | |||
699 | if (acpi_table_parse("IVRS", find_last_devid_acpi) != 0) | 889 | if (acpi_table_parse("IVRS", find_last_devid_acpi) != 0) |
700 | return -ENODEV; | 890 | return -ENODEV; |
701 | 891 | ||
702 | dev_table_size = TBL_SIZE(DEV_TABLE_ENTRY_SIZE); | 892 | dev_table_size = tbl_size(DEV_TABLE_ENTRY_SIZE); |
703 | alias_table_size = TBL_SIZE(ALIAS_TABLE_ENTRY_SIZE); | 893 | alias_table_size = tbl_size(ALIAS_TABLE_ENTRY_SIZE); |
704 | rlookup_table_size = TBL_SIZE(RLOOKUP_TABLE_ENTRY_SIZE); | 894 | rlookup_table_size = tbl_size(RLOOKUP_TABLE_ENTRY_SIZE); |
705 | 895 | ||
706 | ret = -ENOMEM; | 896 | ret = -ENOMEM; |
707 | 897 | ||
708 | /* Device table - directly used by all IOMMUs */ | 898 | /* Device table - directly used by all IOMMUs */ |
709 | amd_iommu_dev_table = (void *)__get_free_pages(GFP_KERNEL, | 899 | amd_iommu_dev_table = (void *)__get_free_pages(GFP_KERNEL | __GFP_ZERO, |
710 | get_order(dev_table_size)); | 900 | get_order(dev_table_size)); |
711 | if (amd_iommu_dev_table == NULL) | 901 | if (amd_iommu_dev_table == NULL) |
712 | goto out; | 902 | goto out; |
@@ -730,27 +920,23 @@ int __init amd_iommu_init(void) | |||
730 | * Protection Domain table - maps devices to protection domains | 920 | * Protection Domain table - maps devices to protection domains |
731 | * This table has the same size as the rlookup_table | 921 | * This table has the same size as the rlookup_table |
732 | */ | 922 | */ |
733 | amd_iommu_pd_table = (void *)__get_free_pages(GFP_KERNEL, | 923 | amd_iommu_pd_table = (void *)__get_free_pages(GFP_KERNEL | __GFP_ZERO, |
734 | get_order(rlookup_table_size)); | 924 | get_order(rlookup_table_size)); |
735 | if (amd_iommu_pd_table == NULL) | 925 | if (amd_iommu_pd_table == NULL) |
736 | goto free; | 926 | goto free; |
737 | 927 | ||
738 | amd_iommu_pd_alloc_bitmap = (void *)__get_free_pages(GFP_KERNEL, | 928 | amd_iommu_pd_alloc_bitmap = (void *)__get_free_pages( |
929 | GFP_KERNEL | __GFP_ZERO, | ||
739 | get_order(MAX_DOMAIN_ID/8)); | 930 | get_order(MAX_DOMAIN_ID/8)); |
740 | if (amd_iommu_pd_alloc_bitmap == NULL) | 931 | if (amd_iommu_pd_alloc_bitmap == NULL) |
741 | goto free; | 932 | goto free; |
742 | 933 | ||
743 | /* | 934 | /* |
744 | * memory is allocated now; initialize the device table with all zeroes | 935 | * let all alias entries point to itself |
745 | * and let all alias entries point to itself | ||
746 | */ | 936 | */ |
747 | memset(amd_iommu_dev_table, 0, dev_table_size); | ||
748 | for (i = 0; i < amd_iommu_last_bdf; ++i) | 937 | for (i = 0; i < amd_iommu_last_bdf; ++i) |
749 | amd_iommu_alias_table[i] = i; | 938 | amd_iommu_alias_table[i] = i; |
750 | 939 | ||
751 | memset(amd_iommu_pd_table, 0, rlookup_table_size); | ||
752 | memset(amd_iommu_pd_alloc_bitmap, 0, MAX_DOMAIN_ID / 8); | ||
753 | |||
754 | /* | 940 | /* |
755 | * never allocate domain 0 because its used as the non-allocated and | 941 | * never allocate domain 0 because its used as the non-allocated and |
756 | * error value placeholder | 942 | * error value placeholder |
@@ -795,24 +981,19 @@ out: | |||
795 | return ret; | 981 | return ret; |
796 | 982 | ||
797 | free: | 983 | free: |
798 | if (amd_iommu_pd_alloc_bitmap) | 984 | free_pages((unsigned long)amd_iommu_pd_alloc_bitmap, 1); |
799 | free_pages((unsigned long)amd_iommu_pd_alloc_bitmap, 1); | ||
800 | 985 | ||
801 | if (amd_iommu_pd_table) | 986 | free_pages((unsigned long)amd_iommu_pd_table, |
802 | free_pages((unsigned long)amd_iommu_pd_table, | 987 | get_order(rlookup_table_size)); |
803 | get_order(rlookup_table_size)); | ||
804 | 988 | ||
805 | if (amd_iommu_rlookup_table) | 989 | free_pages((unsigned long)amd_iommu_rlookup_table, |
806 | free_pages((unsigned long)amd_iommu_rlookup_table, | 990 | get_order(rlookup_table_size)); |
807 | get_order(rlookup_table_size)); | ||
808 | 991 | ||
809 | if (amd_iommu_alias_table) | 992 | free_pages((unsigned long)amd_iommu_alias_table, |
810 | free_pages((unsigned long)amd_iommu_alias_table, | 993 | get_order(alias_table_size)); |
811 | get_order(alias_table_size)); | ||
812 | 994 | ||
813 | if (amd_iommu_dev_table) | 995 | free_pages((unsigned long)amd_iommu_dev_table, |
814 | free_pages((unsigned long)amd_iommu_dev_table, | 996 | get_order(dev_table_size)); |
815 | get_order(dev_table_size)); | ||
816 | 997 | ||
817 | free_iommu_all(); | 998 | free_iommu_all(); |
818 | 999 | ||
@@ -821,6 +1002,13 @@ free: | |||
821 | goto out; | 1002 | goto out; |
822 | } | 1003 | } |
823 | 1004 | ||
1005 | /**************************************************************************** | ||
1006 | * | ||
1007 | * Early detect code. This code runs at IOMMU detection time in the DMA | ||
1008 | * layer. It just looks if there is an IVRS ACPI table to detect AMD | ||
1009 | * IOMMUs | ||
1010 | * | ||
1011 | ****************************************************************************/ | ||
824 | static int __init early_amd_iommu_detect(struct acpi_table_header *table) | 1012 | static int __init early_amd_iommu_detect(struct acpi_table_header *table) |
825 | { | 1013 | { |
826 | return 0; | 1014 | return 0; |
@@ -828,7 +1016,7 @@ static int __init early_amd_iommu_detect(struct acpi_table_header *table) | |||
828 | 1016 | ||
829 | void __init amd_iommu_detect(void) | 1017 | void __init amd_iommu_detect(void) |
830 | { | 1018 | { |
831 | if (swiotlb || no_iommu || iommu_detected) | 1019 | if (swiotlb || no_iommu || (iommu_detected && !gart_iommu_aperture)) |
832 | return; | 1020 | return; |
833 | 1021 | ||
834 | if (acpi_table_parse("IVRS", early_amd_iommu_detect) == 0) { | 1022 | if (acpi_table_parse("IVRS", early_amd_iommu_detect) == 0) { |
@@ -841,6 +1029,13 @@ void __init amd_iommu_detect(void) | |||
841 | } | 1029 | } |
842 | } | 1030 | } |
843 | 1031 | ||
1032 | /**************************************************************************** | ||
1033 | * | ||
1034 | * Parsing functions for the AMD IOMMU specific kernel command line | ||
1035 | * options. | ||
1036 | * | ||
1037 | ****************************************************************************/ | ||
1038 | |||
844 | static int __init parse_amd_iommu_options(char *str) | 1039 | static int __init parse_amd_iommu_options(char *str) |
845 | { | 1040 | { |
846 | for (; *str; ++str) { | 1041 | for (; *str; ++str) { |
@@ -853,20 +1048,10 @@ static int __init parse_amd_iommu_options(char *str) | |||
853 | 1048 | ||
854 | static int __init parse_amd_iommu_size_options(char *str) | 1049 | static int __init parse_amd_iommu_size_options(char *str) |
855 | { | 1050 | { |
856 | for (; *str; ++str) { | 1051 | unsigned order = PAGE_SHIFT + get_order(memparse(str, &str)); |
857 | if (strcmp(str, "32M") == 0) | 1052 | |
858 | amd_iommu_aperture_order = 25; | 1053 | if ((order > 24) && (order < 31)) |
859 | if (strcmp(str, "64M") == 0) | 1054 | amd_iommu_aperture_order = order; |
860 | amd_iommu_aperture_order = 26; | ||
861 | if (strcmp(str, "128M") == 0) | ||
862 | amd_iommu_aperture_order = 27; | ||
863 | if (strcmp(str, "256M") == 0) | ||
864 | amd_iommu_aperture_order = 28; | ||
865 | if (strcmp(str, "512M") == 0) | ||
866 | amd_iommu_aperture_order = 29; | ||
867 | if (strcmp(str, "1G") == 0) | ||
868 | amd_iommu_aperture_order = 30; | ||
869 | } | ||
870 | 1055 | ||
871 | return 1; | 1056 | return 1; |
872 | } | 1057 | } |
diff --git a/arch/x86/kernel/aperture_64.c b/arch/x86/kernel/aperture_64.c index 9f907806c1a5..44e21826db11 100644 --- a/arch/x86/kernel/aperture_64.c +++ b/arch/x86/kernel/aperture_64.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/suspend.h> | 21 | #include <linux/suspend.h> |
22 | #include <asm/e820.h> | 22 | #include <asm/e820.h> |
23 | #include <asm/io.h> | 23 | #include <asm/io.h> |
24 | #include <asm/iommu.h> | ||
24 | #include <asm/gart.h> | 25 | #include <asm/gart.h> |
25 | #include <asm/pci-direct.h> | 26 | #include <asm/pci-direct.h> |
26 | #include <asm/dma.h> | 27 | #include <asm/dma.h> |
diff --git a/arch/x86/kernel/apic_32.c b/arch/x86/kernel/apic_32.c index a437d027f20b..d6c898358371 100644 --- a/arch/x86/kernel/apic_32.c +++ b/arch/x86/kernel/apic_32.c | |||
@@ -75,7 +75,7 @@ char system_vectors[NR_VECTORS] = { [0 ... NR_VECTORS-1] = SYS_VECTOR_FREE}; | |||
75 | /* | 75 | /* |
76 | * Debug level, exported for io_apic.c | 76 | * Debug level, exported for io_apic.c |
77 | */ | 77 | */ |
78 | int apic_verbosity; | 78 | unsigned int apic_verbosity; |
79 | 79 | ||
80 | int pic_mode; | 80 | int pic_mode; |
81 | 81 | ||
@@ -177,7 +177,7 @@ void __cpuinit enable_NMI_through_LVT0(void) | |||
177 | /* Level triggered for 82489DX */ | 177 | /* Level triggered for 82489DX */ |
178 | if (!lapic_is_integrated()) | 178 | if (!lapic_is_integrated()) |
179 | v |= APIC_LVT_LEVEL_TRIGGER; | 179 | v |= APIC_LVT_LEVEL_TRIGGER; |
180 | apic_write_around(APIC_LVT0, v); | 180 | apic_write(APIC_LVT0, v); |
181 | } | 181 | } |
182 | 182 | ||
183 | /** | 183 | /** |
@@ -212,9 +212,6 @@ int lapic_get_maxlvt(void) | |||
212 | * this function twice on the boot CPU, once with a bogus timeout | 212 | * this function twice on the boot CPU, once with a bogus timeout |
213 | * value, second time for real. The other (noncalibrating) CPUs | 213 | * value, second time for real. The other (noncalibrating) CPUs |
214 | * call this function only once, with the real, calibrated value. | 214 | * call this function only once, with the real, calibrated value. |
215 | * | ||
216 | * We do reads before writes even if unnecessary, to get around the | ||
217 | * P5 APIC double write bug. | ||
218 | */ | 215 | */ |
219 | static void __setup_APIC_LVTT(unsigned int clocks, int oneshot, int irqen) | 216 | static void __setup_APIC_LVTT(unsigned int clocks, int oneshot, int irqen) |
220 | { | 217 | { |
@@ -229,18 +226,18 @@ static void __setup_APIC_LVTT(unsigned int clocks, int oneshot, int irqen) | |||
229 | if (!irqen) | 226 | if (!irqen) |
230 | lvtt_value |= APIC_LVT_MASKED; | 227 | lvtt_value |= APIC_LVT_MASKED; |
231 | 228 | ||
232 | apic_write_around(APIC_LVTT, lvtt_value); | 229 | apic_write(APIC_LVTT, lvtt_value); |
233 | 230 | ||
234 | /* | 231 | /* |
235 | * Divide PICLK by 16 | 232 | * Divide PICLK by 16 |
236 | */ | 233 | */ |
237 | tmp_value = apic_read(APIC_TDCR); | 234 | tmp_value = apic_read(APIC_TDCR); |
238 | apic_write_around(APIC_TDCR, (tmp_value | 235 | apic_write(APIC_TDCR, |
239 | & ~(APIC_TDR_DIV_1 | APIC_TDR_DIV_TMBASE)) | 236 | (tmp_value & ~(APIC_TDR_DIV_1 | APIC_TDR_DIV_TMBASE)) | |
240 | | APIC_TDR_DIV_16); | 237 | APIC_TDR_DIV_16); |
241 | 238 | ||
242 | if (!oneshot) | 239 | if (!oneshot) |
243 | apic_write_around(APIC_TMICT, clocks/APIC_DIVISOR); | 240 | apic_write(APIC_TMICT, clocks / APIC_DIVISOR); |
244 | } | 241 | } |
245 | 242 | ||
246 | /* | 243 | /* |
@@ -249,7 +246,7 @@ static void __setup_APIC_LVTT(unsigned int clocks, int oneshot, int irqen) | |||
249 | static int lapic_next_event(unsigned long delta, | 246 | static int lapic_next_event(unsigned long delta, |
250 | struct clock_event_device *evt) | 247 | struct clock_event_device *evt) |
251 | { | 248 | { |
252 | apic_write_around(APIC_TMICT, delta); | 249 | apic_write(APIC_TMICT, delta); |
253 | return 0; | 250 | return 0; |
254 | } | 251 | } |
255 | 252 | ||
@@ -278,7 +275,7 @@ static void lapic_timer_setup(enum clock_event_mode mode, | |||
278 | case CLOCK_EVT_MODE_SHUTDOWN: | 275 | case CLOCK_EVT_MODE_SHUTDOWN: |
279 | v = apic_read(APIC_LVTT); | 276 | v = apic_read(APIC_LVTT); |
280 | v |= (APIC_LVT_MASKED | LOCAL_TIMER_VECTOR); | 277 | v |= (APIC_LVT_MASKED | LOCAL_TIMER_VECTOR); |
281 | apic_write_around(APIC_LVTT, v); | 278 | apic_write(APIC_LVTT, v); |
282 | break; | 279 | break; |
283 | case CLOCK_EVT_MODE_RESUME: | 280 | case CLOCK_EVT_MODE_RESUME: |
284 | /* Nothing to do here */ | 281 | /* Nothing to do here */ |
@@ -372,12 +369,7 @@ static void __init lapic_cal_handler(struct clock_event_device *dev) | |||
372 | } | 369 | } |
373 | } | 370 | } |
374 | 371 | ||
375 | /* | 372 | static int __init calibrate_APIC_clock(void) |
376 | * Setup the boot APIC | ||
377 | * | ||
378 | * Calibrate and verify the result. | ||
379 | */ | ||
380 | void __init setup_boot_APIC_clock(void) | ||
381 | { | 373 | { |
382 | struct clock_event_device *levt = &__get_cpu_var(lapic_events); | 374 | struct clock_event_device *levt = &__get_cpu_var(lapic_events); |
383 | const long pm_100ms = PMTMR_TICKS_PER_SEC/10; | 375 | const long pm_100ms = PMTMR_TICKS_PER_SEC/10; |
@@ -387,24 +379,6 @@ void __init setup_boot_APIC_clock(void) | |||
387 | long delta, deltapm; | 379 | long delta, deltapm; |
388 | int pm_referenced = 0; | 380 | int pm_referenced = 0; |
389 | 381 | ||
390 | /* | ||
391 | * The local apic timer can be disabled via the kernel | ||
392 | * commandline or from the CPU detection code. Register the lapic | ||
393 | * timer as a dummy clock event source on SMP systems, so the | ||
394 | * broadcast mechanism is used. On UP systems simply ignore it. | ||
395 | */ | ||
396 | if (local_apic_timer_disabled) { | ||
397 | /* No broadcast on UP ! */ | ||
398 | if (num_possible_cpus() > 1) { | ||
399 | lapic_clockevent.mult = 1; | ||
400 | setup_APIC_timer(); | ||
401 | } | ||
402 | return; | ||
403 | } | ||
404 | |||
405 | apic_printk(APIC_VERBOSE, "Using local APIC timer interrupts.\n" | ||
406 | "calibrating APIC timer ...\n"); | ||
407 | |||
408 | local_irq_disable(); | 382 | local_irq_disable(); |
409 | 383 | ||
410 | /* Replace the global interrupt handler */ | 384 | /* Replace the global interrupt handler */ |
@@ -489,8 +463,6 @@ void __init setup_boot_APIC_clock(void) | |||
489 | calibration_result / (1000000 / HZ), | 463 | calibration_result / (1000000 / HZ), |
490 | calibration_result % (1000000 / HZ)); | 464 | calibration_result % (1000000 / HZ)); |
491 | 465 | ||
492 | local_apic_timer_verify_ok = 1; | ||
493 | |||
494 | /* | 466 | /* |
495 | * Do a sanity check on the APIC calibration result | 467 | * Do a sanity check on the APIC calibration result |
496 | */ | 468 | */ |
@@ -498,12 +470,11 @@ void __init setup_boot_APIC_clock(void) | |||
498 | local_irq_enable(); | 470 | local_irq_enable(); |
499 | printk(KERN_WARNING | 471 | printk(KERN_WARNING |
500 | "APIC frequency too slow, disabling apic timer\n"); | 472 | "APIC frequency too slow, disabling apic timer\n"); |
501 | /* No broadcast on UP ! */ | 473 | return -1; |
502 | if (num_possible_cpus() > 1) | ||
503 | setup_APIC_timer(); | ||
504 | return; | ||
505 | } | 474 | } |
506 | 475 | ||
476 | local_apic_timer_verify_ok = 1; | ||
477 | |||
507 | /* We trust the pm timer based calibration */ | 478 | /* We trust the pm timer based calibration */ |
508 | if (!pm_referenced) { | 479 | if (!pm_referenced) { |
509 | apic_printk(APIC_VERBOSE, "... verify APIC timer\n"); | 480 | apic_printk(APIC_VERBOSE, "... verify APIC timer\n"); |
@@ -543,22 +514,55 @@ void __init setup_boot_APIC_clock(void) | |||
543 | if (!local_apic_timer_verify_ok) { | 514 | if (!local_apic_timer_verify_ok) { |
544 | printk(KERN_WARNING | 515 | printk(KERN_WARNING |
545 | "APIC timer disabled due to verification failure.\n"); | 516 | "APIC timer disabled due to verification failure.\n"); |
517 | return -1; | ||
518 | } | ||
519 | |||
520 | return 0; | ||
521 | } | ||
522 | |||
523 | /* | ||
524 | * Setup the boot APIC | ||
525 | * | ||
526 | * Calibrate and verify the result. | ||
527 | */ | ||
528 | void __init setup_boot_APIC_clock(void) | ||
529 | { | ||
530 | /* | ||
531 | * The local apic timer can be disabled via the kernel | ||
532 | * commandline or from the CPU detection code. Register the lapic | ||
533 | * timer as a dummy clock event source on SMP systems, so the | ||
534 | * broadcast mechanism is used. On UP systems simply ignore it. | ||
535 | */ | ||
536 | if (local_apic_timer_disabled) { | ||
546 | /* No broadcast on UP ! */ | 537 | /* No broadcast on UP ! */ |
547 | if (num_possible_cpus() == 1) | 538 | if (num_possible_cpus() > 1) { |
548 | return; | 539 | lapic_clockevent.mult = 1; |
549 | } else { | 540 | setup_APIC_timer(); |
550 | /* | 541 | } |
551 | * If nmi_watchdog is set to IO_APIC, we need the | 542 | return; |
552 | * PIT/HPET going. Otherwise register lapic as a dummy | ||
553 | * device. | ||
554 | */ | ||
555 | if (nmi_watchdog != NMI_IO_APIC) | ||
556 | lapic_clockevent.features &= ~CLOCK_EVT_FEAT_DUMMY; | ||
557 | else | ||
558 | printk(KERN_WARNING "APIC timer registered as dummy," | ||
559 | " due to nmi_watchdog=%d!\n", nmi_watchdog); | ||
560 | } | 543 | } |
561 | 544 | ||
545 | apic_printk(APIC_VERBOSE, "Using local APIC timer interrupts.\n" | ||
546 | "calibrating APIC timer ...\n"); | ||
547 | |||
548 | if (calibrate_APIC_clock()) { | ||
549 | /* No broadcast on UP ! */ | ||
550 | if (num_possible_cpus() > 1) | ||
551 | setup_APIC_timer(); | ||
552 | return; | ||
553 | } | ||
554 | |||
555 | /* | ||
556 | * If nmi_watchdog is set to IO_APIC, we need the | ||
557 | * PIT/HPET going. Otherwise register lapic as a dummy | ||
558 | * device. | ||
559 | */ | ||
560 | if (nmi_watchdog != NMI_IO_APIC) | ||
561 | lapic_clockevent.features &= ~CLOCK_EVT_FEAT_DUMMY; | ||
562 | else | ||
563 | printk(KERN_WARNING "APIC timer registered as dummy," | ||
564 | " due to nmi_watchdog=%d!\n", nmi_watchdog); | ||
565 | |||
562 | /* Setup the lapic or request the broadcast */ | 566 | /* Setup the lapic or request the broadcast */ |
563 | setup_APIC_timer(); | 567 | setup_APIC_timer(); |
564 | } | 568 | } |
@@ -693,44 +697,44 @@ void clear_local_APIC(void) | |||
693 | */ | 697 | */ |
694 | if (maxlvt >= 3) { | 698 | if (maxlvt >= 3) { |
695 | v = ERROR_APIC_VECTOR; /* any non-zero vector will do */ | 699 | v = ERROR_APIC_VECTOR; /* any non-zero vector will do */ |
696 | apic_write_around(APIC_LVTERR, v | APIC_LVT_MASKED); | 700 | apic_write(APIC_LVTERR, v | APIC_LVT_MASKED); |
697 | } | 701 | } |
698 | /* | 702 | /* |
699 | * Careful: we have to set masks only first to deassert | 703 | * Careful: we have to set masks only first to deassert |
700 | * any level-triggered sources. | 704 | * any level-triggered sources. |
701 | */ | 705 | */ |
702 | v = apic_read(APIC_LVTT); | 706 | v = apic_read(APIC_LVTT); |
703 | apic_write_around(APIC_LVTT, v | APIC_LVT_MASKED); | 707 | apic_write(APIC_LVTT, v | APIC_LVT_MASKED); |
704 | v = apic_read(APIC_LVT0); | 708 | v = apic_read(APIC_LVT0); |
705 | apic_write_around(APIC_LVT0, v | APIC_LVT_MASKED); | 709 | apic_write(APIC_LVT0, v | APIC_LVT_MASKED); |
706 | v = apic_read(APIC_LVT1); | 710 | v = apic_read(APIC_LVT1); |
707 | apic_write_around(APIC_LVT1, v | APIC_LVT_MASKED); | 711 | apic_write(APIC_LVT1, v | APIC_LVT_MASKED); |
708 | if (maxlvt >= 4) { | 712 | if (maxlvt >= 4) { |
709 | v = apic_read(APIC_LVTPC); | 713 | v = apic_read(APIC_LVTPC); |
710 | apic_write_around(APIC_LVTPC, v | APIC_LVT_MASKED); | 714 | apic_write(APIC_LVTPC, v | APIC_LVT_MASKED); |
711 | } | 715 | } |
712 | 716 | ||
713 | /* lets not touch this if we didn't frob it */ | 717 | /* lets not touch this if we didn't frob it */ |
714 | #ifdef CONFIG_X86_MCE_P4THERMAL | 718 | #ifdef CONFIG_X86_MCE_P4THERMAL |
715 | if (maxlvt >= 5) { | 719 | if (maxlvt >= 5) { |
716 | v = apic_read(APIC_LVTTHMR); | 720 | v = apic_read(APIC_LVTTHMR); |
717 | apic_write_around(APIC_LVTTHMR, v | APIC_LVT_MASKED); | 721 | apic_write(APIC_LVTTHMR, v | APIC_LVT_MASKED); |
718 | } | 722 | } |
719 | #endif | 723 | #endif |
720 | /* | 724 | /* |
721 | * Clean APIC state for other OSs: | 725 | * Clean APIC state for other OSs: |
722 | */ | 726 | */ |
723 | apic_write_around(APIC_LVTT, APIC_LVT_MASKED); | 727 | apic_write(APIC_LVTT, APIC_LVT_MASKED); |
724 | apic_write_around(APIC_LVT0, APIC_LVT_MASKED); | 728 | apic_write(APIC_LVT0, APIC_LVT_MASKED); |
725 | apic_write_around(APIC_LVT1, APIC_LVT_MASKED); | 729 | apic_write(APIC_LVT1, APIC_LVT_MASKED); |
726 | if (maxlvt >= 3) | 730 | if (maxlvt >= 3) |
727 | apic_write_around(APIC_LVTERR, APIC_LVT_MASKED); | 731 | apic_write(APIC_LVTERR, APIC_LVT_MASKED); |
728 | if (maxlvt >= 4) | 732 | if (maxlvt >= 4) |
729 | apic_write_around(APIC_LVTPC, APIC_LVT_MASKED); | 733 | apic_write(APIC_LVTPC, APIC_LVT_MASKED); |
730 | 734 | ||
731 | #ifdef CONFIG_X86_MCE_P4THERMAL | 735 | #ifdef CONFIG_X86_MCE_P4THERMAL |
732 | if (maxlvt >= 5) | 736 | if (maxlvt >= 5) |
733 | apic_write_around(APIC_LVTTHMR, APIC_LVT_MASKED); | 737 | apic_write(APIC_LVTTHMR, APIC_LVT_MASKED); |
734 | #endif | 738 | #endif |
735 | /* Integrated APIC (!82489DX) ? */ | 739 | /* Integrated APIC (!82489DX) ? */ |
736 | if (lapic_is_integrated()) { | 740 | if (lapic_is_integrated()) { |
@@ -756,7 +760,7 @@ void disable_local_APIC(void) | |||
756 | */ | 760 | */ |
757 | value = apic_read(APIC_SPIV); | 761 | value = apic_read(APIC_SPIV); |
758 | value &= ~APIC_SPIV_APIC_ENABLED; | 762 | value &= ~APIC_SPIV_APIC_ENABLED; |
759 | apic_write_around(APIC_SPIV, value); | 763 | apic_write(APIC_SPIV, value); |
760 | 764 | ||
761 | /* | 765 | /* |
762 | * When LAPIC was disabled by the BIOS and enabled by the kernel, | 766 | * When LAPIC was disabled by the BIOS and enabled by the kernel, |
@@ -865,8 +869,8 @@ void __init sync_Arb_IDs(void) | |||
865 | apic_wait_icr_idle(); | 869 | apic_wait_icr_idle(); |
866 | 870 | ||
867 | apic_printk(APIC_DEBUG, "Synchronizing Arb IDs.\n"); | 871 | apic_printk(APIC_DEBUG, "Synchronizing Arb IDs.\n"); |
868 | apic_write_around(APIC_ICR, APIC_DEST_ALLINC | APIC_INT_LEVELTRIG | 872 | apic_write(APIC_ICR, |
869 | | APIC_DM_INIT); | 873 | APIC_DEST_ALLINC | APIC_INT_LEVELTRIG | APIC_DM_INIT); |
870 | } | 874 | } |
871 | 875 | ||
872 | /* | 876 | /* |
@@ -902,16 +906,16 @@ void __init init_bsp_APIC(void) | |||
902 | else | 906 | else |
903 | value |= APIC_SPIV_FOCUS_DISABLED; | 907 | value |= APIC_SPIV_FOCUS_DISABLED; |
904 | value |= SPURIOUS_APIC_VECTOR; | 908 | value |= SPURIOUS_APIC_VECTOR; |
905 | apic_write_around(APIC_SPIV, value); | 909 | apic_write(APIC_SPIV, value); |
906 | 910 | ||
907 | /* | 911 | /* |
908 | * Set up the virtual wire mode. | 912 | * Set up the virtual wire mode. |
909 | */ | 913 | */ |
910 | apic_write_around(APIC_LVT0, APIC_DM_EXTINT); | 914 | apic_write(APIC_LVT0, APIC_DM_EXTINT); |
911 | value = APIC_DM_NMI; | 915 | value = APIC_DM_NMI; |
912 | if (!lapic_is_integrated()) /* 82489DX */ | 916 | if (!lapic_is_integrated()) /* 82489DX */ |
913 | value |= APIC_LVT_LEVEL_TRIGGER; | 917 | value |= APIC_LVT_LEVEL_TRIGGER; |
914 | apic_write_around(APIC_LVT1, value); | 918 | apic_write(APIC_LVT1, value); |
915 | } | 919 | } |
916 | 920 | ||
917 | static void __cpuinit lapic_setup_esr(void) | 921 | static void __cpuinit lapic_setup_esr(void) |
@@ -926,7 +930,7 @@ static void __cpuinit lapic_setup_esr(void) | |||
926 | 930 | ||
927 | /* enables sending errors */ | 931 | /* enables sending errors */ |
928 | value = ERROR_APIC_VECTOR; | 932 | value = ERROR_APIC_VECTOR; |
929 | apic_write_around(APIC_LVTERR, value); | 933 | apic_write(APIC_LVTERR, value); |
930 | /* | 934 | /* |
931 | * spec says clear errors after enabling vector. | 935 | * spec says clear errors after enabling vector. |
932 | */ | 936 | */ |
@@ -989,7 +993,7 @@ void __cpuinit setup_local_APIC(void) | |||
989 | */ | 993 | */ |
990 | value = apic_read(APIC_TASKPRI); | 994 | value = apic_read(APIC_TASKPRI); |
991 | value &= ~APIC_TPRI_MASK; | 995 | value &= ~APIC_TPRI_MASK; |
992 | apic_write_around(APIC_TASKPRI, value); | 996 | apic_write(APIC_TASKPRI, value); |
993 | 997 | ||
994 | /* | 998 | /* |
995 | * After a crash, we no longer service the interrupts and a pending | 999 | * After a crash, we no longer service the interrupts and a pending |
@@ -1047,7 +1051,7 @@ void __cpuinit setup_local_APIC(void) | |||
1047 | * Set spurious IRQ vector | 1051 | * Set spurious IRQ vector |
1048 | */ | 1052 | */ |
1049 | value |= SPURIOUS_APIC_VECTOR; | 1053 | value |= SPURIOUS_APIC_VECTOR; |
1050 | apic_write_around(APIC_SPIV, value); | 1054 | apic_write(APIC_SPIV, value); |
1051 | 1055 | ||
1052 | /* | 1056 | /* |
1053 | * Set up LVT0, LVT1: | 1057 | * Set up LVT0, LVT1: |
@@ -1069,7 +1073,7 @@ void __cpuinit setup_local_APIC(void) | |||
1069 | apic_printk(APIC_VERBOSE, "masked ExtINT on CPU#%d\n", | 1073 | apic_printk(APIC_VERBOSE, "masked ExtINT on CPU#%d\n", |
1070 | smp_processor_id()); | 1074 | smp_processor_id()); |
1071 | } | 1075 | } |
1072 | apic_write_around(APIC_LVT0, value); | 1076 | apic_write(APIC_LVT0, value); |
1073 | 1077 | ||
1074 | /* | 1078 | /* |
1075 | * only the BP should see the LINT1 NMI signal, obviously. | 1079 | * only the BP should see the LINT1 NMI signal, obviously. |
@@ -1080,7 +1084,7 @@ void __cpuinit setup_local_APIC(void) | |||
1080 | value = APIC_DM_NMI | APIC_LVT_MASKED; | 1084 | value = APIC_DM_NMI | APIC_LVT_MASKED; |
1081 | if (!integrated) /* 82489DX */ | 1085 | if (!integrated) /* 82489DX */ |
1082 | value |= APIC_LVT_LEVEL_TRIGGER; | 1086 | value |= APIC_LVT_LEVEL_TRIGGER; |
1083 | apic_write_around(APIC_LVT1, value); | 1087 | apic_write(APIC_LVT1, value); |
1084 | } | 1088 | } |
1085 | 1089 | ||
1086 | void __cpuinit end_local_APIC_setup(void) | 1090 | void __cpuinit end_local_APIC_setup(void) |
@@ -1091,7 +1095,7 @@ void __cpuinit end_local_APIC_setup(void) | |||
1091 | /* Disable the local apic timer */ | 1095 | /* Disable the local apic timer */ |
1092 | value = apic_read(APIC_LVTT); | 1096 | value = apic_read(APIC_LVTT); |
1093 | value |= (APIC_LVT_MASKED | LOCAL_TIMER_VECTOR); | 1097 | value |= (APIC_LVT_MASKED | LOCAL_TIMER_VECTOR); |
1094 | apic_write_around(APIC_LVTT, value); | 1098 | apic_write(APIC_LVTT, value); |
1095 | 1099 | ||
1096 | setup_apic_nmi_watchdog(NULL); | 1100 | setup_apic_nmi_watchdog(NULL); |
1097 | apic_pm_activate(); | 1101 | apic_pm_activate(); |
@@ -1214,9 +1218,6 @@ int apic_version[MAX_APICS]; | |||
1214 | 1218 | ||
1215 | int __init APIC_init_uniprocessor(void) | 1219 | int __init APIC_init_uniprocessor(void) |
1216 | { | 1220 | { |
1217 | if (disable_apic) | ||
1218 | clear_cpu_cap(&boot_cpu_data, X86_FEATURE_APIC); | ||
1219 | |||
1220 | if (!smp_found_config && !cpu_has_apic) | 1221 | if (!smp_found_config && !cpu_has_apic) |
1221 | return -1; | 1222 | return -1; |
1222 | 1223 | ||
@@ -1419,7 +1420,7 @@ void disconnect_bsp_APIC(int virt_wire_setup) | |||
1419 | value &= ~APIC_VECTOR_MASK; | 1420 | value &= ~APIC_VECTOR_MASK; |
1420 | value |= APIC_SPIV_APIC_ENABLED; | 1421 | value |= APIC_SPIV_APIC_ENABLED; |
1421 | value |= 0xf; | 1422 | value |= 0xf; |
1422 | apic_write_around(APIC_SPIV, value); | 1423 | apic_write(APIC_SPIV, value); |
1423 | 1424 | ||
1424 | if (!virt_wire_setup) { | 1425 | if (!virt_wire_setup) { |
1425 | /* | 1426 | /* |
@@ -1432,10 +1433,10 @@ void disconnect_bsp_APIC(int virt_wire_setup) | |||
1432 | APIC_LVT_LEVEL_TRIGGER | APIC_LVT_MASKED); | 1433 | APIC_LVT_LEVEL_TRIGGER | APIC_LVT_MASKED); |
1433 | value |= APIC_LVT_REMOTE_IRR | APIC_SEND_PENDING; | 1434 | value |= APIC_LVT_REMOTE_IRR | APIC_SEND_PENDING; |
1434 | value = SET_APIC_DELIVERY_MODE(value, APIC_MODE_EXTINT); | 1435 | value = SET_APIC_DELIVERY_MODE(value, APIC_MODE_EXTINT); |
1435 | apic_write_around(APIC_LVT0, value); | 1436 | apic_write(APIC_LVT0, value); |
1436 | } else { | 1437 | } else { |
1437 | /* Disable LVT0 */ | 1438 | /* Disable LVT0 */ |
1438 | apic_write_around(APIC_LVT0, APIC_LVT_MASKED); | 1439 | apic_write(APIC_LVT0, APIC_LVT_MASKED); |
1439 | } | 1440 | } |
1440 | 1441 | ||
1441 | /* | 1442 | /* |
@@ -1449,7 +1450,7 @@ void disconnect_bsp_APIC(int virt_wire_setup) | |||
1449 | APIC_LVT_LEVEL_TRIGGER | APIC_LVT_MASKED); | 1450 | APIC_LVT_LEVEL_TRIGGER | APIC_LVT_MASKED); |
1450 | value |= APIC_LVT_REMOTE_IRR | APIC_SEND_PENDING; | 1451 | value |= APIC_LVT_REMOTE_IRR | APIC_SEND_PENDING; |
1451 | value = SET_APIC_DELIVERY_MODE(value, APIC_MODE_NMI); | 1452 | value = SET_APIC_DELIVERY_MODE(value, APIC_MODE_NMI); |
1452 | apic_write_around(APIC_LVT1, value); | 1453 | apic_write(APIC_LVT1, value); |
1453 | } | 1454 | } |
1454 | } | 1455 | } |
1455 | 1456 | ||
@@ -1700,7 +1701,7 @@ early_param("lapic", parse_lapic); | |||
1700 | static int __init parse_nolapic(char *arg) | 1701 | static int __init parse_nolapic(char *arg) |
1701 | { | 1702 | { |
1702 | disable_apic = 1; | 1703 | disable_apic = 1; |
1703 | clear_cpu_cap(&boot_cpu_data, X86_FEATURE_APIC); | 1704 | setup_clear_cpu_cap(X86_FEATURE_APIC); |
1704 | return 0; | 1705 | return 0; |
1705 | } | 1706 | } |
1706 | early_param("nolapic", parse_nolapic); | 1707 | early_param("nolapic", parse_nolapic); |
diff --git a/arch/x86/kernel/apic_64.c b/arch/x86/kernel/apic_64.c index 1e3d32e27c14..7f1f030da7ee 100644 --- a/arch/x86/kernel/apic_64.c +++ b/arch/x86/kernel/apic_64.c | |||
@@ -54,7 +54,7 @@ EXPORT_SYMBOL_GPL(local_apic_timer_c2_ok); | |||
54 | /* | 54 | /* |
55 | * Debug level, exported for io_apic.c | 55 | * Debug level, exported for io_apic.c |
56 | */ | 56 | */ |
57 | int apic_verbosity; | 57 | unsigned int apic_verbosity; |
58 | 58 | ||
59 | /* Have we found an MP table */ | 59 | /* Have we found an MP table */ |
60 | int smp_found_config; | 60 | int smp_found_config; |
@@ -314,7 +314,7 @@ static void setup_APIC_timer(void) | |||
314 | 314 | ||
315 | #define TICK_COUNT 100000000 | 315 | #define TICK_COUNT 100000000 |
316 | 316 | ||
317 | static void __init calibrate_APIC_clock(void) | 317 | static int __init calibrate_APIC_clock(void) |
318 | { | 318 | { |
319 | unsigned apic, apic_start; | 319 | unsigned apic, apic_start; |
320 | unsigned long tsc, tsc_start; | 320 | unsigned long tsc, tsc_start; |
@@ -368,6 +368,17 @@ static void __init calibrate_APIC_clock(void) | |||
368 | clockevent_delta2ns(0xF, &lapic_clockevent); | 368 | clockevent_delta2ns(0xF, &lapic_clockevent); |
369 | 369 | ||
370 | calibration_result = result / HZ; | 370 | calibration_result = result / HZ; |
371 | |||
372 | /* | ||
373 | * Do a sanity check on the APIC calibration result | ||
374 | */ | ||
375 | if (calibration_result < (1000000 / HZ)) { | ||
376 | printk(KERN_WARNING | ||
377 | "APIC frequency too slow, disabling apic timer\n"); | ||
378 | return -1; | ||
379 | } | ||
380 | |||
381 | return 0; | ||
371 | } | 382 | } |
372 | 383 | ||
373 | /* | 384 | /* |
@@ -394,14 +405,7 @@ void __init setup_boot_APIC_clock(void) | |||
394 | } | 405 | } |
395 | 406 | ||
396 | printk(KERN_INFO "Using local APIC timer interrupts.\n"); | 407 | printk(KERN_INFO "Using local APIC timer interrupts.\n"); |
397 | calibrate_APIC_clock(); | 408 | if (calibrate_APIC_clock()) { |
398 | |||
399 | /* | ||
400 | * Do a sanity check on the APIC calibration result | ||
401 | */ | ||
402 | if (calibration_result < (1000000 / HZ)) { | ||
403 | printk(KERN_WARNING | ||
404 | "APIC frequency too slow, disabling apic timer\n"); | ||
405 | /* No broadcast on UP ! */ | 409 | /* No broadcast on UP ! */ |
406 | if (num_possible_cpus() > 1) | 410 | if (num_possible_cpus() > 1) |
407 | setup_APIC_timer(); | 411 | setup_APIC_timer(); |
@@ -1337,7 +1341,7 @@ early_param("apic", apic_set_verbosity); | |||
1337 | static __init int setup_disableapic(char *str) | 1341 | static __init int setup_disableapic(char *str) |
1338 | { | 1342 | { |
1339 | disable_apic = 1; | 1343 | disable_apic = 1; |
1340 | clear_cpu_cap(&boot_cpu_data, X86_FEATURE_APIC); | 1344 | setup_clear_cpu_cap(X86_FEATURE_APIC); |
1341 | return 0; | 1345 | return 0; |
1342 | } | 1346 | } |
1343 | early_param("disableapic", setup_disableapic); | 1347 | early_param("disableapic", setup_disableapic); |
diff --git a/arch/x86/kernel/asm-offsets_64.c b/arch/x86/kernel/asm-offsets_64.c index bacf5deeec2d..aa89387006fe 100644 --- a/arch/x86/kernel/asm-offsets_64.c +++ b/arch/x86/kernel/asm-offsets_64.c | |||
@@ -18,6 +18,8 @@ | |||
18 | #include <asm/ia32.h> | 18 | #include <asm/ia32.h> |
19 | #include <asm/bootparam.h> | 19 | #include <asm/bootparam.h> |
20 | 20 | ||
21 | #include <xen/interface/xen.h> | ||
22 | |||
21 | #define __NO_STUBS 1 | 23 | #define __NO_STUBS 1 |
22 | #undef __SYSCALL | 24 | #undef __SYSCALL |
23 | #undef _ASM_X86_64_UNISTD_H_ | 25 | #undef _ASM_X86_64_UNISTD_H_ |
@@ -131,5 +133,14 @@ int main(void) | |||
131 | OFFSET(BP_loadflags, boot_params, hdr.loadflags); | 133 | OFFSET(BP_loadflags, boot_params, hdr.loadflags); |
132 | OFFSET(BP_hardware_subarch, boot_params, hdr.hardware_subarch); | 134 | OFFSET(BP_hardware_subarch, boot_params, hdr.hardware_subarch); |
133 | OFFSET(BP_version, boot_params, hdr.version); | 135 | OFFSET(BP_version, boot_params, hdr.version); |
136 | |||
137 | BLANK(); | ||
138 | DEFINE(PAGE_SIZE_asm, PAGE_SIZE); | ||
139 | #ifdef CONFIG_XEN | ||
140 | BLANK(); | ||
141 | OFFSET(XEN_vcpu_info_mask, vcpu_info, evtchn_upcall_mask); | ||
142 | OFFSET(XEN_vcpu_info_pending, vcpu_info, evtchn_upcall_pending); | ||
143 | #undef ENTRY | ||
144 | #endif | ||
134 | return 0; | 145 | return 0; |
135 | } | 146 | } |
diff --git a/arch/x86/kernel/bios_uv.c b/arch/x86/kernel/bios_uv.c new file mode 100644 index 000000000000..c639bd55391c --- /dev/null +++ b/arch/x86/kernel/bios_uv.c | |||
@@ -0,0 +1,48 @@ | |||
1 | /* | ||
2 | * BIOS run time interface routines. | ||
3 | * | ||
4 | * Copyright (c) 2008 Silicon Graphics, Inc. All Rights Reserved. | ||
5 | * | ||
6 | * This program is free software; you can redistribute it and/or modify | ||
7 | * it under the terms of the GNU General Public License as published by | ||
8 | * the Free Software Foundation; either version 2 of the License, or | ||
9 | * (at your option) any later version. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
19 | */ | ||
20 | |||
21 | #include <asm/uv/bios.h> | ||
22 | |||
23 | const char * | ||
24 | x86_bios_strerror(long status) | ||
25 | { | ||
26 | const char *str; | ||
27 | switch (status) { | ||
28 | case 0: str = "Call completed without error"; break; | ||
29 | case -1: str = "Not implemented"; break; | ||
30 | case -2: str = "Invalid argument"; break; | ||
31 | case -3: str = "Call completed with error"; break; | ||
32 | default: str = "Unknown BIOS status code"; break; | ||
33 | } | ||
34 | return str; | ||
35 | } | ||
36 | |||
37 | long | ||
38 | x86_bios_freq_base(unsigned long which, unsigned long *ticks_per_second, | ||
39 | unsigned long *drift_info) | ||
40 | { | ||
41 | struct uv_bios_retval isrv; | ||
42 | |||
43 | BIOS_CALL(isrv, BIOS_FREQ_BASE, which, 0, 0, 0, 0, 0, 0); | ||
44 | *ticks_per_second = isrv.v0; | ||
45 | *drift_info = isrv.v1; | ||
46 | return isrv.status; | ||
47 | } | ||
48 | EXPORT_SYMBOL_GPL(x86_bios_freq_base); | ||
diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c index 81a07ca65d44..cae9cabc3031 100644 --- a/arch/x86/kernel/cpu/amd.c +++ b/arch/x86/kernel/cpu/amd.c | |||
@@ -24,8 +24,6 @@ | |||
24 | extern void vide(void); | 24 | extern void vide(void); |
25 | __asm__(".align 4\nvide: ret"); | 25 | __asm__(".align 4\nvide: ret"); |
26 | 26 | ||
27 | int force_mwait __cpuinitdata; | ||
28 | |||
29 | static void __cpuinit early_init_amd(struct cpuinfo_x86 *c) | 27 | static void __cpuinit early_init_amd(struct cpuinfo_x86 *c) |
30 | { | 28 | { |
31 | if (cpuid_eax(0x80000000) >= 0x80000007) { | 29 | if (cpuid_eax(0x80000000) >= 0x80000007) { |
diff --git a/arch/x86/kernel/cpu/amd_64.c b/arch/x86/kernel/cpu/amd_64.c index 7c36fb8a28d4..d1692b2a41ff 100644 --- a/arch/x86/kernel/cpu/amd_64.c +++ b/arch/x86/kernel/cpu/amd_64.c | |||
@@ -115,6 +115,8 @@ static void __cpuinit early_init_amd(struct cpuinfo_x86 *c) | |||
115 | /* c->x86_power is 8000_0007 edx. Bit 8 is constant TSC */ | 115 | /* c->x86_power is 8000_0007 edx. Bit 8 is constant TSC */ |
116 | if (c->x86_power & (1<<8)) | 116 | if (c->x86_power & (1<<8)) |
117 | set_cpu_cap(c, X86_FEATURE_CONSTANT_TSC); | 117 | set_cpu_cap(c, X86_FEATURE_CONSTANT_TSC); |
118 | |||
119 | set_cpu_cap(c, X86_FEATURE_SYSCALL32); | ||
118 | } | 120 | } |
119 | 121 | ||
120 | static void __cpuinit init_amd(struct cpuinfo_x86 *c) | 122 | static void __cpuinit init_amd(struct cpuinfo_x86 *c) |
diff --git a/arch/x86/kernel/cpu/bugs.c b/arch/x86/kernel/cpu/bugs.c index 1b1c56bb338f..c9b58a806e85 100644 --- a/arch/x86/kernel/cpu/bugs.c +++ b/arch/x86/kernel/cpu/bugs.c | |||
@@ -131,13 +131,7 @@ static void __init check_popad(void) | |||
131 | * (for due to lack of "invlpg" and working WP on a i386) | 131 | * (for due to lack of "invlpg" and working WP on a i386) |
132 | * - In order to run on anything without a TSC, we need to be | 132 | * - In order to run on anything without a TSC, we need to be |
133 | * compiled for a i486. | 133 | * compiled for a i486. |
134 | * - In order to support the local APIC on a buggy Pentium machine, | 134 | */ |
135 | * we need to be compiled with CONFIG_X86_GOOD_APIC disabled, | ||
136 | * which happens implicitly if compiled for a Pentium or lower | ||
137 | * (unless an advanced selection of CPU features is used) as an | ||
138 | * otherwise config implies a properly working local APIC without | ||
139 | * the need to do extra reads from the APIC. | ||
140 | */ | ||
141 | 135 | ||
142 | static void __init check_config(void) | 136 | static void __init check_config(void) |
143 | { | 137 | { |
@@ -151,21 +145,6 @@ static void __init check_config(void) | |||
151 | if (boot_cpu_data.x86 == 3) | 145 | if (boot_cpu_data.x86 == 3) |
152 | panic("Kernel requires i486+ for 'invlpg' and other features"); | 146 | panic("Kernel requires i486+ for 'invlpg' and other features"); |
153 | #endif | 147 | #endif |
154 | |||
155 | /* | ||
156 | * If we were told we had a good local APIC, check for buggy Pentia, | ||
157 | * i.e. all B steppings and the C2 stepping of P54C when using their | ||
158 | * integrated APIC (see 11AP erratum in "Pentium Processor | ||
159 | * Specification Update"). | ||
160 | */ | ||
161 | #if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_X86_GOOD_APIC) | ||
162 | if (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL | ||
163 | && cpu_has_apic | ||
164 | && boot_cpu_data.x86 == 5 | ||
165 | && boot_cpu_data.x86_model == 2 | ||
166 | && (boot_cpu_data.x86_mask < 6 || boot_cpu_data.x86_mask == 11)) | ||
167 | panic("Kernel compiled for PMMX+, assumes a local APIC without the read-before-write bug!"); | ||
168 | #endif | ||
169 | } | 148 | } |
170 | 149 | ||
171 | 150 | ||
diff --git a/arch/x86/kernel/cpu/common_64.c b/arch/x86/kernel/cpu/common_64.c index 7b8cc72feb40..dd6e3f15017e 100644 --- a/arch/x86/kernel/cpu/common_64.c +++ b/arch/x86/kernel/cpu/common_64.c | |||
@@ -7,15 +7,13 @@ | |||
7 | #include <linux/module.h> | 7 | #include <linux/module.h> |
8 | #include <linux/kgdb.h> | 8 | #include <linux/kgdb.h> |
9 | #include <linux/topology.h> | 9 | #include <linux/topology.h> |
10 | #include <linux/string.h> | ||
11 | #include <linux/delay.h> | 10 | #include <linux/delay.h> |
12 | #include <linux/smp.h> | 11 | #include <linux/smp.h> |
13 | #include <linux/module.h> | ||
14 | #include <linux/percpu.h> | 12 | #include <linux/percpu.h> |
15 | #include <asm/processor.h> | ||
16 | #include <asm/i387.h> | 13 | #include <asm/i387.h> |
17 | #include <asm/msr.h> | 14 | #include <asm/msr.h> |
18 | #include <asm/io.h> | 15 | #include <asm/io.h> |
16 | #include <asm/linkage.h> | ||
19 | #include <asm/mmu_context.h> | 17 | #include <asm/mmu_context.h> |
20 | #include <asm/mtrr.h> | 18 | #include <asm/mtrr.h> |
21 | #include <asm/mce.h> | 19 | #include <asm/mce.h> |
@@ -305,7 +303,6 @@ static void __cpuinit early_identify_cpu(struct cpuinfo_x86 *c) | |||
305 | c->x86_capability[2] = cpuid_edx(0x80860001); | 303 | c->x86_capability[2] = cpuid_edx(0x80860001); |
306 | } | 304 | } |
307 | 305 | ||
308 | c->extended_cpuid_level = cpuid_eax(0x80000000); | ||
309 | if (c->extended_cpuid_level >= 0x80000007) | 306 | if (c->extended_cpuid_level >= 0x80000007) |
310 | c->x86_power = cpuid_edx(0x80000007); | 307 | c->x86_power = cpuid_edx(0x80000007); |
311 | 308 | ||
@@ -316,18 +313,11 @@ static void __cpuinit early_identify_cpu(struct cpuinfo_x86 *c) | |||
316 | c->x86_phys_bits = eax & 0xff; | 313 | c->x86_phys_bits = eax & 0xff; |
317 | } | 314 | } |
318 | 315 | ||
319 | /* Assume all 64-bit CPUs support 32-bit syscall */ | ||
320 | set_cpu_cap(c, X86_FEATURE_SYSCALL32); | ||
321 | |||
322 | if (c->x86_vendor != X86_VENDOR_UNKNOWN && | 316 | if (c->x86_vendor != X86_VENDOR_UNKNOWN && |
323 | cpu_devs[c->x86_vendor]->c_early_init) | 317 | cpu_devs[c->x86_vendor]->c_early_init) |
324 | cpu_devs[c->x86_vendor]->c_early_init(c); | 318 | cpu_devs[c->x86_vendor]->c_early_init(c); |
325 | 319 | ||
326 | validate_pat_support(c); | 320 | validate_pat_support(c); |
327 | |||
328 | /* early_param could clear that, but recall get it set again */ | ||
329 | if (disable_apic) | ||
330 | clear_cpu_cap(c, X86_FEATURE_APIC); | ||
331 | } | 321 | } |
332 | 322 | ||
333 | /* | 323 | /* |
@@ -517,8 +507,7 @@ void pda_init(int cpu) | |||
517 | } | 507 | } |
518 | 508 | ||
519 | char boot_exception_stacks[(N_EXCEPTION_STACKS - 1) * EXCEPTION_STKSZ + | 509 | char boot_exception_stacks[(N_EXCEPTION_STACKS - 1) * EXCEPTION_STKSZ + |
520 | DEBUG_STKSZ] | 510 | DEBUG_STKSZ] __page_aligned_bss; |
521 | __attribute__((section(".bss.page_aligned"))); | ||
522 | 511 | ||
523 | extern asmlinkage void ignore_sysret(void); | 512 | extern asmlinkage void ignore_sysret(void); |
524 | 513 | ||
diff --git a/arch/x86/kernel/cpu/cpufreq/powernow-k7.h b/arch/x86/kernel/cpu/cpufreq/powernow-k7.h index f8a63b3664e3..35fb4eaf6e1c 100644 --- a/arch/x86/kernel/cpu/cpufreq/powernow-k7.h +++ b/arch/x86/kernel/cpu/cpufreq/powernow-k7.h | |||
@@ -1,5 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * $Id: powernow-k7.h,v 1.2 2003/02/10 18:26:01 davej Exp $ | ||
3 | * (C) 2003 Dave Jones. | 2 | * (C) 2003 Dave Jones. |
4 | * | 3 | * |
5 | * Licensed under the terms of the GNU GPL License version 2. | 4 | * Licensed under the terms of the GNU GPL License version 2. |
diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c index 70609efdf1da..b75f2569b8f8 100644 --- a/arch/x86/kernel/cpu/intel.c +++ b/arch/x86/kernel/cpu/intel.c | |||
@@ -227,6 +227,16 @@ static void __cpuinit init_intel(struct cpuinfo_x86 *c) | |||
227 | if (cpu_has_bts) | 227 | if (cpu_has_bts) |
228 | ds_init_intel(c); | 228 | ds_init_intel(c); |
229 | 229 | ||
230 | /* | ||
231 | * See if we have a good local APIC by checking for buggy Pentia, | ||
232 | * i.e. all B steppings and the C2 stepping of P54C when using their | ||
233 | * integrated APIC (see 11AP erratum in "Pentium Processor | ||
234 | * Specification Update"). | ||
235 | */ | ||
236 | if (cpu_has_apic && (c->x86<<8 | c->x86_model<<4) == 0x520 && | ||
237 | (c->x86_mask < 0x6 || c->x86_mask == 0xb)) | ||
238 | set_cpu_cap(c, X86_FEATURE_11AP); | ||
239 | |||
230 | #ifdef CONFIG_X86_NUMAQ | 240 | #ifdef CONFIG_X86_NUMAQ |
231 | numaq_tsc_disable(); | 241 | numaq_tsc_disable(); |
232 | #endif | 242 | #endif |
diff --git a/arch/x86/kernel/cpu/intel_cacheinfo.c b/arch/x86/kernel/cpu/intel_cacheinfo.c index 2c8afafa18e8..ff517f0b8cc4 100644 --- a/arch/x86/kernel/cpu/intel_cacheinfo.c +++ b/arch/x86/kernel/cpu/intel_cacheinfo.c | |||
@@ -780,15 +780,14 @@ static int __cpuinit cache_add_dev(struct sys_device * sys_dev) | |||
780 | } | 780 | } |
781 | kobject_put(per_cpu(cache_kobject, cpu)); | 781 | kobject_put(per_cpu(cache_kobject, cpu)); |
782 | cpuid4_cache_sysfs_exit(cpu); | 782 | cpuid4_cache_sysfs_exit(cpu); |
783 | break; | 783 | return retval; |
784 | } | 784 | } |
785 | kobject_uevent(&(this_object->kobj), KOBJ_ADD); | 785 | kobject_uevent(&(this_object->kobj), KOBJ_ADD); |
786 | } | 786 | } |
787 | if (!retval) | 787 | cpu_set(cpu, cache_dev_map); |
788 | cpu_set(cpu, cache_dev_map); | ||
789 | 788 | ||
790 | kobject_uevent(per_cpu(cache_kobject, cpu), KOBJ_ADD); | 789 | kobject_uevent(per_cpu(cache_kobject, cpu), KOBJ_ADD); |
791 | return retval; | 790 | return 0; |
792 | } | 791 | } |
793 | 792 | ||
794 | static void __cpuinit cache_remove_dev(struct sys_device * sys_dev) | 793 | static void __cpuinit cache_remove_dev(struct sys_device * sys_dev) |
diff --git a/arch/x86/kernel/cpu/mcheck/mce_64.c b/arch/x86/kernel/cpu/mcheck/mce_64.c index c4a7ec31394c..9ab65be82427 100644 --- a/arch/x86/kernel/cpu/mcheck/mce_64.c +++ b/arch/x86/kernel/cpu/mcheck/mce_64.c | |||
@@ -762,10 +762,14 @@ DEFINE_PER_CPU(struct sys_device, device_mce); | |||
762 | 762 | ||
763 | /* Why are there no generic functions for this? */ | 763 | /* Why are there no generic functions for this? */ |
764 | #define ACCESSOR(name, var, start) \ | 764 | #define ACCESSOR(name, var, start) \ |
765 | static ssize_t show_ ## name(struct sys_device *s, char *buf) { \ | 765 | static ssize_t show_ ## name(struct sys_device *s, \ |
766 | struct sysdev_attribute *attr, \ | ||
767 | char *buf) { \ | ||
766 | return sprintf(buf, "%lx\n", (unsigned long)var); \ | 768 | return sprintf(buf, "%lx\n", (unsigned long)var); \ |
767 | } \ | 769 | } \ |
768 | static ssize_t set_ ## name(struct sys_device *s,const char *buf,size_t siz) { \ | 770 | static ssize_t set_ ## name(struct sys_device *s, \ |
771 | struct sysdev_attribute *attr, \ | ||
772 | const char *buf, size_t siz) { \ | ||
769 | char *end; \ | 773 | char *end; \ |
770 | unsigned long new = simple_strtoul(buf, &end, 0); \ | 774 | unsigned long new = simple_strtoul(buf, &end, 0); \ |
771 | if (end == buf) return -EINVAL; \ | 775 | if (end == buf) return -EINVAL; \ |
@@ -786,14 +790,16 @@ ACCESSOR(bank3ctl,bank[3],mce_restart()) | |||
786 | ACCESSOR(bank4ctl,bank[4],mce_restart()) | 790 | ACCESSOR(bank4ctl,bank[4],mce_restart()) |
787 | ACCESSOR(bank5ctl,bank[5],mce_restart()) | 791 | ACCESSOR(bank5ctl,bank[5],mce_restart()) |
788 | 792 | ||
789 | static ssize_t show_trigger(struct sys_device *s, char *buf) | 793 | static ssize_t show_trigger(struct sys_device *s, struct sysdev_attribute *attr, |
794 | char *buf) | ||
790 | { | 795 | { |
791 | strcpy(buf, trigger); | 796 | strcpy(buf, trigger); |
792 | strcat(buf, "\n"); | 797 | strcat(buf, "\n"); |
793 | return strlen(trigger) + 1; | 798 | return strlen(trigger) + 1; |
794 | } | 799 | } |
795 | 800 | ||
796 | static ssize_t set_trigger(struct sys_device *s,const char *buf,size_t siz) | 801 | static ssize_t set_trigger(struct sys_device *s, struct sysdev_attribute *attr, |
802 | const char *buf,size_t siz) | ||
797 | { | 803 | { |
798 | char *p; | 804 | char *p; |
799 | int len; | 805 | int len; |
@@ -806,12 +812,12 @@ static ssize_t set_trigger(struct sys_device *s,const char *buf,size_t siz) | |||
806 | } | 812 | } |
807 | 813 | ||
808 | static SYSDEV_ATTR(trigger, 0644, show_trigger, set_trigger); | 814 | static SYSDEV_ATTR(trigger, 0644, show_trigger, set_trigger); |
809 | ACCESSOR(tolerant,tolerant,) | 815 | static SYSDEV_INT_ATTR(tolerant, 0644, tolerant); |
810 | ACCESSOR(check_interval,check_interval,mce_restart()) | 816 | ACCESSOR(check_interval,check_interval,mce_restart()) |
811 | static struct sysdev_attribute *mce_attributes[] = { | 817 | static struct sysdev_attribute *mce_attributes[] = { |
812 | &attr_bank0ctl, &attr_bank1ctl, &attr_bank2ctl, | 818 | &attr_bank0ctl, &attr_bank1ctl, &attr_bank2ctl, |
813 | &attr_bank3ctl, &attr_bank4ctl, &attr_bank5ctl, | 819 | &attr_bank3ctl, &attr_bank4ctl, &attr_bank5ctl, |
814 | &attr_tolerant, &attr_check_interval, &attr_trigger, | 820 | &attr_tolerant.attr, &attr_check_interval, &attr_trigger, |
815 | NULL | 821 | NULL |
816 | }; | 822 | }; |
817 | 823 | ||
diff --git a/arch/x86/kernel/cpu/mcheck/p4.c b/arch/x86/kernel/cpu/mcheck/p4.c index eef001ad3bde..9b60fce09f75 100644 --- a/arch/x86/kernel/cpu/mcheck/p4.c +++ b/arch/x86/kernel/cpu/mcheck/p4.c | |||
@@ -102,7 +102,7 @@ static void intel_init_thermal(struct cpuinfo_x86 *c) | |||
102 | /* The temperature transition interrupt handler setup */ | 102 | /* The temperature transition interrupt handler setup */ |
103 | h = THERMAL_APIC_VECTOR; /* our delivery vector */ | 103 | h = THERMAL_APIC_VECTOR; /* our delivery vector */ |
104 | h |= (APIC_DM_FIXED | APIC_LVT_MASKED); /* we'll mask till we're ready */ | 104 | h |= (APIC_DM_FIXED | APIC_LVT_MASKED); /* we'll mask till we're ready */ |
105 | apic_write_around(APIC_LVTTHMR, h); | 105 | apic_write(APIC_LVTTHMR, h); |
106 | 106 | ||
107 | rdmsr(MSR_IA32_THERM_INTERRUPT, l, h); | 107 | rdmsr(MSR_IA32_THERM_INTERRUPT, l, h); |
108 | wrmsr(MSR_IA32_THERM_INTERRUPT, l | 0x03 , h); | 108 | wrmsr(MSR_IA32_THERM_INTERRUPT, l | 0x03 , h); |
@@ -114,7 +114,7 @@ static void intel_init_thermal(struct cpuinfo_x86 *c) | |||
114 | wrmsr(MSR_IA32_MISC_ENABLE, l | (1<<3), h); | 114 | wrmsr(MSR_IA32_MISC_ENABLE, l | (1<<3), h); |
115 | 115 | ||
116 | l = apic_read(APIC_LVTTHMR); | 116 | l = apic_read(APIC_LVTTHMR); |
117 | apic_write_around(APIC_LVTTHMR, l & ~APIC_LVT_MASKED); | 117 | apic_write(APIC_LVTTHMR, l & ~APIC_LVT_MASKED); |
118 | printk(KERN_INFO "CPU%d: Thermal monitoring enabled\n", cpu); | 118 | printk(KERN_INFO "CPU%d: Thermal monitoring enabled\n", cpu); |
119 | 119 | ||
120 | /* enable thermal throttle processing */ | 120 | /* enable thermal throttle processing */ |
diff --git a/arch/x86/kernel/cpu/mcheck/therm_throt.c b/arch/x86/kernel/cpu/mcheck/therm_throt.c index 1f4cc48c14c6..d5ae2243f0b9 100644 --- a/arch/x86/kernel/cpu/mcheck/therm_throt.c +++ b/arch/x86/kernel/cpu/mcheck/therm_throt.c | |||
@@ -35,6 +35,7 @@ atomic_t therm_throt_en = ATOMIC_INIT(0); | |||
35 | 35 | ||
36 | #define define_therm_throt_sysdev_show_func(name) \ | 36 | #define define_therm_throt_sysdev_show_func(name) \ |
37 | static ssize_t therm_throt_sysdev_show_##name(struct sys_device *dev, \ | 37 | static ssize_t therm_throt_sysdev_show_##name(struct sys_device *dev, \ |
38 | struct sysdev_attribute *attr, \ | ||
38 | char *buf) \ | 39 | char *buf) \ |
39 | { \ | 40 | { \ |
40 | unsigned int cpu = dev->id; \ | 41 | unsigned int cpu = dev->id; \ |
diff --git a/arch/x86/kernel/cpu/perfctr-watchdog.c b/arch/x86/kernel/cpu/perfctr-watchdog.c index 6d4bdc02388a..de7439f82b92 100644 --- a/arch/x86/kernel/cpu/perfctr-watchdog.c +++ b/arch/x86/kernel/cpu/perfctr-watchdog.c | |||
@@ -250,7 +250,7 @@ static void write_watchdog_counter(unsigned int perfctr_msr, | |||
250 | 250 | ||
251 | do_div(count, nmi_hz); | 251 | do_div(count, nmi_hz); |
252 | if(descr) | 252 | if(descr) |
253 | Dprintk("setting %s to -0x%08Lx\n", descr, count); | 253 | pr_debug("setting %s to -0x%08Lx\n", descr, count); |
254 | wrmsrl(perfctr_msr, 0 - count); | 254 | wrmsrl(perfctr_msr, 0 - count); |
255 | } | 255 | } |
256 | 256 | ||
@@ -261,7 +261,7 @@ static void write_watchdog_counter32(unsigned int perfctr_msr, | |||
261 | 261 | ||
262 | do_div(count, nmi_hz); | 262 | do_div(count, nmi_hz); |
263 | if(descr) | 263 | if(descr) |
264 | Dprintk("setting %s to -0x%08Lx\n", descr, count); | 264 | pr_debug("setting %s to -0x%08Lx\n", descr, count); |
265 | wrmsr(perfctr_msr, (u32)(-count), 0); | 265 | wrmsr(perfctr_msr, (u32)(-count), 0); |
266 | } | 266 | } |
267 | 267 | ||
diff --git a/arch/x86/kernel/cpuid.c b/arch/x86/kernel/cpuid.c index 2de5fa2bbf77..14b11b3be31c 100644 --- a/arch/x86/kernel/cpuid.c +++ b/arch/x86/kernel/cpuid.c | |||
@@ -141,8 +141,8 @@ static __cpuinit int cpuid_device_create(int cpu) | |||
141 | { | 141 | { |
142 | struct device *dev; | 142 | struct device *dev; |
143 | 143 | ||
144 | dev = device_create(cpuid_class, NULL, MKDEV(CPUID_MAJOR, cpu), | 144 | dev = device_create_drvdata(cpuid_class, NULL, MKDEV(CPUID_MAJOR, cpu), |
145 | "cpu%d", cpu); | 145 | NULL, "cpu%d", cpu); |
146 | return IS_ERR(dev) ? PTR_ERR(dev) : 0; | 146 | return IS_ERR(dev) ? PTR_ERR(dev) : 0; |
147 | } | 147 | } |
148 | 148 | ||
diff --git a/arch/x86/kernel/e820.c b/arch/x86/kernel/e820.c index 28c29180b380..9af89078f7bb 100644 --- a/arch/x86/kernel/e820.c +++ b/arch/x86/kernel/e820.c | |||
@@ -877,7 +877,8 @@ void __init early_res_to_bootmem(u64 start, u64 end) | |||
877 | for (i = 0; i < MAX_EARLY_RES && early_res[i].end; i++) | 877 | for (i = 0; i < MAX_EARLY_RES && early_res[i].end; i++) |
878 | count++; | 878 | count++; |
879 | 879 | ||
880 | printk(KERN_INFO "(%d early reservations) ==> bootmem\n", count); | 880 | printk(KERN_INFO "(%d early reservations) ==> bootmem [%010llx - %010llx]\n", |
881 | count, start, end); | ||
881 | for (i = 0; i < count; i++) { | 882 | for (i = 0; i < count; i++) { |
882 | struct early_res *r = &early_res[i]; | 883 | struct early_res *r = &early_res[i]; |
883 | printk(KERN_INFO " #%d [%010llx - %010llx] %16s", i, | 884 | printk(KERN_INFO " #%d [%010llx - %010llx] %16s", i, |
@@ -1298,11 +1299,6 @@ void __init e820_reserve_resources(void) | |||
1298 | } | 1299 | } |
1299 | } | 1300 | } |
1300 | 1301 | ||
1301 | /* | ||
1302 | * Non-standard memory setup can be specified via this quirk: | ||
1303 | */ | ||
1304 | char * (*arch_memory_setup_quirk)(void); | ||
1305 | |||
1306 | char *__init default_machine_specific_memory_setup(void) | 1302 | char *__init default_machine_specific_memory_setup(void) |
1307 | { | 1303 | { |
1308 | char *who = "BIOS-e820"; | 1304 | char *who = "BIOS-e820"; |
@@ -1343,8 +1339,8 @@ char *__init default_machine_specific_memory_setup(void) | |||
1343 | 1339 | ||
1344 | char *__init __attribute__((weak)) machine_specific_memory_setup(void) | 1340 | char *__init __attribute__((weak)) machine_specific_memory_setup(void) |
1345 | { | 1341 | { |
1346 | if (arch_memory_setup_quirk) { | 1342 | if (x86_quirks->arch_memory_setup) { |
1347 | char *who = arch_memory_setup_quirk(); | 1343 | char *who = x86_quirks->arch_memory_setup(); |
1348 | 1344 | ||
1349 | if (who) | 1345 | if (who) |
1350 | return who; | 1346 | return who; |
@@ -1367,24 +1363,3 @@ void __init setup_memory_map(void) | |||
1367 | printk(KERN_INFO "BIOS-provided physical RAM map:\n"); | 1363 | printk(KERN_INFO "BIOS-provided physical RAM map:\n"); |
1368 | e820_print_map(who); | 1364 | e820_print_map(who); |
1369 | } | 1365 | } |
1370 | |||
1371 | #ifdef CONFIG_X86_64 | ||
1372 | int __init arch_get_ram_range(int slot, u64 *addr, u64 *size) | ||
1373 | { | ||
1374 | int i; | ||
1375 | |||
1376 | if (slot < 0 || slot >= e820.nr_map) | ||
1377 | return -1; | ||
1378 | for (i = slot; i < e820.nr_map; i++) { | ||
1379 | if (e820.map[i].type != E820_RAM) | ||
1380 | continue; | ||
1381 | break; | ||
1382 | } | ||
1383 | if (i == e820.nr_map || e820.map[i].addr > (max_pfn << PAGE_SHIFT)) | ||
1384 | return -1; | ||
1385 | *addr = e820.map[i].addr; | ||
1386 | *size = min_t(u64, e820.map[i].size + e820.map[i].addr, | ||
1387 | max_pfn << PAGE_SHIFT) - *addr; | ||
1388 | return i + 1; | ||
1389 | } | ||
1390 | #endif | ||
diff --git a/arch/x86/kernel/early-quirks.c b/arch/x86/kernel/early-quirks.c index a0e11c0cc872..4353cf5e6fac 100644 --- a/arch/x86/kernel/early-quirks.c +++ b/arch/x86/kernel/early-quirks.c | |||
@@ -16,10 +16,7 @@ | |||
16 | #include <asm/dma.h> | 16 | #include <asm/dma.h> |
17 | #include <asm/io_apic.h> | 17 | #include <asm/io_apic.h> |
18 | #include <asm/apic.h> | 18 | #include <asm/apic.h> |
19 | 19 | #include <asm/iommu.h> | |
20 | #ifdef CONFIG_GART_IOMMU | ||
21 | #include <asm/gart.h> | ||
22 | #endif | ||
23 | 20 | ||
24 | static void __init fix_hypertransport_config(int num, int slot, int func) | 21 | static void __init fix_hypertransport_config(int num, int slot, int func) |
25 | { | 22 | { |
diff --git a/arch/x86/kernel/entry_32.S b/arch/x86/kernel/entry_32.S index 6bc07f0f1202..cdfd94cc6b14 100644 --- a/arch/x86/kernel/entry_32.S +++ b/arch/x86/kernel/entry_32.S | |||
@@ -332,7 +332,7 @@ sysenter_past_esp: | |||
332 | GET_THREAD_INFO(%ebp) | 332 | GET_THREAD_INFO(%ebp) |
333 | 333 | ||
334 | /* Note, _TIF_SECCOMP is bit number 8, and so it needs testw and not testb */ | 334 | /* Note, _TIF_SECCOMP is bit number 8, and so it needs testw and not testb */ |
335 | testw $(_TIF_SYSCALL_EMU|_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT),TI_flags(%ebp) | 335 | testw $_TIF_WORK_SYSCALL_ENTRY,TI_flags(%ebp) |
336 | jnz syscall_trace_entry | 336 | jnz syscall_trace_entry |
337 | cmpl $(nr_syscalls), %eax | 337 | cmpl $(nr_syscalls), %eax |
338 | jae syscall_badsys | 338 | jae syscall_badsys |
@@ -370,7 +370,7 @@ ENTRY(system_call) | |||
370 | GET_THREAD_INFO(%ebp) | 370 | GET_THREAD_INFO(%ebp) |
371 | # system call tracing in operation / emulation | 371 | # system call tracing in operation / emulation |
372 | /* Note, _TIF_SECCOMP is bit number 8, and so it needs testw and not testb */ | 372 | /* Note, _TIF_SECCOMP is bit number 8, and so it needs testw and not testb */ |
373 | testw $(_TIF_SYSCALL_EMU|_TIF_SYSCALL_TRACE|_TIF_SECCOMP|_TIF_SYSCALL_AUDIT),TI_flags(%ebp) | 373 | testw $_TIF_WORK_SYSCALL_ENTRY,TI_flags(%ebp) |
374 | jnz syscall_trace_entry | 374 | jnz syscall_trace_entry |
375 | cmpl $(nr_syscalls), %eax | 375 | cmpl $(nr_syscalls), %eax |
376 | jae syscall_badsys | 376 | jae syscall_badsys |
@@ -383,10 +383,6 @@ syscall_exit: | |||
383 | # setting need_resched or sigpending | 383 | # setting need_resched or sigpending |
384 | # between sampling and the iret | 384 | # between sampling and the iret |
385 | TRACE_IRQS_OFF | 385 | TRACE_IRQS_OFF |
386 | testl $X86_EFLAGS_TF,PT_EFLAGS(%esp) # If tracing set singlestep flag on exit | ||
387 | jz no_singlestep | ||
388 | orl $_TIF_SINGLESTEP,TI_flags(%ebp) | ||
389 | no_singlestep: | ||
390 | movl TI_flags(%ebp), %ecx | 386 | movl TI_flags(%ebp), %ecx |
391 | testw $_TIF_ALLWORK_MASK, %cx # current->work | 387 | testw $_TIF_ALLWORK_MASK, %cx # current->work |
392 | jne syscall_exit_work | 388 | jne syscall_exit_work |
@@ -514,12 +510,8 @@ END(work_pending) | |||
514 | syscall_trace_entry: | 510 | syscall_trace_entry: |
515 | movl $-ENOSYS,PT_EAX(%esp) | 511 | movl $-ENOSYS,PT_EAX(%esp) |
516 | movl %esp, %eax | 512 | movl %esp, %eax |
517 | xorl %edx,%edx | 513 | call syscall_trace_enter |
518 | call do_syscall_trace | 514 | /* What it returned is what we'll actually use. */ |
519 | cmpl $0, %eax | ||
520 | jne resume_userspace # ret != 0 -> running under PTRACE_SYSEMU, | ||
521 | # so must skip actual syscall | ||
522 | movl PT_ORIG_EAX(%esp), %eax | ||
523 | cmpl $(nr_syscalls), %eax | 515 | cmpl $(nr_syscalls), %eax |
524 | jnae syscall_call | 516 | jnae syscall_call |
525 | jmp syscall_exit | 517 | jmp syscall_exit |
@@ -528,14 +520,13 @@ END(syscall_trace_entry) | |||
528 | # perform syscall exit tracing | 520 | # perform syscall exit tracing |
529 | ALIGN | 521 | ALIGN |
530 | syscall_exit_work: | 522 | syscall_exit_work: |
531 | testb $(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SINGLESTEP), %cl | 523 | testb $_TIF_WORK_SYSCALL_EXIT, %cl |
532 | jz work_pending | 524 | jz work_pending |
533 | TRACE_IRQS_ON | 525 | TRACE_IRQS_ON |
534 | ENABLE_INTERRUPTS(CLBR_ANY) # could let do_syscall_trace() call | 526 | ENABLE_INTERRUPTS(CLBR_ANY) # could let syscall_trace_leave() call |
535 | # schedule() instead | 527 | # schedule() instead |
536 | movl %esp, %eax | 528 | movl %esp, %eax |
537 | movl $1, %edx | 529 | call syscall_trace_leave |
538 | call do_syscall_trace | ||
539 | jmp resume_userspace | 530 | jmp resume_userspace |
540 | END(syscall_exit_work) | 531 | END(syscall_exit_work) |
541 | CFI_ENDPROC | 532 | CFI_ENDPROC |
@@ -1024,6 +1015,7 @@ ENDPROC(kernel_thread_helper) | |||
1024 | ENTRY(xen_sysenter_target) | 1015 | ENTRY(xen_sysenter_target) |
1025 | RING0_INT_FRAME | 1016 | RING0_INT_FRAME |
1026 | addl $5*4, %esp /* remove xen-provided frame */ | 1017 | addl $5*4, %esp /* remove xen-provided frame */ |
1018 | CFI_ADJUST_CFA_OFFSET -5*4 | ||
1027 | jmp sysenter_past_esp | 1019 | jmp sysenter_past_esp |
1028 | CFI_ENDPROC | 1020 | CFI_ENDPROC |
1029 | 1021 | ||
diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S index ae63e584c340..8410e26f4183 100644 --- a/arch/x86/kernel/entry_64.S +++ b/arch/x86/kernel/entry_64.S | |||
@@ -349,8 +349,7 @@ ENTRY(system_call_after_swapgs) | |||
349 | movq %rcx,RIP-ARGOFFSET(%rsp) | 349 | movq %rcx,RIP-ARGOFFSET(%rsp) |
350 | CFI_REL_OFFSET rip,RIP-ARGOFFSET | 350 | CFI_REL_OFFSET rip,RIP-ARGOFFSET |
351 | GET_THREAD_INFO(%rcx) | 351 | GET_THREAD_INFO(%rcx) |
352 | testl $(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SECCOMP), \ | 352 | testl $_TIF_WORK_SYSCALL_ENTRY,TI_flags(%rcx) |
353 | TI_flags(%rcx) | ||
354 | jnz tracesys | 353 | jnz tracesys |
355 | cmpq $__NR_syscall_max,%rax | 354 | cmpq $__NR_syscall_max,%rax |
356 | ja badsys | 355 | ja badsys |
@@ -430,7 +429,12 @@ tracesys: | |||
430 | FIXUP_TOP_OF_STACK %rdi | 429 | FIXUP_TOP_OF_STACK %rdi |
431 | movq %rsp,%rdi | 430 | movq %rsp,%rdi |
432 | call syscall_trace_enter | 431 | call syscall_trace_enter |
433 | LOAD_ARGS ARGOFFSET /* reload args from stack in case ptrace changed it */ | 432 | /* |
433 | * Reload arg registers from stack in case ptrace changed them. | ||
434 | * We don't reload %rax because syscall_trace_enter() returned | ||
435 | * the value it wants us to use in the table lookup. | ||
436 | */ | ||
437 | LOAD_ARGS ARGOFFSET, 1 | ||
434 | RESTORE_REST | 438 | RESTORE_REST |
435 | cmpq $__NR_syscall_max,%rax | 439 | cmpq $__NR_syscall_max,%rax |
436 | ja int_ret_from_sys_call /* RAX(%rsp) set to -ENOSYS above */ | 440 | ja int_ret_from_sys_call /* RAX(%rsp) set to -ENOSYS above */ |
@@ -483,7 +487,7 @@ int_very_careful: | |||
483 | ENABLE_INTERRUPTS(CLBR_NONE) | 487 | ENABLE_INTERRUPTS(CLBR_NONE) |
484 | SAVE_REST | 488 | SAVE_REST |
485 | /* Check for syscall exit trace */ | 489 | /* Check for syscall exit trace */ |
486 | testl $(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SINGLESTEP),%edx | 490 | testl $_TIF_WORK_SYSCALL_EXIT,%edx |
487 | jz int_signal | 491 | jz int_signal |
488 | pushq %rdi | 492 | pushq %rdi |
489 | CFI_ADJUST_CFA_OFFSET 8 | 493 | CFI_ADJUST_CFA_OFFSET 8 |
@@ -491,7 +495,7 @@ int_very_careful: | |||
491 | call syscall_trace_leave | 495 | call syscall_trace_leave |
492 | popq %rdi | 496 | popq %rdi |
493 | CFI_ADJUST_CFA_OFFSET -8 | 497 | CFI_ADJUST_CFA_OFFSET -8 |
494 | andl $~(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SINGLESTEP),%edi | 498 | andl $~(_TIF_WORK_SYSCALL_EXIT|_TIF_SYSCALL_EMU),%edi |
495 | jmp int_restore_rest | 499 | jmp int_restore_rest |
496 | 500 | ||
497 | int_signal: | 501 | int_signal: |
@@ -1189,6 +1193,7 @@ END(device_not_available) | |||
1189 | /* runs on exception stack */ | 1193 | /* runs on exception stack */ |
1190 | KPROBE_ENTRY(debug) | 1194 | KPROBE_ENTRY(debug) |
1191 | INTR_FRAME | 1195 | INTR_FRAME |
1196 | PARAVIRT_ADJUST_EXCEPTION_FRAME | ||
1192 | pushq $0 | 1197 | pushq $0 |
1193 | CFI_ADJUST_CFA_OFFSET 8 | 1198 | CFI_ADJUST_CFA_OFFSET 8 |
1194 | paranoidentry do_debug, DEBUG_STACK | 1199 | paranoidentry do_debug, DEBUG_STACK |
@@ -1198,6 +1203,7 @@ KPROBE_END(debug) | |||
1198 | /* runs on exception stack */ | 1203 | /* runs on exception stack */ |
1199 | KPROBE_ENTRY(nmi) | 1204 | KPROBE_ENTRY(nmi) |
1200 | INTR_FRAME | 1205 | INTR_FRAME |
1206 | PARAVIRT_ADJUST_EXCEPTION_FRAME | ||
1201 | pushq $-1 | 1207 | pushq $-1 |
1202 | CFI_ADJUST_CFA_OFFSET 8 | 1208 | CFI_ADJUST_CFA_OFFSET 8 |
1203 | paranoidentry do_nmi, 0, 0 | 1209 | paranoidentry do_nmi, 0, 0 |
@@ -1211,6 +1217,7 @@ KPROBE_END(nmi) | |||
1211 | 1217 | ||
1212 | KPROBE_ENTRY(int3) | 1218 | KPROBE_ENTRY(int3) |
1213 | INTR_FRAME | 1219 | INTR_FRAME |
1220 | PARAVIRT_ADJUST_EXCEPTION_FRAME | ||
1214 | pushq $0 | 1221 | pushq $0 |
1215 | CFI_ADJUST_CFA_OFFSET 8 | 1222 | CFI_ADJUST_CFA_OFFSET 8 |
1216 | paranoidentry do_int3, DEBUG_STACK | 1223 | paranoidentry do_int3, DEBUG_STACK |
@@ -1237,6 +1244,7 @@ END(coprocessor_segment_overrun) | |||
1237 | /* runs on exception stack */ | 1244 | /* runs on exception stack */ |
1238 | ENTRY(double_fault) | 1245 | ENTRY(double_fault) |
1239 | XCPT_FRAME | 1246 | XCPT_FRAME |
1247 | PARAVIRT_ADJUST_EXCEPTION_FRAME | ||
1240 | paranoidentry do_double_fault | 1248 | paranoidentry do_double_fault |
1241 | jmp paranoid_exit1 | 1249 | jmp paranoid_exit1 |
1242 | CFI_ENDPROC | 1250 | CFI_ENDPROC |
@@ -1253,6 +1261,7 @@ END(segment_not_present) | |||
1253 | /* runs on exception stack */ | 1261 | /* runs on exception stack */ |
1254 | ENTRY(stack_segment) | 1262 | ENTRY(stack_segment) |
1255 | XCPT_FRAME | 1263 | XCPT_FRAME |
1264 | PARAVIRT_ADJUST_EXCEPTION_FRAME | ||
1256 | paranoidentry do_stack_segment | 1265 | paranoidentry do_stack_segment |
1257 | jmp paranoid_exit1 | 1266 | jmp paranoid_exit1 |
1258 | CFI_ENDPROC | 1267 | CFI_ENDPROC |
@@ -1278,6 +1287,7 @@ END(spurious_interrupt_bug) | |||
1278 | /* runs on exception stack */ | 1287 | /* runs on exception stack */ |
1279 | ENTRY(machine_check) | 1288 | ENTRY(machine_check) |
1280 | INTR_FRAME | 1289 | INTR_FRAME |
1290 | PARAVIRT_ADJUST_EXCEPTION_FRAME | ||
1281 | pushq $0 | 1291 | pushq $0 |
1282 | CFI_ADJUST_CFA_OFFSET 8 | 1292 | CFI_ADJUST_CFA_OFFSET 8 |
1283 | paranoidentry do_machine_check | 1293 | paranoidentry do_machine_check |
@@ -1312,3 +1322,103 @@ KPROBE_ENTRY(ignore_sysret) | |||
1312 | sysret | 1322 | sysret |
1313 | CFI_ENDPROC | 1323 | CFI_ENDPROC |
1314 | ENDPROC(ignore_sysret) | 1324 | ENDPROC(ignore_sysret) |
1325 | |||
1326 | #ifdef CONFIG_XEN | ||
1327 | ENTRY(xen_hypervisor_callback) | ||
1328 | zeroentry xen_do_hypervisor_callback | ||
1329 | END(xen_hypervisor_callback) | ||
1330 | |||
1331 | /* | ||
1332 | # A note on the "critical region" in our callback handler. | ||
1333 | # We want to avoid stacking callback handlers due to events occurring | ||
1334 | # during handling of the last event. To do this, we keep events disabled | ||
1335 | # until we've done all processing. HOWEVER, we must enable events before | ||
1336 | # popping the stack frame (can't be done atomically) and so it would still | ||
1337 | # be possible to get enough handler activations to overflow the stack. | ||
1338 | # Although unlikely, bugs of that kind are hard to track down, so we'd | ||
1339 | # like to avoid the possibility. | ||
1340 | # So, on entry to the handler we detect whether we interrupted an | ||
1341 | # existing activation in its critical region -- if so, we pop the current | ||
1342 | # activation and restart the handler using the previous one. | ||
1343 | */ | ||
1344 | ENTRY(xen_do_hypervisor_callback) # do_hypervisor_callback(struct *pt_regs) | ||
1345 | CFI_STARTPROC | ||
1346 | /* Since we don't modify %rdi, evtchn_do_upall(struct *pt_regs) will | ||
1347 | see the correct pointer to the pt_regs */ | ||
1348 | movq %rdi, %rsp # we don't return, adjust the stack frame | ||
1349 | CFI_ENDPROC | ||
1350 | CFI_DEFAULT_STACK | ||
1351 | 11: incl %gs:pda_irqcount | ||
1352 | movq %rsp,%rbp | ||
1353 | CFI_DEF_CFA_REGISTER rbp | ||
1354 | cmovzq %gs:pda_irqstackptr,%rsp | ||
1355 | pushq %rbp # backlink for old unwinder | ||
1356 | call xen_evtchn_do_upcall | ||
1357 | popq %rsp | ||
1358 | CFI_DEF_CFA_REGISTER rsp | ||
1359 | decl %gs:pda_irqcount | ||
1360 | jmp error_exit | ||
1361 | CFI_ENDPROC | ||
1362 | END(do_hypervisor_callback) | ||
1363 | |||
1364 | /* | ||
1365 | # Hypervisor uses this for application faults while it executes. | ||
1366 | # We get here for two reasons: | ||
1367 | # 1. Fault while reloading DS, ES, FS or GS | ||
1368 | # 2. Fault while executing IRET | ||
1369 | # Category 1 we do not need to fix up as Xen has already reloaded all segment | ||
1370 | # registers that could be reloaded and zeroed the others. | ||
1371 | # Category 2 we fix up by killing the current process. We cannot use the | ||
1372 | # normal Linux return path in this case because if we use the IRET hypercall | ||
1373 | # to pop the stack frame we end up in an infinite loop of failsafe callbacks. | ||
1374 | # We distinguish between categories by comparing each saved segment register | ||
1375 | # with its current contents: any discrepancy means we in category 1. | ||
1376 | */ | ||
1377 | ENTRY(xen_failsafe_callback) | ||
1378 | framesz = (RIP-0x30) /* workaround buggy gas */ | ||
1379 | _frame framesz | ||
1380 | CFI_REL_OFFSET rcx, 0 | ||
1381 | CFI_REL_OFFSET r11, 8 | ||
1382 | movw %ds,%cx | ||
1383 | cmpw %cx,0x10(%rsp) | ||
1384 | CFI_REMEMBER_STATE | ||
1385 | jne 1f | ||
1386 | movw %es,%cx | ||
1387 | cmpw %cx,0x18(%rsp) | ||
1388 | jne 1f | ||
1389 | movw %fs,%cx | ||
1390 | cmpw %cx,0x20(%rsp) | ||
1391 | jne 1f | ||
1392 | movw %gs,%cx | ||
1393 | cmpw %cx,0x28(%rsp) | ||
1394 | jne 1f | ||
1395 | /* All segments match their saved values => Category 2 (Bad IRET). */ | ||
1396 | movq (%rsp),%rcx | ||
1397 | CFI_RESTORE rcx | ||
1398 | movq 8(%rsp),%r11 | ||
1399 | CFI_RESTORE r11 | ||
1400 | addq $0x30,%rsp | ||
1401 | CFI_ADJUST_CFA_OFFSET -0x30 | ||
1402 | pushq $0 | ||
1403 | CFI_ADJUST_CFA_OFFSET 8 | ||
1404 | pushq %r11 | ||
1405 | CFI_ADJUST_CFA_OFFSET 8 | ||
1406 | pushq %rcx | ||
1407 | CFI_ADJUST_CFA_OFFSET 8 | ||
1408 | jmp general_protection | ||
1409 | CFI_RESTORE_STATE | ||
1410 | 1: /* Segment mismatch => Category 1 (Bad segment). Retry the IRET. */ | ||
1411 | movq (%rsp),%rcx | ||
1412 | CFI_RESTORE rcx | ||
1413 | movq 8(%rsp),%r11 | ||
1414 | CFI_RESTORE r11 | ||
1415 | addq $0x30,%rsp | ||
1416 | CFI_ADJUST_CFA_OFFSET -0x30 | ||
1417 | pushq $0 | ||
1418 | CFI_ADJUST_CFA_OFFSET 8 | ||
1419 | SAVE_ALL | ||
1420 | jmp error_exit | ||
1421 | CFI_ENDPROC | ||
1422 | END(xen_failsafe_callback) | ||
1423 | |||
1424 | #endif /* CONFIG_XEN */ | ||
diff --git a/arch/x86/kernel/genx2apic_uv_x.c b/arch/x86/kernel/genx2apic_uv_x.c index 711f11c30b06..3c3929340692 100644 --- a/arch/x86/kernel/genx2apic_uv_x.c +++ b/arch/x86/kernel/genx2apic_uv_x.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <asm/pgtable.h> | 24 | #include <asm/pgtable.h> |
25 | #include <asm/uv/uv_mmrs.h> | 25 | #include <asm/uv/uv_mmrs.h> |
26 | #include <asm/uv/uv_hub.h> | 26 | #include <asm/uv/uv_hub.h> |
27 | #include <asm/uv/bios.h> | ||
27 | 28 | ||
28 | DEFINE_PER_CPU(struct uv_hub_info_s, __uv_hub_info); | 29 | DEFINE_PER_CPU(struct uv_hub_info_s, __uv_hub_info); |
29 | EXPORT_PER_CPU_SYMBOL_GPL(__uv_hub_info); | 30 | EXPORT_PER_CPU_SYMBOL_GPL(__uv_hub_info); |
@@ -40,6 +41,9 @@ EXPORT_SYMBOL_GPL(uv_cpu_to_blade); | |||
40 | short uv_possible_blades; | 41 | short uv_possible_blades; |
41 | EXPORT_SYMBOL_GPL(uv_possible_blades); | 42 | EXPORT_SYMBOL_GPL(uv_possible_blades); |
42 | 43 | ||
44 | unsigned long sn_rtc_cycles_per_second; | ||
45 | EXPORT_SYMBOL(sn_rtc_cycles_per_second); | ||
46 | |||
43 | /* Start with all IRQs pointing to boot CPU. IRQ balancing will shift them. */ | 47 | /* Start with all IRQs pointing to boot CPU. IRQ balancing will shift them. */ |
44 | 48 | ||
45 | static cpumask_t uv_target_cpus(void) | 49 | static cpumask_t uv_target_cpus(void) |
@@ -272,6 +276,23 @@ static __init void map_mmioh_high(int max_pnode) | |||
272 | map_high("MMIOH", mmioh.s.base, shift, map_uc); | 276 | map_high("MMIOH", mmioh.s.base, shift, map_uc); |
273 | } | 277 | } |
274 | 278 | ||
279 | static __init void uv_rtc_init(void) | ||
280 | { | ||
281 | long status, ticks_per_sec, drift; | ||
282 | |||
283 | status = | ||
284 | x86_bios_freq_base(BIOS_FREQ_BASE_REALTIME_CLOCK, &ticks_per_sec, | ||
285 | &drift); | ||
286 | if (status != 0 || ticks_per_sec < 100000) { | ||
287 | printk(KERN_WARNING | ||
288 | "unable to determine platform RTC clock frequency, " | ||
289 | "guessing.\n"); | ||
290 | /* BIOS gives wrong value for clock freq. so guess */ | ||
291 | sn_rtc_cycles_per_second = 1000000000000UL / 30000UL; | ||
292 | } else | ||
293 | sn_rtc_cycles_per_second = ticks_per_sec; | ||
294 | } | ||
295 | |||
275 | static __init void uv_system_init(void) | 296 | static __init void uv_system_init(void) |
276 | { | 297 | { |
277 | union uvh_si_addr_map_config_u m_n_config; | 298 | union uvh_si_addr_map_config_u m_n_config; |
@@ -326,6 +347,8 @@ static __init void uv_system_init(void) | |||
326 | gnode_upper = (((unsigned long)node_id.s.node_id) & | 347 | gnode_upper = (((unsigned long)node_id.s.node_id) & |
327 | ~((1 << n_val) - 1)) << m_val; | 348 | ~((1 << n_val) - 1)) << m_val; |
328 | 349 | ||
350 | uv_rtc_init(); | ||
351 | |||
329 | for_each_present_cpu(cpu) { | 352 | for_each_present_cpu(cpu) { |
330 | nid = cpu_to_node(cpu); | 353 | nid = cpu_to_node(cpu); |
331 | pnode = uv_apicid_to_pnode(per_cpu(x86_cpu_to_apicid, cpu)); | 354 | pnode = uv_apicid_to_pnode(per_cpu(x86_cpu_to_apicid, cpu)); |
diff --git a/arch/x86/kernel/head64.c b/arch/x86/kernel/head64.c index c97819829146..1b318e903bf6 100644 --- a/arch/x86/kernel/head64.c +++ b/arch/x86/kernel/head64.c | |||
@@ -39,6 +39,13 @@ static struct x8664_pda *__cpu_pda[NR_CPUS] __initdata; | |||
39 | static struct x8664_pda *__cpu_pda[NR_CPUS] __read_mostly; | 39 | static struct x8664_pda *__cpu_pda[NR_CPUS] __read_mostly; |
40 | #endif | 40 | #endif |
41 | 41 | ||
42 | void __init x86_64_init_pda(void) | ||
43 | { | ||
44 | _cpu_pda = __cpu_pda; | ||
45 | cpu_pda(0) = &_boot_cpu_pda; | ||
46 | pda_init(0); | ||
47 | } | ||
48 | |||
42 | static void __init zap_identity_mappings(void) | 49 | static void __init zap_identity_mappings(void) |
43 | { | 50 | { |
44 | pgd_t *pgd = pgd_offset_k(0UL); | 51 | pgd_t *pgd = pgd_offset_k(0UL); |
@@ -102,9 +109,7 @@ void __init x86_64_start_kernel(char * real_mode_data) | |||
102 | 109 | ||
103 | early_printk("Kernel alive\n"); | 110 | early_printk("Kernel alive\n"); |
104 | 111 | ||
105 | _cpu_pda = __cpu_pda; | 112 | x86_64_init_pda(); |
106 | cpu_pda(0) = &_boot_cpu_pda; | ||
107 | pda_init(0); | ||
108 | 113 | ||
109 | early_printk("Kernel really alive\n"); | 114 | early_printk("Kernel really alive\n"); |
110 | 115 | ||
diff --git a/arch/x86/kernel/head_64.S b/arch/x86/kernel/head_64.S index b07ac7b217cb..db3280afe886 100644 --- a/arch/x86/kernel/head_64.S +++ b/arch/x86/kernel/head_64.S | |||
@@ -407,6 +407,7 @@ ENTRY(phys_base) | |||
407 | /* This must match the first entry in level2_kernel_pgt */ | 407 | /* This must match the first entry in level2_kernel_pgt */ |
408 | .quad 0x0000000000000000 | 408 | .quad 0x0000000000000000 |
409 | 409 | ||
410 | #include "../../x86/xen/xen-head.S" | ||
410 | 411 | ||
411 | .section .bss, "aw", @nobits | 412 | .section .bss, "aw", @nobits |
412 | .align L1_CACHE_BYTES | 413 | .align L1_CACHE_BYTES |
diff --git a/arch/x86/kernel/io_apic_32.c b/arch/x86/kernel/io_apic_32.c index 558abf4c796a..de9aa0e3a9c5 100644 --- a/arch/x86/kernel/io_apic_32.c +++ b/arch/x86/kernel/io_apic_32.c | |||
@@ -756,7 +756,7 @@ void send_IPI_self(int vector) | |||
756 | /* | 756 | /* |
757 | * Send the IPI. The write to APIC_ICR fires this off. | 757 | * Send the IPI. The write to APIC_ICR fires this off. |
758 | */ | 758 | */ |
759 | apic_write_around(APIC_ICR, cfg); | 759 | apic_write(APIC_ICR, cfg); |
760 | } | 760 | } |
761 | #endif /* !CONFIG_SMP */ | 761 | #endif /* !CONFIG_SMP */ |
762 | 762 | ||
@@ -2030,7 +2030,7 @@ static void mask_lapic_irq(unsigned int irq) | |||
2030 | unsigned long v; | 2030 | unsigned long v; |
2031 | 2031 | ||
2032 | v = apic_read(APIC_LVT0); | 2032 | v = apic_read(APIC_LVT0); |
2033 | apic_write_around(APIC_LVT0, v | APIC_LVT_MASKED); | 2033 | apic_write(APIC_LVT0, v | APIC_LVT_MASKED); |
2034 | } | 2034 | } |
2035 | 2035 | ||
2036 | static void unmask_lapic_irq(unsigned int irq) | 2036 | static void unmask_lapic_irq(unsigned int irq) |
@@ -2038,7 +2038,7 @@ static void unmask_lapic_irq(unsigned int irq) | |||
2038 | unsigned long v; | 2038 | unsigned long v; |
2039 | 2039 | ||
2040 | v = apic_read(APIC_LVT0); | 2040 | v = apic_read(APIC_LVT0); |
2041 | apic_write_around(APIC_LVT0, v & ~APIC_LVT_MASKED); | 2041 | apic_write(APIC_LVT0, v & ~APIC_LVT_MASKED); |
2042 | } | 2042 | } |
2043 | 2043 | ||
2044 | static struct irq_chip lapic_chip __read_mostly = { | 2044 | static struct irq_chip lapic_chip __read_mostly = { |
@@ -2168,7 +2168,7 @@ static inline void __init check_timer(void) | |||
2168 | * The AEOI mode will finish them in the 8259A | 2168 | * The AEOI mode will finish them in the 8259A |
2169 | * automatically. | 2169 | * automatically. |
2170 | */ | 2170 | */ |
2171 | apic_write_around(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_EXTINT); | 2171 | apic_write(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_EXTINT); |
2172 | init_8259A(1); | 2172 | init_8259A(1); |
2173 | timer_ack = (nmi_watchdog == NMI_IO_APIC && !APIC_INTEGRATED(ver)); | 2173 | timer_ack = (nmi_watchdog == NMI_IO_APIC && !APIC_INTEGRATED(ver)); |
2174 | 2174 | ||
@@ -2177,8 +2177,9 @@ static inline void __init check_timer(void) | |||
2177 | pin2 = ioapic_i8259.pin; | 2177 | pin2 = ioapic_i8259.pin; |
2178 | apic2 = ioapic_i8259.apic; | 2178 | apic2 = ioapic_i8259.apic; |
2179 | 2179 | ||
2180 | printk(KERN_INFO "..TIMER: vector=0x%02X apic1=%d pin1=%d apic2=%d pin2=%d\n", | 2180 | apic_printk(APIC_QUIET, KERN_INFO "..TIMER: vector=0x%02X " |
2181 | vector, apic1, pin1, apic2, pin2); | 2181 | "apic1=%d pin1=%d apic2=%d pin2=%d\n", |
2182 | vector, apic1, pin1, apic2, pin2); | ||
2182 | 2183 | ||
2183 | /* | 2184 | /* |
2184 | * Some BIOS writers are clueless and report the ExtINTA | 2185 | * Some BIOS writers are clueless and report the ExtINTA |
@@ -2216,12 +2217,13 @@ static inline void __init check_timer(void) | |||
2216 | } | 2217 | } |
2217 | clear_IO_APIC_pin(apic1, pin1); | 2218 | clear_IO_APIC_pin(apic1, pin1); |
2218 | if (!no_pin1) | 2219 | if (!no_pin1) |
2219 | printk(KERN_ERR "..MP-BIOS bug: " | 2220 | apic_printk(APIC_QUIET, KERN_ERR "..MP-BIOS bug: " |
2220 | "8254 timer not connected to IO-APIC\n"); | 2221 | "8254 timer not connected to IO-APIC\n"); |
2221 | 2222 | ||
2222 | printk(KERN_INFO "...trying to set up timer (IRQ0) " | 2223 | apic_printk(APIC_QUIET, KERN_INFO "...trying to set up timer " |
2223 | "through the 8259A ... "); | 2224 | "(IRQ0) through the 8259A ...\n"); |
2224 | printk("\n..... (found pin %d) ...", pin2); | 2225 | apic_printk(APIC_QUIET, KERN_INFO |
2226 | "..... (found apic %d pin %d) ...\n", apic2, pin2); | ||
2225 | /* | 2227 | /* |
2226 | * legacy devices should be connected to IO APIC #0 | 2228 | * legacy devices should be connected to IO APIC #0 |
2227 | */ | 2229 | */ |
@@ -2230,7 +2232,7 @@ static inline void __init check_timer(void) | |||
2230 | unmask_IO_APIC_irq(0); | 2232 | unmask_IO_APIC_irq(0); |
2231 | enable_8259A_irq(0); | 2233 | enable_8259A_irq(0); |
2232 | if (timer_irq_works()) { | 2234 | if (timer_irq_works()) { |
2233 | printk("works.\n"); | 2235 | apic_printk(APIC_QUIET, KERN_INFO "....... works.\n"); |
2234 | timer_through_8259 = 1; | 2236 | timer_through_8259 = 1; |
2235 | if (nmi_watchdog == NMI_IO_APIC) { | 2237 | if (nmi_watchdog == NMI_IO_APIC) { |
2236 | disable_8259A_irq(0); | 2238 | disable_8259A_irq(0); |
@@ -2244,44 +2246,47 @@ static inline void __init check_timer(void) | |||
2244 | */ | 2246 | */ |
2245 | disable_8259A_irq(0); | 2247 | disable_8259A_irq(0); |
2246 | clear_IO_APIC_pin(apic2, pin2); | 2248 | clear_IO_APIC_pin(apic2, pin2); |
2247 | printk(" failed.\n"); | 2249 | apic_printk(APIC_QUIET, KERN_INFO "....... failed.\n"); |
2248 | } | 2250 | } |
2249 | 2251 | ||
2250 | if (nmi_watchdog == NMI_IO_APIC) { | 2252 | if (nmi_watchdog == NMI_IO_APIC) { |
2251 | printk(KERN_WARNING "timer doesn't work through the IO-APIC - disabling NMI Watchdog!\n"); | 2253 | apic_printk(APIC_QUIET, KERN_WARNING "timer doesn't work " |
2254 | "through the IO-APIC - disabling NMI Watchdog!\n"); | ||
2252 | nmi_watchdog = NMI_NONE; | 2255 | nmi_watchdog = NMI_NONE; |
2253 | } | 2256 | } |
2254 | timer_ack = 0; | 2257 | timer_ack = 0; |
2255 | 2258 | ||
2256 | printk(KERN_INFO "...trying to set up timer as Virtual Wire IRQ..."); | 2259 | apic_printk(APIC_QUIET, KERN_INFO |
2260 | "...trying to set up timer as Virtual Wire IRQ...\n"); | ||
2257 | 2261 | ||
2258 | lapic_register_intr(0, vector); | 2262 | lapic_register_intr(0, vector); |
2259 | apic_write_around(APIC_LVT0, APIC_DM_FIXED | vector); /* Fixed mode */ | 2263 | apic_write(APIC_LVT0, APIC_DM_FIXED | vector); /* Fixed mode */ |
2260 | enable_8259A_irq(0); | 2264 | enable_8259A_irq(0); |
2261 | 2265 | ||
2262 | if (timer_irq_works()) { | 2266 | if (timer_irq_works()) { |
2263 | printk(" works.\n"); | 2267 | apic_printk(APIC_QUIET, KERN_INFO "..... works.\n"); |
2264 | goto out; | 2268 | goto out; |
2265 | } | 2269 | } |
2266 | disable_8259A_irq(0); | 2270 | disable_8259A_irq(0); |
2267 | apic_write_around(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_FIXED | vector); | 2271 | apic_write(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_FIXED | vector); |
2268 | printk(" failed.\n"); | 2272 | apic_printk(APIC_QUIET, KERN_INFO "..... failed.\n"); |
2269 | 2273 | ||
2270 | printk(KERN_INFO "...trying to set up timer as ExtINT IRQ..."); | 2274 | apic_printk(APIC_QUIET, KERN_INFO |
2275 | "...trying to set up timer as ExtINT IRQ...\n"); | ||
2271 | 2276 | ||
2272 | init_8259A(0); | 2277 | init_8259A(0); |
2273 | make_8259A_irq(0); | 2278 | make_8259A_irq(0); |
2274 | apic_write_around(APIC_LVT0, APIC_DM_EXTINT); | 2279 | apic_write(APIC_LVT0, APIC_DM_EXTINT); |
2275 | 2280 | ||
2276 | unlock_ExtINT_logic(); | 2281 | unlock_ExtINT_logic(); |
2277 | 2282 | ||
2278 | if (timer_irq_works()) { | 2283 | if (timer_irq_works()) { |
2279 | printk(" works.\n"); | 2284 | apic_printk(APIC_QUIET, KERN_INFO "..... works.\n"); |
2280 | goto out; | 2285 | goto out; |
2281 | } | 2286 | } |
2282 | printk(" failed :(.\n"); | 2287 | apic_printk(APIC_QUIET, KERN_INFO "..... failed :(.\n"); |
2283 | panic("IO-APIC + timer doesn't work! Boot with apic=debug and send a " | 2288 | panic("IO-APIC + timer doesn't work! Boot with apic=debug and send a " |
2284 | "report. Then try booting with the 'noapic' option"); | 2289 | "report. Then try booting with the 'noapic' option.\n"); |
2285 | out: | 2290 | out: |
2286 | local_irq_restore(flags); | 2291 | local_irq_restore(flags); |
2287 | } | 2292 | } |
diff --git a/arch/x86/kernel/io_apic_64.c b/arch/x86/kernel/io_apic_64.c index 6510cde36b35..64a46affd858 100644 --- a/arch/x86/kernel/io_apic_64.c +++ b/arch/x86/kernel/io_apic_64.c | |||
@@ -45,6 +45,7 @@ | |||
45 | #include <asm/proto.h> | 45 | #include <asm/proto.h> |
46 | #include <asm/acpi.h> | 46 | #include <asm/acpi.h> |
47 | #include <asm/dma.h> | 47 | #include <asm/dma.h> |
48 | #include <asm/i8259.h> | ||
48 | #include <asm/nmi.h> | 49 | #include <asm/nmi.h> |
49 | #include <asm/msidef.h> | 50 | #include <asm/msidef.h> |
50 | #include <asm/hypertransport.h> | 51 | #include <asm/hypertransport.h> |
@@ -1696,8 +1697,9 @@ static inline void __init check_timer(void) | |||
1696 | pin2 = ioapic_i8259.pin; | 1697 | pin2 = ioapic_i8259.pin; |
1697 | apic2 = ioapic_i8259.apic; | 1698 | apic2 = ioapic_i8259.apic; |
1698 | 1699 | ||
1699 | apic_printk(APIC_VERBOSE,KERN_INFO "..TIMER: vector=0x%02X apic1=%d pin1=%d apic2=%d pin2=%d\n", | 1700 | apic_printk(APIC_QUIET, KERN_INFO "..TIMER: vector=0x%02X " |
1700 | cfg->vector, apic1, pin1, apic2, pin2); | 1701 | "apic1=%d pin1=%d apic2=%d pin2=%d\n", |
1702 | cfg->vector, apic1, pin1, apic2, pin2); | ||
1701 | 1703 | ||
1702 | /* | 1704 | /* |
1703 | * Some BIOS writers are clueless and report the ExtINTA | 1705 | * Some BIOS writers are clueless and report the ExtINTA |
@@ -1735,14 +1737,13 @@ static inline void __init check_timer(void) | |||
1735 | } | 1737 | } |
1736 | clear_IO_APIC_pin(apic1, pin1); | 1738 | clear_IO_APIC_pin(apic1, pin1); |
1737 | if (!no_pin1) | 1739 | if (!no_pin1) |
1738 | apic_printk(APIC_QUIET,KERN_ERR "..MP-BIOS bug: " | 1740 | apic_printk(APIC_QUIET, KERN_ERR "..MP-BIOS bug: " |
1739 | "8254 timer not connected to IO-APIC\n"); | 1741 | "8254 timer not connected to IO-APIC\n"); |
1740 | 1742 | ||
1741 | apic_printk(APIC_VERBOSE,KERN_INFO | 1743 | apic_printk(APIC_QUIET, KERN_INFO "...trying to set up timer " |
1742 | "...trying to set up timer (IRQ0) " | 1744 | "(IRQ0) through the 8259A ...\n"); |
1743 | "through the 8259A ... "); | 1745 | apic_printk(APIC_QUIET, KERN_INFO |
1744 | apic_printk(APIC_VERBOSE,"\n..... (found apic %d pin %d) ...", | 1746 | "..... (found apic %d pin %d) ...\n", apic2, pin2); |
1745 | apic2, pin2); | ||
1746 | /* | 1747 | /* |
1747 | * legacy devices should be connected to IO APIC #0 | 1748 | * legacy devices should be connected to IO APIC #0 |
1748 | */ | 1749 | */ |
@@ -1751,7 +1752,7 @@ static inline void __init check_timer(void) | |||
1751 | unmask_IO_APIC_irq(0); | 1752 | unmask_IO_APIC_irq(0); |
1752 | enable_8259A_irq(0); | 1753 | enable_8259A_irq(0); |
1753 | if (timer_irq_works()) { | 1754 | if (timer_irq_works()) { |
1754 | apic_printk(APIC_VERBOSE," works.\n"); | 1755 | apic_printk(APIC_QUIET, KERN_INFO "....... works.\n"); |
1755 | timer_through_8259 = 1; | 1756 | timer_through_8259 = 1; |
1756 | if (nmi_watchdog == NMI_IO_APIC) { | 1757 | if (nmi_watchdog == NMI_IO_APIC) { |
1757 | disable_8259A_irq(0); | 1758 | disable_8259A_irq(0); |
@@ -1765,29 +1766,32 @@ static inline void __init check_timer(void) | |||
1765 | */ | 1766 | */ |
1766 | disable_8259A_irq(0); | 1767 | disable_8259A_irq(0); |
1767 | clear_IO_APIC_pin(apic2, pin2); | 1768 | clear_IO_APIC_pin(apic2, pin2); |
1768 | apic_printk(APIC_VERBOSE," failed.\n"); | 1769 | apic_printk(APIC_QUIET, KERN_INFO "....... failed.\n"); |
1769 | } | 1770 | } |
1770 | 1771 | ||
1771 | if (nmi_watchdog == NMI_IO_APIC) { | 1772 | if (nmi_watchdog == NMI_IO_APIC) { |
1772 | printk(KERN_WARNING "timer doesn't work through the IO-APIC - disabling NMI Watchdog!\n"); | 1773 | apic_printk(APIC_QUIET, KERN_WARNING "timer doesn't work " |
1774 | "through the IO-APIC - disabling NMI Watchdog!\n"); | ||
1773 | nmi_watchdog = NMI_NONE; | 1775 | nmi_watchdog = NMI_NONE; |
1774 | } | 1776 | } |
1775 | 1777 | ||
1776 | apic_printk(APIC_VERBOSE, KERN_INFO "...trying to set up timer as Virtual Wire IRQ..."); | 1778 | apic_printk(APIC_QUIET, KERN_INFO |
1779 | "...trying to set up timer as Virtual Wire IRQ...\n"); | ||
1777 | 1780 | ||
1778 | lapic_register_intr(0); | 1781 | lapic_register_intr(0); |
1779 | apic_write(APIC_LVT0, APIC_DM_FIXED | cfg->vector); /* Fixed mode */ | 1782 | apic_write(APIC_LVT0, APIC_DM_FIXED | cfg->vector); /* Fixed mode */ |
1780 | enable_8259A_irq(0); | 1783 | enable_8259A_irq(0); |
1781 | 1784 | ||
1782 | if (timer_irq_works()) { | 1785 | if (timer_irq_works()) { |
1783 | apic_printk(APIC_VERBOSE," works.\n"); | 1786 | apic_printk(APIC_QUIET, KERN_INFO "..... works.\n"); |
1784 | goto out; | 1787 | goto out; |
1785 | } | 1788 | } |
1786 | disable_8259A_irq(0); | 1789 | disable_8259A_irq(0); |
1787 | apic_write(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_FIXED | cfg->vector); | 1790 | apic_write(APIC_LVT0, APIC_LVT_MASKED | APIC_DM_FIXED | cfg->vector); |
1788 | apic_printk(APIC_VERBOSE," failed.\n"); | 1791 | apic_printk(APIC_QUIET, KERN_INFO "..... failed.\n"); |
1789 | 1792 | ||
1790 | apic_printk(APIC_VERBOSE, KERN_INFO "...trying to set up timer as ExtINT IRQ..."); | 1793 | apic_printk(APIC_QUIET, KERN_INFO |
1794 | "...trying to set up timer as ExtINT IRQ...\n"); | ||
1791 | 1795 | ||
1792 | init_8259A(0); | 1796 | init_8259A(0); |
1793 | make_8259A_irq(0); | 1797 | make_8259A_irq(0); |
@@ -1796,11 +1800,12 @@ static inline void __init check_timer(void) | |||
1796 | unlock_ExtINT_logic(); | 1800 | unlock_ExtINT_logic(); |
1797 | 1801 | ||
1798 | if (timer_irq_works()) { | 1802 | if (timer_irq_works()) { |
1799 | apic_printk(APIC_VERBOSE," works.\n"); | 1803 | apic_printk(APIC_QUIET, KERN_INFO "..... works.\n"); |
1800 | goto out; | 1804 | goto out; |
1801 | } | 1805 | } |
1802 | apic_printk(APIC_VERBOSE," failed :(.\n"); | 1806 | apic_printk(APIC_QUIET, KERN_INFO "..... failed :(.\n"); |
1803 | panic("IO-APIC + timer doesn't work! Try using the 'noapic' kernel parameter\n"); | 1807 | panic("IO-APIC + timer doesn't work! Boot with apic=debug and send a " |
1808 | "report. Then try booting with the 'noapic' option.\n"); | ||
1804 | out: | 1809 | out: |
1805 | local_irq_restore(flags); | 1810 | local_irq_restore(flags); |
1806 | } | 1811 | } |
diff --git a/arch/x86/kernel/io_delay.c b/arch/x86/kernel/io_delay.c index 5921e5f0a640..1c3a66a67f83 100644 --- a/arch/x86/kernel/io_delay.c +++ b/arch/x86/kernel/io_delay.c | |||
@@ -103,6 +103,9 @@ void __init io_delay_init(void) | |||
103 | 103 | ||
104 | static int __init io_delay_param(char *s) | 104 | static int __init io_delay_param(char *s) |
105 | { | 105 | { |
106 | if (!s) | ||
107 | return -EINVAL; | ||
108 | |||
106 | if (!strcmp(s, "0x80")) | 109 | if (!strcmp(s, "0x80")) |
107 | io_delay_type = CONFIG_IO_DELAY_TYPE_0X80; | 110 | io_delay_type = CONFIG_IO_DELAY_TYPE_0X80; |
108 | else if (!strcmp(s, "0xed")) | 111 | else if (!strcmp(s, "0xed")) |
diff --git a/arch/x86/kernel/ipi.c b/arch/x86/kernel/ipi.c index 9d98cda39ad9..3f7537b669d3 100644 --- a/arch/x86/kernel/ipi.c +++ b/arch/x86/kernel/ipi.c | |||
@@ -70,7 +70,7 @@ void __send_IPI_shortcut(unsigned int shortcut, int vector) | |||
70 | /* | 70 | /* |
71 | * Send the IPI. The write to APIC_ICR fires this off. | 71 | * Send the IPI. The write to APIC_ICR fires this off. |
72 | */ | 72 | */ |
73 | apic_write_around(APIC_ICR, cfg); | 73 | apic_write(APIC_ICR, cfg); |
74 | } | 74 | } |
75 | 75 | ||
76 | void send_IPI_self(int vector) | 76 | void send_IPI_self(int vector) |
@@ -98,7 +98,7 @@ static inline void __send_IPI_dest_field(unsigned long mask, int vector) | |||
98 | * prepare target chip field | 98 | * prepare target chip field |
99 | */ | 99 | */ |
100 | cfg = __prepare_ICR2(mask); | 100 | cfg = __prepare_ICR2(mask); |
101 | apic_write_around(APIC_ICR2, cfg); | 101 | apic_write(APIC_ICR2, cfg); |
102 | 102 | ||
103 | /* | 103 | /* |
104 | * program the ICR | 104 | * program the ICR |
@@ -108,7 +108,7 @@ static inline void __send_IPI_dest_field(unsigned long mask, int vector) | |||
108 | /* | 108 | /* |
109 | * Send the IPI. The write to APIC_ICR fires this off. | 109 | * Send the IPI. The write to APIC_ICR fires this off. |
110 | */ | 110 | */ |
111 | apic_write_around(APIC_ICR, cfg); | 111 | apic_write(APIC_ICR, cfg); |
112 | } | 112 | } |
113 | 113 | ||
114 | /* | 114 | /* |
diff --git a/arch/x86/kernel/irq_32.c b/arch/x86/kernel/irq_32.c index 47a6f6f12478..1cf8c1fcc088 100644 --- a/arch/x86/kernel/irq_32.c +++ b/arch/x86/kernel/irq_32.c | |||
@@ -83,11 +83,8 @@ union irq_ctx { | |||
83 | static union irq_ctx *hardirq_ctx[NR_CPUS] __read_mostly; | 83 | static union irq_ctx *hardirq_ctx[NR_CPUS] __read_mostly; |
84 | static union irq_ctx *softirq_ctx[NR_CPUS] __read_mostly; | 84 | static union irq_ctx *softirq_ctx[NR_CPUS] __read_mostly; |
85 | 85 | ||
86 | static char softirq_stack[NR_CPUS * THREAD_SIZE] | 86 | static char softirq_stack[NR_CPUS * THREAD_SIZE] __page_aligned_bss; |
87 | __attribute__((__section__(".bss.page_aligned"))); | 87 | static char hardirq_stack[NR_CPUS * THREAD_SIZE] __page_aligned_bss; |
88 | |||
89 | static char hardirq_stack[NR_CPUS * THREAD_SIZE] | ||
90 | __attribute__((__section__(".bss.page_aligned"))); | ||
91 | 88 | ||
92 | static void call_on_stack(void *func, void *stack) | 89 | static void call_on_stack(void *func, void *stack) |
93 | { | 90 | { |
diff --git a/arch/x86/kernel/kdebugfs.c b/arch/x86/kernel/kdebugfs.c index c03205991718..f2d43bc75514 100644 --- a/arch/x86/kernel/kdebugfs.c +++ b/arch/x86/kernel/kdebugfs.c | |||
@@ -12,9 +12,13 @@ | |||
12 | #include <linux/init.h> | 12 | #include <linux/init.h> |
13 | #include <linux/io.h> | 13 | #include <linux/io.h> |
14 | #include <linux/mm.h> | 14 | #include <linux/mm.h> |
15 | #include <linux/module.h> | ||
15 | 16 | ||
16 | #include <asm/setup.h> | 17 | #include <asm/setup.h> |
17 | 18 | ||
19 | struct dentry *arch_debugfs_dir; | ||
20 | EXPORT_SYMBOL(arch_debugfs_dir); | ||
21 | |||
18 | #ifdef CONFIG_DEBUG_BOOT_PARAMS | 22 | #ifdef CONFIG_DEBUG_BOOT_PARAMS |
19 | struct setup_data_node { | 23 | struct setup_data_node { |
20 | u64 paddr; | 24 | u64 paddr; |
@@ -209,6 +213,10 @@ static int __init arch_kdebugfs_init(void) | |||
209 | { | 213 | { |
210 | int error = 0; | 214 | int error = 0; |
211 | 215 | ||
216 | arch_debugfs_dir = debugfs_create_dir("x86", NULL); | ||
217 | if (!arch_debugfs_dir) | ||
218 | return -ENOMEM; | ||
219 | |||
212 | #ifdef CONFIG_DEBUG_BOOT_PARAMS | 220 | #ifdef CONFIG_DEBUG_BOOT_PARAMS |
213 | error = boot_params_kdebugfs_init(); | 221 | error = boot_params_kdebugfs_init(); |
214 | #endif | 222 | #endif |
diff --git a/arch/x86/kernel/kprobes.c b/arch/x86/kernel/kprobes.c index b8c6743a13da..43c019f85f0d 100644 --- a/arch/x86/kernel/kprobes.c +++ b/arch/x86/kernel/kprobes.c | |||
@@ -860,7 +860,6 @@ static int __kprobes post_kprobe_handler(struct pt_regs *regs) | |||
860 | 860 | ||
861 | resume_execution(cur, regs, kcb); | 861 | resume_execution(cur, regs, kcb); |
862 | regs->flags |= kcb->kprobe_saved_flags; | 862 | regs->flags |= kcb->kprobe_saved_flags; |
863 | trace_hardirqs_fixup_flags(regs->flags); | ||
864 | 863 | ||
865 | if ((kcb->kprobe_status != KPROBE_REENTER) && cur->post_handler) { | 864 | if ((kcb->kprobe_status != KPROBE_REENTER) && cur->post_handler) { |
866 | kcb->kprobe_status = KPROBE_HIT_SSDONE; | 865 | kcb->kprobe_status = KPROBE_HIT_SSDONE; |
diff --git a/arch/x86/kernel/microcode.c b/arch/x86/kernel/microcode.c index 56b933119a04..fc4790638b69 100644 --- a/arch/x86/kernel/microcode.c +++ b/arch/x86/kernel/microcode.c | |||
@@ -644,7 +644,9 @@ static void microcode_fini_cpu(int cpu) | |||
644 | mutex_unlock(µcode_mutex); | 644 | mutex_unlock(µcode_mutex); |
645 | } | 645 | } |
646 | 646 | ||
647 | static ssize_t reload_store(struct sys_device *dev, const char *buf, size_t sz) | 647 | static ssize_t reload_store(struct sys_device *dev, |
648 | struct sysdev_attribute *attr, | ||
649 | const char *buf, size_t sz) | ||
648 | { | 650 | { |
649 | struct ucode_cpu_info *uci = ucode_cpu_info + dev->id; | 651 | struct ucode_cpu_info *uci = ucode_cpu_info + dev->id; |
650 | char *end; | 652 | char *end; |
@@ -674,14 +676,16 @@ static ssize_t reload_store(struct sys_device *dev, const char *buf, size_t sz) | |||
674 | return sz; | 676 | return sz; |
675 | } | 677 | } |
676 | 678 | ||
677 | static ssize_t version_show(struct sys_device *dev, char *buf) | 679 | static ssize_t version_show(struct sys_device *dev, |
680 | struct sysdev_attribute *attr, char *buf) | ||
678 | { | 681 | { |
679 | struct ucode_cpu_info *uci = ucode_cpu_info + dev->id; | 682 | struct ucode_cpu_info *uci = ucode_cpu_info + dev->id; |
680 | 683 | ||
681 | return sprintf(buf, "0x%x\n", uci->rev); | 684 | return sprintf(buf, "0x%x\n", uci->rev); |
682 | } | 685 | } |
683 | 686 | ||
684 | static ssize_t pf_show(struct sys_device *dev, char *buf) | 687 | static ssize_t pf_show(struct sys_device *dev, |
688 | struct sysdev_attribute *attr, char *buf) | ||
685 | { | 689 | { |
686 | struct ucode_cpu_info *uci = ucode_cpu_info + dev->id; | 690 | struct ucode_cpu_info *uci = ucode_cpu_info + dev->id; |
687 | 691 | ||
diff --git a/arch/x86/kernel/module_64.c b/arch/x86/kernel/module_64.c index a888e67f5874..0e867676b5a5 100644 --- a/arch/x86/kernel/module_64.c +++ b/arch/x86/kernel/module_64.c | |||
@@ -150,7 +150,8 @@ int module_finalize(const Elf_Ehdr *hdr, | |||
150 | const Elf_Shdr *sechdrs, | 150 | const Elf_Shdr *sechdrs, |
151 | struct module *me) | 151 | struct module *me) |
152 | { | 152 | { |
153 | const Elf_Shdr *s, *text = NULL, *alt = NULL, *locks = NULL; | 153 | const Elf_Shdr *s, *text = NULL, *alt = NULL, *locks = NULL, |
154 | *para = NULL; | ||
154 | char *secstrings = (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset; | 155 | char *secstrings = (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset; |
155 | 156 | ||
156 | for (s = sechdrs; s < sechdrs + hdr->e_shnum; s++) { | 157 | for (s = sechdrs; s < sechdrs + hdr->e_shnum; s++) { |
@@ -160,6 +161,8 @@ int module_finalize(const Elf_Ehdr *hdr, | |||
160 | alt = s; | 161 | alt = s; |
161 | if (!strcmp(".smp_locks", secstrings + s->sh_name)) | 162 | if (!strcmp(".smp_locks", secstrings + s->sh_name)) |
162 | locks= s; | 163 | locks= s; |
164 | if (!strcmp(".parainstructions", secstrings + s->sh_name)) | ||
165 | para = s; | ||
163 | } | 166 | } |
164 | 167 | ||
165 | if (alt) { | 168 | if (alt) { |
@@ -175,6 +178,11 @@ int module_finalize(const Elf_Ehdr *hdr, | |||
175 | tseg, tseg + text->sh_size); | 178 | tseg, tseg + text->sh_size); |
176 | } | 179 | } |
177 | 180 | ||
181 | if (para) { | ||
182 | void *pseg = (void *)para->sh_addr; | ||
183 | apply_paravirt(pseg, pseg + para->sh_size); | ||
184 | } | ||
185 | |||
178 | return module_bug_finalize(hdr, sechdrs, me); | 186 | return module_bug_finalize(hdr, sechdrs, me); |
179 | } | 187 | } |
180 | 188 | ||
diff --git a/arch/x86/kernel/mpparse.c b/arch/x86/kernel/mpparse.c index 3b25e49380c6..6ae005ccaed8 100644 --- a/arch/x86/kernel/mpparse.c +++ b/arch/x86/kernel/mpparse.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <asm/bios_ebda.h> | 27 | #include <asm/bios_ebda.h> |
28 | #include <asm/e820.h> | 28 | #include <asm/e820.h> |
29 | #include <asm/trampoline.h> | 29 | #include <asm/trampoline.h> |
30 | #include <asm/setup.h> | ||
30 | 31 | ||
31 | #include <mach_apic.h> | 32 | #include <mach_apic.h> |
32 | #ifdef CONFIG_X86_32 | 33 | #ifdef CONFIG_X86_32 |
@@ -48,76 +49,6 @@ static int __init mpf_checksum(unsigned char *mp, int len) | |||
48 | return sum & 0xFF; | 49 | return sum & 0xFF; |
49 | } | 50 | } |
50 | 51 | ||
51 | #ifdef CONFIG_X86_NUMAQ | ||
52 | int found_numaq; | ||
53 | /* | ||
54 | * Have to match translation table entries to main table entries by counter | ||
55 | * hence the mpc_record variable .... can't see a less disgusting way of | ||
56 | * doing this .... | ||
57 | */ | ||
58 | struct mpc_config_translation { | ||
59 | unsigned char mpc_type; | ||
60 | unsigned char trans_len; | ||
61 | unsigned char trans_type; | ||
62 | unsigned char trans_quad; | ||
63 | unsigned char trans_global; | ||
64 | unsigned char trans_local; | ||
65 | unsigned short trans_reserved; | ||
66 | }; | ||
67 | |||
68 | |||
69 | static int mpc_record; | ||
70 | static struct mpc_config_translation *translation_table[MAX_MPC_ENTRY] | ||
71 | __cpuinitdata; | ||
72 | |||
73 | static inline int generate_logical_apicid(int quad, int phys_apicid) | ||
74 | { | ||
75 | return (quad << 4) + (phys_apicid ? phys_apicid << 1 : 1); | ||
76 | } | ||
77 | |||
78 | |||
79 | static inline int mpc_apic_id(struct mpc_config_processor *m, | ||
80 | struct mpc_config_translation *translation_record) | ||
81 | { | ||
82 | int quad = translation_record->trans_quad; | ||
83 | int logical_apicid = generate_logical_apicid(quad, m->mpc_apicid); | ||
84 | |||
85 | printk(KERN_DEBUG "Processor #%d %u:%u APIC version %d (quad %d, apic %d)\n", | ||
86 | m->mpc_apicid, | ||
87 | (m->mpc_cpufeature & CPU_FAMILY_MASK) >> 8, | ||
88 | (m->mpc_cpufeature & CPU_MODEL_MASK) >> 4, | ||
89 | m->mpc_apicver, quad, logical_apicid); | ||
90 | return logical_apicid; | ||
91 | } | ||
92 | |||
93 | int mp_bus_id_to_node[MAX_MP_BUSSES]; | ||
94 | |||
95 | int mp_bus_id_to_local[MAX_MP_BUSSES]; | ||
96 | |||
97 | static void mpc_oem_bus_info(struct mpc_config_bus *m, char *name, | ||
98 | struct mpc_config_translation *translation) | ||
99 | { | ||
100 | int quad = translation->trans_quad; | ||
101 | int local = translation->trans_local; | ||
102 | |||
103 | mp_bus_id_to_node[m->mpc_busid] = quad; | ||
104 | mp_bus_id_to_local[m->mpc_busid] = local; | ||
105 | printk(KERN_INFO "Bus #%d is %s (node %d)\n", | ||
106 | m->mpc_busid, name, quad); | ||
107 | } | ||
108 | |||
109 | int quad_local_to_mp_bus_id [NR_CPUS/4][4]; | ||
110 | static void mpc_oem_pci_bus(struct mpc_config_bus *m, | ||
111 | struct mpc_config_translation *translation) | ||
112 | { | ||
113 | int quad = translation->trans_quad; | ||
114 | int local = translation->trans_local; | ||
115 | |||
116 | quad_local_to_mp_bus_id[quad][local] = m->mpc_busid; | ||
117 | } | ||
118 | |||
119 | #endif | ||
120 | |||
121 | static void __cpuinit MP_processor_info(struct mpc_config_processor *m) | 52 | static void __cpuinit MP_processor_info(struct mpc_config_processor *m) |
122 | { | 53 | { |
123 | int apicid; | 54 | int apicid; |
@@ -127,14 +58,12 @@ static void __cpuinit MP_processor_info(struct mpc_config_processor *m) | |||
127 | disabled_cpus++; | 58 | disabled_cpus++; |
128 | return; | 59 | return; |
129 | } | 60 | } |
130 | #ifdef CONFIG_X86_NUMAQ | 61 | |
131 | if (found_numaq) | 62 | if (x86_quirks->mpc_apic_id) |
132 | apicid = mpc_apic_id(m, translation_table[mpc_record]); | 63 | apicid = x86_quirks->mpc_apic_id(m); |
133 | else | 64 | else |
134 | apicid = m->mpc_apicid; | 65 | apicid = m->mpc_apicid; |
135 | #else | 66 | |
136 | apicid = m->mpc_apicid; | ||
137 | #endif | ||
138 | if (m->mpc_cpuflag & CPU_BOOTPROCESSOR) { | 67 | if (m->mpc_cpuflag & CPU_BOOTPROCESSOR) { |
139 | bootup_cpu = " (Bootup-CPU)"; | 68 | bootup_cpu = " (Bootup-CPU)"; |
140 | boot_cpu_physical_apicid = m->mpc_apicid; | 69 | boot_cpu_physical_apicid = m->mpc_apicid; |
@@ -151,12 +80,10 @@ static void __init MP_bus_info(struct mpc_config_bus *m) | |||
151 | memcpy(str, m->mpc_bustype, 6); | 80 | memcpy(str, m->mpc_bustype, 6); |
152 | str[6] = 0; | 81 | str[6] = 0; |
153 | 82 | ||
154 | #ifdef CONFIG_X86_NUMAQ | 83 | if (x86_quirks->mpc_oem_bus_info) |
155 | if (found_numaq) | 84 | x86_quirks->mpc_oem_bus_info(m, str); |
156 | mpc_oem_bus_info(m, str, translation_table[mpc_record]); | 85 | else |
157 | #else | 86 | printk(KERN_INFO "Bus #%d is %s\n", m->mpc_busid, str); |
158 | printk(KERN_INFO "Bus #%d is %s\n", m->mpc_busid, str); | ||
159 | #endif | ||
160 | 87 | ||
161 | #if MAX_MP_BUSSES < 256 | 88 | #if MAX_MP_BUSSES < 256 |
162 | if (m->mpc_busid >= MAX_MP_BUSSES) { | 89 | if (m->mpc_busid >= MAX_MP_BUSSES) { |
@@ -173,10 +100,9 @@ static void __init MP_bus_info(struct mpc_config_bus *m) | |||
173 | mp_bus_id_to_type[m->mpc_busid] = MP_BUS_ISA; | 100 | mp_bus_id_to_type[m->mpc_busid] = MP_BUS_ISA; |
174 | #endif | 101 | #endif |
175 | } else if (strncmp(str, BUSTYPE_PCI, sizeof(BUSTYPE_PCI) - 1) == 0) { | 102 | } else if (strncmp(str, BUSTYPE_PCI, sizeof(BUSTYPE_PCI) - 1) == 0) { |
176 | #ifdef CONFIG_X86_NUMAQ | 103 | if (x86_quirks->mpc_oem_pci_bus) |
177 | if (found_numaq) | 104 | x86_quirks->mpc_oem_pci_bus(m); |
178 | mpc_oem_pci_bus(m, translation_table[mpc_record]); | 105 | |
179 | #endif | ||
180 | clear_bit(m->mpc_busid, mp_bus_not_pci); | 106 | clear_bit(m->mpc_busid, mp_bus_not_pci); |
181 | #if defined(CONFIG_EISA) || defined (CONFIG_MCA) | 107 | #if defined(CONFIG_EISA) || defined (CONFIG_MCA) |
182 | mp_bus_id_to_type[m->mpc_busid] = MP_BUS_PCI; | 108 | mp_bus_id_to_type[m->mpc_busid] = MP_BUS_PCI; |
@@ -316,83 +242,6 @@ static void __init MP_lintsrc_info(struct mpc_config_lintsrc *m) | |||
316 | m->mpc_srcbusirq, m->mpc_destapic, m->mpc_destapiclint); | 242 | m->mpc_srcbusirq, m->mpc_destapic, m->mpc_destapiclint); |
317 | } | 243 | } |
318 | 244 | ||
319 | #ifdef CONFIG_X86_NUMAQ | ||
320 | static void __init MP_translation_info(struct mpc_config_translation *m) | ||
321 | { | ||
322 | printk(KERN_INFO | ||
323 | "Translation: record %d, type %d, quad %d, global %d, local %d\n", | ||
324 | mpc_record, m->trans_type, m->trans_quad, m->trans_global, | ||
325 | m->trans_local); | ||
326 | |||
327 | if (mpc_record >= MAX_MPC_ENTRY) | ||
328 | printk(KERN_ERR "MAX_MPC_ENTRY exceeded!\n"); | ||
329 | else | ||
330 | translation_table[mpc_record] = m; /* stash this for later */ | ||
331 | if (m->trans_quad < MAX_NUMNODES && !node_online(m->trans_quad)) | ||
332 | node_set_online(m->trans_quad); | ||
333 | } | ||
334 | |||
335 | /* | ||
336 | * Read/parse the MPC oem tables | ||
337 | */ | ||
338 | |||
339 | static void __init smp_read_mpc_oem(struct mp_config_oemtable *oemtable, | ||
340 | unsigned short oemsize) | ||
341 | { | ||
342 | int count = sizeof(*oemtable); /* the header size */ | ||
343 | unsigned char *oemptr = ((unsigned char *)oemtable) + count; | ||
344 | |||
345 | mpc_record = 0; | ||
346 | printk(KERN_INFO "Found an OEM MPC table at %8p - parsing it ... \n", | ||
347 | oemtable); | ||
348 | if (memcmp(oemtable->oem_signature, MPC_OEM_SIGNATURE, 4)) { | ||
349 | printk(KERN_WARNING | ||
350 | "SMP mpc oemtable: bad signature [%c%c%c%c]!\n", | ||
351 | oemtable->oem_signature[0], oemtable->oem_signature[1], | ||
352 | oemtable->oem_signature[2], oemtable->oem_signature[3]); | ||
353 | return; | ||
354 | } | ||
355 | if (mpf_checksum((unsigned char *)oemtable, oemtable->oem_length)) { | ||
356 | printk(KERN_WARNING "SMP oem mptable: checksum error!\n"); | ||
357 | return; | ||
358 | } | ||
359 | while (count < oemtable->oem_length) { | ||
360 | switch (*oemptr) { | ||
361 | case MP_TRANSLATION: | ||
362 | { | ||
363 | struct mpc_config_translation *m = | ||
364 | (struct mpc_config_translation *)oemptr; | ||
365 | MP_translation_info(m); | ||
366 | oemptr += sizeof(*m); | ||
367 | count += sizeof(*m); | ||
368 | ++mpc_record; | ||
369 | break; | ||
370 | } | ||
371 | default: | ||
372 | { | ||
373 | printk(KERN_WARNING | ||
374 | "Unrecognised OEM table entry type! - %d\n", | ||
375 | (int)*oemptr); | ||
376 | return; | ||
377 | } | ||
378 | } | ||
379 | } | ||
380 | } | ||
381 | |||
382 | void numaq_mps_oem_check(struct mp_config_table *mpc, char *oem, | ||
383 | char *productid) | ||
384 | { | ||
385 | if (strncmp(oem, "IBM NUMA", 8)) | ||
386 | printk("Warning! Not a NUMA-Q system!\n"); | ||
387 | else | ||
388 | found_numaq = 1; | ||
389 | |||
390 | if (mpc->mpc_oemptr) | ||
391 | smp_read_mpc_oem((struct mp_config_oemtable *)mpc->mpc_oemptr, | ||
392 | mpc->mpc_oemsize); | ||
393 | } | ||
394 | #endif /* CONFIG_X86_NUMAQ */ | ||
395 | |||
396 | /* | 245 | /* |
397 | * Read/parse the MPC | 246 | * Read/parse the MPC |
398 | */ | 247 | */ |
@@ -457,7 +306,6 @@ static int __init smp_read_mpc(struct mp_config_table *mpc, unsigned early) | |||
457 | } else | 306 | } else |
458 | mps_oem_check(mpc, oem, str); | 307 | mps_oem_check(mpc, oem, str); |
459 | #endif | 308 | #endif |
460 | |||
461 | /* save the local APIC address, it might be non-default */ | 309 | /* save the local APIC address, it might be non-default */ |
462 | if (!acpi_lapic) | 310 | if (!acpi_lapic) |
463 | mp_lapic_addr = mpc->mpc_lapic; | 311 | mp_lapic_addr = mpc->mpc_lapic; |
@@ -465,12 +313,17 @@ static int __init smp_read_mpc(struct mp_config_table *mpc, unsigned early) | |||
465 | if (early) | 313 | if (early) |
466 | return 1; | 314 | return 1; |
467 | 315 | ||
316 | if (mpc->mpc_oemptr && x86_quirks->smp_read_mpc_oem) { | ||
317 | struct mp_config_oemtable *oem_table = (struct mp_config_oemtable *)(unsigned long)mpc->mpc_oemptr; | ||
318 | x86_quirks->smp_read_mpc_oem(oem_table, mpc->mpc_oemsize); | ||
319 | } | ||
320 | |||
468 | /* | 321 | /* |
469 | * Now process the configuration blocks. | 322 | * Now process the configuration blocks. |
470 | */ | 323 | */ |
471 | #ifdef CONFIG_X86_NUMAQ | 324 | if (x86_quirks->mpc_record) |
472 | mpc_record = 0; | 325 | *x86_quirks->mpc_record = 0; |
473 | #endif | 326 | |
474 | while (count < mpc->mpc_length) { | 327 | while (count < mpc->mpc_length) { |
475 | switch (*mpt) { | 328 | switch (*mpt) { |
476 | case MP_PROCESSOR: | 329 | case MP_PROCESSOR: |
@@ -536,9 +389,8 @@ static int __init smp_read_mpc(struct mp_config_table *mpc, unsigned early) | |||
536 | count = mpc->mpc_length; | 389 | count = mpc->mpc_length; |
537 | break; | 390 | break; |
538 | } | 391 | } |
539 | #ifdef CONFIG_X86_NUMAQ | 392 | if (x86_quirks->mpc_record) |
540 | ++mpc_record; | 393 | (*x86_quirks->mpc_record)++; |
541 | #endif | ||
542 | } | 394 | } |
543 | 395 | ||
544 | #ifdef CONFIG_X86_GENERICARCH | 396 | #ifdef CONFIG_X86_GENERICARCH |
@@ -726,20 +578,14 @@ static inline void __init construct_default_ISA_mptable(int mpc_default_type) | |||
726 | static struct intel_mp_floating *mpf_found; | 578 | static struct intel_mp_floating *mpf_found; |
727 | 579 | ||
728 | /* | 580 | /* |
729 | * Machine specific quirk for finding the SMP config before other setup | ||
730 | * activities destroy the table: | ||
731 | */ | ||
732 | int (*mach_get_smp_config_quirk)(unsigned int early); | ||
733 | |||
734 | /* | ||
735 | * Scan the memory blocks for an SMP configuration block. | 581 | * Scan the memory blocks for an SMP configuration block. |
736 | */ | 582 | */ |
737 | static void __init __get_smp_config(unsigned int early) | 583 | static void __init __get_smp_config(unsigned int early) |
738 | { | 584 | { |
739 | struct intel_mp_floating *mpf = mpf_found; | 585 | struct intel_mp_floating *mpf = mpf_found; |
740 | 586 | ||
741 | if (mach_get_smp_config_quirk) { | 587 | if (x86_quirks->mach_get_smp_config) { |
742 | if (mach_get_smp_config_quirk(early)) | 588 | if (x86_quirks->mach_get_smp_config(early)) |
743 | return; | 589 | return; |
744 | } | 590 | } |
745 | if (acpi_lapic && early) | 591 | if (acpi_lapic && early) |
@@ -899,14 +745,12 @@ static int __init smp_scan_config(unsigned long base, unsigned long length, | |||
899 | return 0; | 745 | return 0; |
900 | } | 746 | } |
901 | 747 | ||
902 | int (*mach_find_smp_config_quirk)(unsigned int reserve); | ||
903 | |||
904 | static void __init __find_smp_config(unsigned int reserve) | 748 | static void __init __find_smp_config(unsigned int reserve) |
905 | { | 749 | { |
906 | unsigned int address; | 750 | unsigned int address; |
907 | 751 | ||
908 | if (mach_find_smp_config_quirk) { | 752 | if (x86_quirks->mach_find_smp_config) { |
909 | if (mach_find_smp_config_quirk(reserve)) | 753 | if (x86_quirks->mach_find_smp_config(reserve)) |
910 | return; | 754 | return; |
911 | } | 755 | } |
912 | /* | 756 | /* |
diff --git a/arch/x86/kernel/msr.c b/arch/x86/kernel/msr.c index a153b3905f60..9fd809552447 100644 --- a/arch/x86/kernel/msr.c +++ b/arch/x86/kernel/msr.c | |||
@@ -149,8 +149,8 @@ static int __cpuinit msr_device_create(int cpu) | |||
149 | { | 149 | { |
150 | struct device *dev; | 150 | struct device *dev; |
151 | 151 | ||
152 | dev = device_create(msr_class, NULL, MKDEV(MSR_MAJOR, cpu), | 152 | dev = device_create_drvdata(msr_class, NULL, MKDEV(MSR_MAJOR, cpu), |
153 | "msr%d", cpu); | 153 | NULL, "msr%d", cpu); |
154 | return IS_ERR(dev) ? PTR_ERR(dev) : 0; | 154 | return IS_ERR(dev) ? PTR_ERR(dev) : 0; |
155 | } | 155 | } |
156 | 156 | ||
diff --git a/arch/x86/kernel/nmi.c b/arch/x86/kernel/nmi.c index ec024b3baad0..ac6d51222e7d 100644 --- a/arch/x86/kernel/nmi.c +++ b/arch/x86/kernel/nmi.c | |||
@@ -263,7 +263,7 @@ late_initcall(init_lapic_nmi_sysfs); | |||
263 | 263 | ||
264 | static void __acpi_nmi_enable(void *__unused) | 264 | static void __acpi_nmi_enable(void *__unused) |
265 | { | 265 | { |
266 | apic_write_around(APIC_LVT0, APIC_DM_NMI); | 266 | apic_write(APIC_LVT0, APIC_DM_NMI); |
267 | } | 267 | } |
268 | 268 | ||
269 | /* | 269 | /* |
@@ -277,7 +277,7 @@ void acpi_nmi_enable(void) | |||
277 | 277 | ||
278 | static void __acpi_nmi_disable(void *__unused) | 278 | static void __acpi_nmi_disable(void *__unused) |
279 | { | 279 | { |
280 | apic_write_around(APIC_LVT0, APIC_DM_NMI | APIC_LVT_MASKED); | 280 | apic_write(APIC_LVT0, APIC_DM_NMI | APIC_LVT_MASKED); |
281 | } | 281 | } |
282 | 282 | ||
283 | /* | 283 | /* |
@@ -448,6 +448,13 @@ nmi_watchdog_tick(struct pt_regs *regs, unsigned reason) | |||
448 | 448 | ||
449 | #ifdef CONFIG_SYSCTL | 449 | #ifdef CONFIG_SYSCTL |
450 | 450 | ||
451 | static int __init setup_unknown_nmi_panic(char *str) | ||
452 | { | ||
453 | unknown_nmi_panic = 1; | ||
454 | return 1; | ||
455 | } | ||
456 | __setup("unknown_nmi_panic", setup_unknown_nmi_panic); | ||
457 | |||
451 | static int unknown_nmi_panic_callback(struct pt_regs *regs, int cpu) | 458 | static int unknown_nmi_panic_callback(struct pt_regs *regs, int cpu) |
452 | { | 459 | { |
453 | unsigned char reason = get_nmi_reason(); | 460 | unsigned char reason = get_nmi_reason(); |
diff --git a/arch/x86/kernel/numaq_32.c b/arch/x86/kernel/numaq_32.c index a23e8233b9ac..b8c45610b20a 100644 --- a/arch/x86/kernel/numaq_32.c +++ b/arch/x86/kernel/numaq_32.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <asm/processor.h> | 33 | #include <asm/processor.h> |
34 | #include <asm/mpspec.h> | 34 | #include <asm/mpspec.h> |
35 | #include <asm/e820.h> | 35 | #include <asm/e820.h> |
36 | #include <asm/setup.h> | ||
36 | 37 | ||
37 | #define MB_TO_PAGES(addr) ((addr) << (20 - PAGE_SHIFT)) | 38 | #define MB_TO_PAGES(addr) ((addr) << (20 - PAGE_SHIFT)) |
38 | 39 | ||
@@ -71,6 +72,188 @@ static void __init smp_dump_qct(void) | |||
71 | } | 72 | } |
72 | } | 73 | } |
73 | 74 | ||
75 | |||
76 | void __init numaq_tsc_disable(void) | ||
77 | { | ||
78 | if (!found_numaq) | ||
79 | return; | ||
80 | |||
81 | if (num_online_nodes() > 1) { | ||
82 | printk(KERN_DEBUG "NUMAQ: disabling TSC\n"); | ||
83 | setup_clear_cpu_cap(X86_FEATURE_TSC); | ||
84 | } | ||
85 | } | ||
86 | |||
87 | static int __init numaq_pre_time_init(void) | ||
88 | { | ||
89 | numaq_tsc_disable(); | ||
90 | return 0; | ||
91 | } | ||
92 | |||
93 | int found_numaq; | ||
94 | /* | ||
95 | * Have to match translation table entries to main table entries by counter | ||
96 | * hence the mpc_record variable .... can't see a less disgusting way of | ||
97 | * doing this .... | ||
98 | */ | ||
99 | struct mpc_config_translation { | ||
100 | unsigned char mpc_type; | ||
101 | unsigned char trans_len; | ||
102 | unsigned char trans_type; | ||
103 | unsigned char trans_quad; | ||
104 | unsigned char trans_global; | ||
105 | unsigned char trans_local; | ||
106 | unsigned short trans_reserved; | ||
107 | }; | ||
108 | |||
109 | /* x86_quirks member */ | ||
110 | static int mpc_record; | ||
111 | static struct mpc_config_translation *translation_table[MAX_MPC_ENTRY] | ||
112 | __cpuinitdata; | ||
113 | |||
114 | static inline int generate_logical_apicid(int quad, int phys_apicid) | ||
115 | { | ||
116 | return (quad << 4) + (phys_apicid ? phys_apicid << 1 : 1); | ||
117 | } | ||
118 | |||
119 | /* x86_quirks member */ | ||
120 | static int mpc_apic_id(struct mpc_config_processor *m) | ||
121 | { | ||
122 | int quad = translation_table[mpc_record]->trans_quad; | ||
123 | int logical_apicid = generate_logical_apicid(quad, m->mpc_apicid); | ||
124 | |||
125 | printk(KERN_DEBUG "Processor #%d %u:%u APIC version %d (quad %d, apic %d)\n", | ||
126 | m->mpc_apicid, | ||
127 | (m->mpc_cpufeature & CPU_FAMILY_MASK) >> 8, | ||
128 | (m->mpc_cpufeature & CPU_MODEL_MASK) >> 4, | ||
129 | m->mpc_apicver, quad, logical_apicid); | ||
130 | return logical_apicid; | ||
131 | } | ||
132 | |||
133 | int mp_bus_id_to_node[MAX_MP_BUSSES]; | ||
134 | |||
135 | int mp_bus_id_to_local[MAX_MP_BUSSES]; | ||
136 | |||
137 | /* x86_quirks member */ | ||
138 | static void mpc_oem_bus_info(struct mpc_config_bus *m, char *name) | ||
139 | { | ||
140 | int quad = translation_table[mpc_record]->trans_quad; | ||
141 | int local = translation_table[mpc_record]->trans_local; | ||
142 | |||
143 | mp_bus_id_to_node[m->mpc_busid] = quad; | ||
144 | mp_bus_id_to_local[m->mpc_busid] = local; | ||
145 | printk(KERN_INFO "Bus #%d is %s (node %d)\n", | ||
146 | m->mpc_busid, name, quad); | ||
147 | } | ||
148 | |||
149 | int quad_local_to_mp_bus_id [NR_CPUS/4][4]; | ||
150 | |||
151 | /* x86_quirks member */ | ||
152 | static void mpc_oem_pci_bus(struct mpc_config_bus *m) | ||
153 | { | ||
154 | int quad = translation_table[mpc_record]->trans_quad; | ||
155 | int local = translation_table[mpc_record]->trans_local; | ||
156 | |||
157 | quad_local_to_mp_bus_id[quad][local] = m->mpc_busid; | ||
158 | } | ||
159 | |||
160 | static void __init MP_translation_info(struct mpc_config_translation *m) | ||
161 | { | ||
162 | printk(KERN_INFO | ||
163 | "Translation: record %d, type %d, quad %d, global %d, local %d\n", | ||
164 | mpc_record, m->trans_type, m->trans_quad, m->trans_global, | ||
165 | m->trans_local); | ||
166 | |||
167 | if (mpc_record >= MAX_MPC_ENTRY) | ||
168 | printk(KERN_ERR "MAX_MPC_ENTRY exceeded!\n"); | ||
169 | else | ||
170 | translation_table[mpc_record] = m; /* stash this for later */ | ||
171 | if (m->trans_quad < MAX_NUMNODES && !node_online(m->trans_quad)) | ||
172 | node_set_online(m->trans_quad); | ||
173 | } | ||
174 | |||
175 | static int __init mpf_checksum(unsigned char *mp, int len) | ||
176 | { | ||
177 | int sum = 0; | ||
178 | |||
179 | while (len--) | ||
180 | sum += *mp++; | ||
181 | |||
182 | return sum & 0xFF; | ||
183 | } | ||
184 | |||
185 | /* | ||
186 | * Read/parse the MPC oem tables | ||
187 | */ | ||
188 | |||
189 | static void __init smp_read_mpc_oem(struct mp_config_oemtable *oemtable, | ||
190 | unsigned short oemsize) | ||
191 | { | ||
192 | int count = sizeof(*oemtable); /* the header size */ | ||
193 | unsigned char *oemptr = ((unsigned char *)oemtable) + count; | ||
194 | |||
195 | mpc_record = 0; | ||
196 | printk(KERN_INFO "Found an OEM MPC table at %8p - parsing it ... \n", | ||
197 | oemtable); | ||
198 | if (memcmp(oemtable->oem_signature, MPC_OEM_SIGNATURE, 4)) { | ||
199 | printk(KERN_WARNING | ||
200 | "SMP mpc oemtable: bad signature [%c%c%c%c]!\n", | ||
201 | oemtable->oem_signature[0], oemtable->oem_signature[1], | ||
202 | oemtable->oem_signature[2], oemtable->oem_signature[3]); | ||
203 | return; | ||
204 | } | ||
205 | if (mpf_checksum((unsigned char *)oemtable, oemtable->oem_length)) { | ||
206 | printk(KERN_WARNING "SMP oem mptable: checksum error!\n"); | ||
207 | return; | ||
208 | } | ||
209 | while (count < oemtable->oem_length) { | ||
210 | switch (*oemptr) { | ||
211 | case MP_TRANSLATION: | ||
212 | { | ||
213 | struct mpc_config_translation *m = | ||
214 | (struct mpc_config_translation *)oemptr; | ||
215 | MP_translation_info(m); | ||
216 | oemptr += sizeof(*m); | ||
217 | count += sizeof(*m); | ||
218 | ++mpc_record; | ||
219 | break; | ||
220 | } | ||
221 | default: | ||
222 | { | ||
223 | printk(KERN_WARNING | ||
224 | "Unrecognised OEM table entry type! - %d\n", | ||
225 | (int)*oemptr); | ||
226 | return; | ||
227 | } | ||
228 | } | ||
229 | } | ||
230 | } | ||
231 | |||
232 | static struct x86_quirks numaq_x86_quirks __initdata = { | ||
233 | .arch_pre_time_init = numaq_pre_time_init, | ||
234 | .arch_time_init = NULL, | ||
235 | .arch_pre_intr_init = NULL, | ||
236 | .arch_memory_setup = NULL, | ||
237 | .arch_intr_init = NULL, | ||
238 | .arch_trap_init = NULL, | ||
239 | .mach_get_smp_config = NULL, | ||
240 | .mach_find_smp_config = NULL, | ||
241 | .mpc_record = &mpc_record, | ||
242 | .mpc_apic_id = mpc_apic_id, | ||
243 | .mpc_oem_bus_info = mpc_oem_bus_info, | ||
244 | .mpc_oem_pci_bus = mpc_oem_pci_bus, | ||
245 | .smp_read_mpc_oem = smp_read_mpc_oem, | ||
246 | }; | ||
247 | |||
248 | void numaq_mps_oem_check(struct mp_config_table *mpc, char *oem, | ||
249 | char *productid) | ||
250 | { | ||
251 | if (strncmp(oem, "IBM NUMA", 8)) | ||
252 | printk("Warning! Not a NUMA-Q system!\n"); | ||
253 | else | ||
254 | found_numaq = 1; | ||
255 | } | ||
256 | |||
74 | static __init void early_check_numaq(void) | 257 | static __init void early_check_numaq(void) |
75 | { | 258 | { |
76 | /* | 259 | /* |
@@ -82,6 +265,9 @@ static __init void early_check_numaq(void) | |||
82 | */ | 265 | */ |
83 | if (smp_found_config) | 266 | if (smp_found_config) |
84 | early_get_smp_config(); | 267 | early_get_smp_config(); |
268 | |||
269 | if (found_numaq) | ||
270 | x86_quirks = &numaq_x86_quirks; | ||
85 | } | 271 | } |
86 | 272 | ||
87 | int __init get_memcfg_numaq(void) | 273 | int __init get_memcfg_numaq(void) |
@@ -92,14 +278,3 @@ int __init get_memcfg_numaq(void) | |||
92 | smp_dump_qct(); | 278 | smp_dump_qct(); |
93 | return 1; | 279 | return 1; |
94 | } | 280 | } |
95 | |||
96 | void __init numaq_tsc_disable(void) | ||
97 | { | ||
98 | if (!found_numaq) | ||
99 | return; | ||
100 | |||
101 | if (num_online_nodes() > 1) { | ||
102 | printk(KERN_DEBUG "NUMAQ: disabling TSC\n"); | ||
103 | setup_clear_cpu_cap(X86_FEATURE_TSC); | ||
104 | } | ||
105 | } | ||
diff --git a/arch/x86/kernel/paravirt.c b/arch/x86/kernel/paravirt.c index e0f571d58c19..94da4d52d798 100644 --- a/arch/x86/kernel/paravirt.c +++ b/arch/x86/kernel/paravirt.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <asm/desc.h> | 29 | #include <asm/desc.h> |
30 | #include <asm/setup.h> | 30 | #include <asm/setup.h> |
31 | #include <asm/arch_hooks.h> | 31 | #include <asm/arch_hooks.h> |
32 | #include <asm/pgtable.h> | ||
32 | #include <asm/time.h> | 33 | #include <asm/time.h> |
33 | #include <asm/pgalloc.h> | 34 | #include <asm/pgalloc.h> |
34 | #include <asm/irq.h> | 35 | #include <asm/irq.h> |
@@ -123,6 +124,7 @@ static void *get_call_destination(u8 type) | |||
123 | .pv_irq_ops = pv_irq_ops, | 124 | .pv_irq_ops = pv_irq_ops, |
124 | .pv_apic_ops = pv_apic_ops, | 125 | .pv_apic_ops = pv_apic_ops, |
125 | .pv_mmu_ops = pv_mmu_ops, | 126 | .pv_mmu_ops = pv_mmu_ops, |
127 | .pv_lock_ops = pv_lock_ops, | ||
126 | }; | 128 | }; |
127 | return *((void **)&tmpl + type); | 129 | return *((void **)&tmpl + type); |
128 | } | 130 | } |
@@ -266,6 +268,17 @@ enum paravirt_lazy_mode paravirt_get_lazy_mode(void) | |||
266 | return __get_cpu_var(paravirt_lazy_mode); | 268 | return __get_cpu_var(paravirt_lazy_mode); |
267 | } | 269 | } |
268 | 270 | ||
271 | void __init paravirt_use_bytelocks(void) | ||
272 | { | ||
273 | #ifdef CONFIG_SMP | ||
274 | pv_lock_ops.spin_is_locked = __byte_spin_is_locked; | ||
275 | pv_lock_ops.spin_is_contended = __byte_spin_is_contended; | ||
276 | pv_lock_ops.spin_lock = __byte_spin_lock; | ||
277 | pv_lock_ops.spin_trylock = __byte_spin_trylock; | ||
278 | pv_lock_ops.spin_unlock = __byte_spin_unlock; | ||
279 | #endif | ||
280 | } | ||
281 | |||
269 | struct pv_info pv_info = { | 282 | struct pv_info pv_info = { |
270 | .name = "bare hardware", | 283 | .name = "bare hardware", |
271 | .paravirt_enabled = 0, | 284 | .paravirt_enabled = 0, |
@@ -361,7 +374,6 @@ struct pv_cpu_ops pv_cpu_ops = { | |||
361 | struct pv_apic_ops pv_apic_ops = { | 374 | struct pv_apic_ops pv_apic_ops = { |
362 | #ifdef CONFIG_X86_LOCAL_APIC | 375 | #ifdef CONFIG_X86_LOCAL_APIC |
363 | .apic_write = native_apic_write, | 376 | .apic_write = native_apic_write, |
364 | .apic_write_atomic = native_apic_write_atomic, | ||
365 | .apic_read = native_apic_read, | 377 | .apic_read = native_apic_read, |
366 | .setup_boot_clock = setup_boot_APIC_clock, | 378 | .setup_boot_clock = setup_boot_APIC_clock, |
367 | .setup_secondary_clock = setup_secondary_APIC_clock, | 379 | .setup_secondary_clock = setup_secondary_APIC_clock, |
@@ -373,6 +385,9 @@ struct pv_mmu_ops pv_mmu_ops = { | |||
373 | #ifndef CONFIG_X86_64 | 385 | #ifndef CONFIG_X86_64 |
374 | .pagetable_setup_start = native_pagetable_setup_start, | 386 | .pagetable_setup_start = native_pagetable_setup_start, |
375 | .pagetable_setup_done = native_pagetable_setup_done, | 387 | .pagetable_setup_done = native_pagetable_setup_done, |
388 | #else | ||
389 | .pagetable_setup_start = paravirt_nop, | ||
390 | .pagetable_setup_done = paravirt_nop, | ||
376 | #endif | 391 | #endif |
377 | 392 | ||
378 | .read_cr2 = native_read_cr2, | 393 | .read_cr2 = native_read_cr2, |
@@ -428,7 +443,7 @@ struct pv_mmu_ops pv_mmu_ops = { | |||
428 | #endif /* PAGETABLE_LEVELS >= 3 */ | 443 | #endif /* PAGETABLE_LEVELS >= 3 */ |
429 | 444 | ||
430 | .pte_val = native_pte_val, | 445 | .pte_val = native_pte_val, |
431 | .pte_flags = native_pte_val, | 446 | .pte_flags = native_pte_flags, |
432 | .pgd_val = native_pgd_val, | 447 | .pgd_val = native_pgd_val, |
433 | 448 | ||
434 | .make_pte = native_make_pte, | 449 | .make_pte = native_make_pte, |
@@ -446,6 +461,18 @@ struct pv_mmu_ops pv_mmu_ops = { | |||
446 | .set_fixmap = native_set_fixmap, | 461 | .set_fixmap = native_set_fixmap, |
447 | }; | 462 | }; |
448 | 463 | ||
464 | struct pv_lock_ops pv_lock_ops = { | ||
465 | #ifdef CONFIG_SMP | ||
466 | .spin_is_locked = __ticket_spin_is_locked, | ||
467 | .spin_is_contended = __ticket_spin_is_contended, | ||
468 | |||
469 | .spin_lock = __ticket_spin_lock, | ||
470 | .spin_trylock = __ticket_spin_trylock, | ||
471 | .spin_unlock = __ticket_spin_unlock, | ||
472 | #endif | ||
473 | }; | ||
474 | EXPORT_SYMBOL_GPL(pv_lock_ops); | ||
475 | |||
449 | EXPORT_SYMBOL_GPL(pv_time_ops); | 476 | EXPORT_SYMBOL_GPL(pv_time_ops); |
450 | EXPORT_SYMBOL (pv_cpu_ops); | 477 | EXPORT_SYMBOL (pv_cpu_ops); |
451 | EXPORT_SYMBOL (pv_mmu_ops); | 478 | EXPORT_SYMBOL (pv_mmu_ops); |
diff --git a/arch/x86/kernel/pci-calgary_64.c b/arch/x86/kernel/pci-calgary_64.c index 6959b5c45df4..151f2d171f7c 100644 --- a/arch/x86/kernel/pci-calgary_64.c +++ b/arch/x86/kernel/pci-calgary_64.c | |||
@@ -36,7 +36,7 @@ | |||
36 | #include <linux/delay.h> | 36 | #include <linux/delay.h> |
37 | #include <linux/scatterlist.h> | 37 | #include <linux/scatterlist.h> |
38 | #include <linux/iommu-helper.h> | 38 | #include <linux/iommu-helper.h> |
39 | #include <asm/gart.h> | 39 | #include <asm/iommu.h> |
40 | #include <asm/calgary.h> | 40 | #include <asm/calgary.h> |
41 | #include <asm/tce.h> | 41 | #include <asm/tce.h> |
42 | #include <asm/pci-direct.h> | 42 | #include <asm/pci-direct.h> |
diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c index 8467ec2320f1..cbecb05551bb 100644 --- a/arch/x86/kernel/pci-dma.c +++ b/arch/x86/kernel/pci-dma.c | |||
@@ -5,12 +5,11 @@ | |||
5 | 5 | ||
6 | #include <asm/proto.h> | 6 | #include <asm/proto.h> |
7 | #include <asm/dma.h> | 7 | #include <asm/dma.h> |
8 | #include <asm/gart.h> | 8 | #include <asm/iommu.h> |
9 | #include <asm/calgary.h> | 9 | #include <asm/calgary.h> |
10 | #include <asm/amd_iommu.h> | 10 | #include <asm/amd_iommu.h> |
11 | 11 | ||
12 | int forbid_dac __read_mostly; | 12 | static int forbid_dac __read_mostly; |
13 | EXPORT_SYMBOL(forbid_dac); | ||
14 | 13 | ||
15 | const struct dma_mapping_ops *dma_ops; | 14 | const struct dma_mapping_ops *dma_ops; |
16 | EXPORT_SYMBOL(dma_ops); | 15 | EXPORT_SYMBOL(dma_ops); |
@@ -114,21 +113,15 @@ void __init pci_iommu_alloc(void) | |||
114 | * The order of these functions is important for | 113 | * The order of these functions is important for |
115 | * fall-back/fail-over reasons | 114 | * fall-back/fail-over reasons |
116 | */ | 115 | */ |
117 | #ifdef CONFIG_GART_IOMMU | ||
118 | gart_iommu_hole_init(); | 116 | gart_iommu_hole_init(); |
119 | #endif | ||
120 | 117 | ||
121 | #ifdef CONFIG_CALGARY_IOMMU | ||
122 | detect_calgary(); | 118 | detect_calgary(); |
123 | #endif | ||
124 | 119 | ||
125 | detect_intel_iommu(); | 120 | detect_intel_iommu(); |
126 | 121 | ||
127 | amd_iommu_detect(); | 122 | amd_iommu_detect(); |
128 | 123 | ||
129 | #ifdef CONFIG_SWIOTLB | ||
130 | pci_swiotlb_init(); | 124 | pci_swiotlb_init(); |
131 | #endif | ||
132 | } | 125 | } |
133 | #endif | 126 | #endif |
134 | 127 | ||
@@ -184,9 +177,7 @@ static __init int iommu_setup(char *p) | |||
184 | swiotlb = 1; | 177 | swiotlb = 1; |
185 | #endif | 178 | #endif |
186 | 179 | ||
187 | #ifdef CONFIG_GART_IOMMU | ||
188 | gart_parse_options(p); | 180 | gart_parse_options(p); |
189 | #endif | ||
190 | 181 | ||
191 | #ifdef CONFIG_CALGARY_IOMMU | 182 | #ifdef CONFIG_CALGARY_IOMMU |
192 | if (!strncmp(p, "calgary", 7)) | 183 | if (!strncmp(p, "calgary", 7)) |
@@ -323,8 +314,7 @@ int dma_supported(struct device *dev, u64 mask) | |||
323 | { | 314 | { |
324 | #ifdef CONFIG_PCI | 315 | #ifdef CONFIG_PCI |
325 | if (mask > 0xffffffff && forbid_dac > 0) { | 316 | if (mask > 0xffffffff && forbid_dac > 0) { |
326 | printk(KERN_INFO "PCI: Disallowing DAC for device %s\n", | 317 | dev_info(dev, "PCI: Disallowing DAC for device\n"); |
327 | dev->bus_id); | ||
328 | return 0; | 318 | return 0; |
329 | } | 319 | } |
330 | #endif | 320 | #endif |
@@ -351,8 +341,7 @@ int dma_supported(struct device *dev, u64 mask) | |||
351 | type. Normally this doesn't make any difference, but gives | 341 | type. Normally this doesn't make any difference, but gives |
352 | more gentle handling of IOMMU overflow. */ | 342 | more gentle handling of IOMMU overflow. */ |
353 | if (iommu_sac_force && (mask >= DMA_40BIT_MASK)) { | 343 | if (iommu_sac_force && (mask >= DMA_40BIT_MASK)) { |
354 | printk(KERN_INFO "%s: Force SAC with mask %Lx\n", | 344 | dev_info(dev, "Force SAC with mask %Lx\n", mask); |
355 | dev->bus_id, mask); | ||
356 | return 0; | 345 | return 0; |
357 | } | 346 | } |
358 | 347 | ||
@@ -500,17 +489,13 @@ EXPORT_SYMBOL(dma_free_coherent); | |||
500 | 489 | ||
501 | static int __init pci_iommu_init(void) | 490 | static int __init pci_iommu_init(void) |
502 | { | 491 | { |
503 | #ifdef CONFIG_CALGARY_IOMMU | ||
504 | calgary_iommu_init(); | 492 | calgary_iommu_init(); |
505 | #endif | ||
506 | 493 | ||
507 | intel_iommu_init(); | 494 | intel_iommu_init(); |
508 | 495 | ||
509 | amd_iommu_init(); | 496 | amd_iommu_init(); |
510 | 497 | ||
511 | #ifdef CONFIG_GART_IOMMU | ||
512 | gart_iommu_init(); | 498 | gart_iommu_init(); |
513 | #endif | ||
514 | 499 | ||
515 | no_iommu_init(); | 500 | no_iommu_init(); |
516 | return 0; | 501 | return 0; |
diff --git a/arch/x86/kernel/pci-gart_64.c b/arch/x86/kernel/pci-gart_64.c index c3fe78406d18..df5f142657d2 100644 --- a/arch/x86/kernel/pci-gart_64.c +++ b/arch/x86/kernel/pci-gart_64.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <asm/mtrr.h> | 32 | #include <asm/mtrr.h> |
33 | #include <asm/pgtable.h> | 33 | #include <asm/pgtable.h> |
34 | #include <asm/proto.h> | 34 | #include <asm/proto.h> |
35 | #include <asm/iommu.h> | ||
35 | #include <asm/gart.h> | 36 | #include <asm/gart.h> |
36 | #include <asm/cacheflush.h> | 37 | #include <asm/cacheflush.h> |
37 | #include <asm/swiotlb.h> | 38 | #include <asm/swiotlb.h> |
@@ -197,9 +198,7 @@ static void iommu_full(struct device *dev, size_t size, int dir) | |||
197 | * out. Hopefully no network devices use single mappings that big. | 198 | * out. Hopefully no network devices use single mappings that big. |
198 | */ | 199 | */ |
199 | 200 | ||
200 | printk(KERN_ERR | 201 | dev_err(dev, "PCI-DMA: Out of IOMMU space for %lu bytes\n", size); |
201 | "PCI-DMA: Out of IOMMU space for %lu bytes at device %s\n", | ||
202 | size, dev->bus_id); | ||
203 | 202 | ||
204 | if (size > PAGE_SIZE*EMERGENCY_PAGES) { | 203 | if (size > PAGE_SIZE*EMERGENCY_PAGES) { |
205 | if (dir == PCI_DMA_FROMDEVICE || dir == PCI_DMA_BIDIRECTIONAL) | 204 | if (dir == PCI_DMA_FROMDEVICE || dir == PCI_DMA_BIDIRECTIONAL) |
diff --git a/arch/x86/kernel/pci-nommu.c b/arch/x86/kernel/pci-nommu.c index aec43d56f49c..792b9179eff3 100644 --- a/arch/x86/kernel/pci-nommu.c +++ b/arch/x86/kernel/pci-nommu.c | |||
@@ -7,7 +7,7 @@ | |||
7 | #include <linux/dma-mapping.h> | 7 | #include <linux/dma-mapping.h> |
8 | #include <linux/scatterlist.h> | 8 | #include <linux/scatterlist.h> |
9 | 9 | ||
10 | #include <asm/gart.h> | 10 | #include <asm/iommu.h> |
11 | #include <asm/processor.h> | 11 | #include <asm/processor.h> |
12 | #include <asm/dma.h> | 12 | #include <asm/dma.h> |
13 | 13 | ||
diff --git a/arch/x86/kernel/pci-swiotlb_64.c b/arch/x86/kernel/pci-swiotlb_64.c index 82299cd1d04d..20df839b9c20 100644 --- a/arch/x86/kernel/pci-swiotlb_64.c +++ b/arch/x86/kernel/pci-swiotlb_64.c | |||
@@ -5,7 +5,7 @@ | |||
5 | #include <linux/module.h> | 5 | #include <linux/module.h> |
6 | #include <linux/dma-mapping.h> | 6 | #include <linux/dma-mapping.h> |
7 | 7 | ||
8 | #include <asm/gart.h> | 8 | #include <asm/iommu.h> |
9 | #include <asm/swiotlb.h> | 9 | #include <asm/swiotlb.h> |
10 | #include <asm/dma.h> | 10 | #include <asm/dma.h> |
11 | 11 | ||
diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c index 4d629c62f4f8..7fc4d5b0a6a0 100644 --- a/arch/x86/kernel/process.c +++ b/arch/x86/kernel/process.c | |||
@@ -15,6 +15,7 @@ unsigned long idle_nomwait; | |||
15 | EXPORT_SYMBOL(idle_nomwait); | 15 | EXPORT_SYMBOL(idle_nomwait); |
16 | 16 | ||
17 | struct kmem_cache *task_xstate_cachep; | 17 | struct kmem_cache *task_xstate_cachep; |
18 | static int force_mwait __cpuinitdata; | ||
18 | 19 | ||
19 | int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src) | 20 | int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src) |
20 | { | 21 | { |
@@ -199,6 +200,7 @@ static void poll_idle(void) | |||
199 | * | 200 | * |
200 | * idle=mwait overrides this decision and forces the usage of mwait. | 201 | * idle=mwait overrides this decision and forces the usage of mwait. |
201 | */ | 202 | */ |
203 | static int __cpuinitdata force_mwait; | ||
202 | 204 | ||
203 | #define MWAIT_INFO 0x05 | 205 | #define MWAIT_INFO 0x05 |
204 | #define MWAIT_ECX_EXTENDED_INFO 0x01 | 206 | #define MWAIT_ECX_EXTENDED_INFO 0x01 |
@@ -326,6 +328,9 @@ void __cpuinit select_idle_routine(const struct cpuinfo_x86 *c) | |||
326 | 328 | ||
327 | static int __init idle_setup(char *str) | 329 | static int __init idle_setup(char *str) |
328 | { | 330 | { |
331 | if (!str) | ||
332 | return -EINVAL; | ||
333 | |||
329 | if (!strcmp(str, "poll")) { | 334 | if (!strcmp(str, "poll")) { |
330 | printk("using polling idle threads.\n"); | 335 | printk("using polling idle threads.\n"); |
331 | pm_idle = poll_idle; | 336 | pm_idle = poll_idle; |
diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c index a8e53626ac9a..e8a8e1b99817 100644 --- a/arch/x86/kernel/process_64.c +++ b/arch/x86/kernel/process_64.c | |||
@@ -537,8 +537,8 @@ static inline void __switch_to_xtra(struct task_struct *prev_p, | |||
537 | struct task_struct * | 537 | struct task_struct * |
538 | __switch_to(struct task_struct *prev_p, struct task_struct *next_p) | 538 | __switch_to(struct task_struct *prev_p, struct task_struct *next_p) |
539 | { | 539 | { |
540 | struct thread_struct *prev = &prev_p->thread, | 540 | struct thread_struct *prev = &prev_p->thread; |
541 | *next = &next_p->thread; | 541 | struct thread_struct *next = &next_p->thread; |
542 | int cpu = smp_processor_id(); | 542 | int cpu = smp_processor_id(); |
543 | struct tss_struct *tss = &per_cpu(init_tss, cpu); | 543 | struct tss_struct *tss = &per_cpu(init_tss, cpu); |
544 | unsigned fsindex, gsindex; | 544 | unsigned fsindex, gsindex; |
@@ -586,35 +586,34 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p) | |||
586 | 586 | ||
587 | /* | 587 | /* |
588 | * Switch FS and GS. | 588 | * Switch FS and GS. |
589 | * | ||
590 | * Segment register != 0 always requires a reload. Also | ||
591 | * reload when it has changed. When prev process used 64bit | ||
592 | * base always reload to avoid an information leak. | ||
589 | */ | 593 | */ |
590 | { | 594 | if (unlikely(fsindex | next->fsindex | prev->fs)) { |
591 | /* segment register != 0 always requires a reload. | 595 | loadsegment(fs, next->fsindex); |
592 | also reload when it has changed. | 596 | /* |
593 | when prev process used 64bit base always reload | 597 | * Check if the user used a selector != 0; if yes |
594 | to avoid an information leak. */ | 598 | * clear 64bit base, since overloaded base is always |
595 | if (unlikely(fsindex | next->fsindex | prev->fs)) { | 599 | * mapped to the Null selector |
596 | loadsegment(fs, next->fsindex); | 600 | */ |
597 | /* check if the user used a selector != 0 | 601 | if (fsindex) |
598 | * if yes clear 64bit base, since overloaded base | ||
599 | * is always mapped to the Null selector | ||
600 | */ | ||
601 | if (fsindex) | ||
602 | prev->fs = 0; | 602 | prev->fs = 0; |
603 | } | 603 | } |
604 | /* when next process has a 64bit base use it */ | 604 | /* when next process has a 64bit base use it */ |
605 | if (next->fs) | 605 | if (next->fs) |
606 | wrmsrl(MSR_FS_BASE, next->fs); | 606 | wrmsrl(MSR_FS_BASE, next->fs); |
607 | prev->fsindex = fsindex; | 607 | prev->fsindex = fsindex; |
608 | 608 | ||
609 | if (unlikely(gsindex | next->gsindex | prev->gs)) { | 609 | if (unlikely(gsindex | next->gsindex | prev->gs)) { |
610 | load_gs_index(next->gsindex); | 610 | load_gs_index(next->gsindex); |
611 | if (gsindex) | 611 | if (gsindex) |
612 | prev->gs = 0; | 612 | prev->gs = 0; |
613 | } | ||
614 | if (next->gs) | ||
615 | wrmsrl(MSR_KERNEL_GS_BASE, next->gs); | ||
616 | prev->gsindex = gsindex; | ||
617 | } | 613 | } |
614 | if (next->gs) | ||
615 | wrmsrl(MSR_KERNEL_GS_BASE, next->gs); | ||
616 | prev->gsindex = gsindex; | ||
618 | 617 | ||
619 | /* Must be after DS reload */ | 618 | /* Must be after DS reload */ |
620 | unlazy_fpu(prev_p); | 619 | unlazy_fpu(prev_p); |
@@ -627,7 +626,8 @@ __switch_to(struct task_struct *prev_p, struct task_struct *next_p) | |||
627 | write_pda(pcurrent, next_p); | 626 | write_pda(pcurrent, next_p); |
628 | 627 | ||
629 | write_pda(kernelstack, | 628 | write_pda(kernelstack, |
630 | (unsigned long)task_stack_page(next_p) + THREAD_SIZE - PDA_STACKOFFSET); | 629 | (unsigned long)task_stack_page(next_p) + |
630 | THREAD_SIZE - PDA_STACKOFFSET); | ||
631 | #ifdef CONFIG_CC_STACKPROTECTOR | 631 | #ifdef CONFIG_CC_STACKPROTECTOR |
632 | write_pda(stack_canary, next_p->stack_canary); | 632 | write_pda(stack_canary, next_p->stack_canary); |
633 | /* | 633 | /* |
diff --git a/arch/x86/kernel/ptrace.c b/arch/x86/kernel/ptrace.c index 77040b6070e1..e37dccce85db 100644 --- a/arch/x86/kernel/ptrace.c +++ b/arch/x86/kernel/ptrace.c | |||
@@ -1357,8 +1357,6 @@ const struct user_regset_view *task_user_regset_view(struct task_struct *task) | |||
1357 | #endif | 1357 | #endif |
1358 | } | 1358 | } |
1359 | 1359 | ||
1360 | #ifdef CONFIG_X86_32 | ||
1361 | |||
1362 | void send_sigtrap(struct task_struct *tsk, struct pt_regs *regs, int error_code) | 1360 | void send_sigtrap(struct task_struct *tsk, struct pt_regs *regs, int error_code) |
1363 | { | 1361 | { |
1364 | struct siginfo info; | 1362 | struct siginfo info; |
@@ -1377,89 +1375,10 @@ void send_sigtrap(struct task_struct *tsk, struct pt_regs *regs, int error_code) | |||
1377 | force_sig_info(SIGTRAP, &info, tsk); | 1375 | force_sig_info(SIGTRAP, &info, tsk); |
1378 | } | 1376 | } |
1379 | 1377 | ||
1380 | /* notification of system call entry/exit | ||
1381 | * - triggered by current->work.syscall_trace | ||
1382 | */ | ||
1383 | int do_syscall_trace(struct pt_regs *regs, int entryexit) | ||
1384 | { | ||
1385 | int is_sysemu = test_thread_flag(TIF_SYSCALL_EMU); | ||
1386 | /* | ||
1387 | * With TIF_SYSCALL_EMU set we want to ignore TIF_SINGLESTEP for syscall | ||
1388 | * interception | ||
1389 | */ | ||
1390 | int is_singlestep = !is_sysemu && test_thread_flag(TIF_SINGLESTEP); | ||
1391 | int ret = 0; | ||
1392 | |||
1393 | /* do the secure computing check first */ | ||
1394 | if (!entryexit) | ||
1395 | secure_computing(regs->orig_ax); | ||
1396 | |||
1397 | if (unlikely(current->audit_context)) { | ||
1398 | if (entryexit) | ||
1399 | audit_syscall_exit(AUDITSC_RESULT(regs->ax), | ||
1400 | regs->ax); | ||
1401 | /* Debug traps, when using PTRACE_SINGLESTEP, must be sent only | ||
1402 | * on the syscall exit path. Normally, when TIF_SYSCALL_AUDIT is | ||
1403 | * not used, entry.S will call us only on syscall exit, not | ||
1404 | * entry; so when TIF_SYSCALL_AUDIT is used we must avoid | ||
1405 | * calling send_sigtrap() on syscall entry. | ||
1406 | * | ||
1407 | * Note that when PTRACE_SYSEMU_SINGLESTEP is used, | ||
1408 | * is_singlestep is false, despite his name, so we will still do | ||
1409 | * the correct thing. | ||
1410 | */ | ||
1411 | else if (is_singlestep) | ||
1412 | goto out; | ||
1413 | } | ||
1414 | |||
1415 | if (!(current->ptrace & PT_PTRACED)) | ||
1416 | goto out; | ||
1417 | |||
1418 | /* If a process stops on the 1st tracepoint with SYSCALL_TRACE | ||
1419 | * and then is resumed with SYSEMU_SINGLESTEP, it will come in | ||
1420 | * here. We have to check this and return */ | ||
1421 | if (is_sysemu && entryexit) | ||
1422 | return 0; | ||
1423 | |||
1424 | /* Fake a debug trap */ | ||
1425 | if (is_singlestep) | ||
1426 | send_sigtrap(current, regs, 0); | ||
1427 | |||
1428 | if (!test_thread_flag(TIF_SYSCALL_TRACE) && !is_sysemu) | ||
1429 | goto out; | ||
1430 | |||
1431 | /* the 0x80 provides a way for the tracing parent to distinguish | ||
1432 | between a syscall stop and SIGTRAP delivery */ | ||
1433 | /* Note that the debugger could change the result of test_thread_flag!*/ | ||
1434 | ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) ? 0x80:0)); | ||
1435 | |||
1436 | /* | ||
1437 | * this isn't the same as continuing with a signal, but it will do | ||
1438 | * for normal use. strace only continues with a signal if the | ||
1439 | * stopping signal is not SIGTRAP. -brl | ||
1440 | */ | ||
1441 | if (current->exit_code) { | ||
1442 | send_sig(current->exit_code, current, 1); | ||
1443 | current->exit_code = 0; | ||
1444 | } | ||
1445 | ret = is_sysemu; | ||
1446 | out: | ||
1447 | if (unlikely(current->audit_context) && !entryexit) | ||
1448 | audit_syscall_entry(AUDIT_ARCH_I386, regs->orig_ax, | ||
1449 | regs->bx, regs->cx, regs->dx, regs->si); | ||
1450 | if (ret == 0) | ||
1451 | return 0; | ||
1452 | |||
1453 | regs->orig_ax = -1; /* force skip of syscall restarting */ | ||
1454 | if (unlikely(current->audit_context)) | ||
1455 | audit_syscall_exit(AUDITSC_RESULT(regs->ax), regs->ax); | ||
1456 | return 1; | ||
1457 | } | ||
1458 | |||
1459 | #else /* CONFIG_X86_64 */ | ||
1460 | |||
1461 | static void syscall_trace(struct pt_regs *regs) | 1378 | static void syscall_trace(struct pt_regs *regs) |
1462 | { | 1379 | { |
1380 | if (!(current->ptrace & PT_PTRACED)) | ||
1381 | return; | ||
1463 | 1382 | ||
1464 | #if 0 | 1383 | #if 0 |
1465 | printk("trace %s ip %lx sp %lx ax %d origrax %d caller %lx tiflags %x ptrace %x\n", | 1384 | printk("trace %s ip %lx sp %lx ax %d origrax %d caller %lx tiflags %x ptrace %x\n", |
@@ -1481,39 +1400,81 @@ static void syscall_trace(struct pt_regs *regs) | |||
1481 | } | 1400 | } |
1482 | } | 1401 | } |
1483 | 1402 | ||
1484 | asmlinkage void syscall_trace_enter(struct pt_regs *regs) | 1403 | #ifdef CONFIG_X86_32 |
1404 | # define IS_IA32 1 | ||
1405 | #elif defined CONFIG_IA32_EMULATION | ||
1406 | # define IS_IA32 test_thread_flag(TIF_IA32) | ||
1407 | #else | ||
1408 | # define IS_IA32 0 | ||
1409 | #endif | ||
1410 | |||
1411 | /* | ||
1412 | * We must return the syscall number to actually look up in the table. | ||
1413 | * This can be -1L to skip running any syscall at all. | ||
1414 | */ | ||
1415 | asmregparm long syscall_trace_enter(struct pt_regs *regs) | ||
1485 | { | 1416 | { |
1417 | long ret = 0; | ||
1418 | |||
1419 | /* | ||
1420 | * If we stepped into a sysenter/syscall insn, it trapped in | ||
1421 | * kernel mode; do_debug() cleared TF and set TIF_SINGLESTEP. | ||
1422 | * If user-mode had set TF itself, then it's still clear from | ||
1423 | * do_debug() and we need to set it again to restore the user | ||
1424 | * state. If we entered on the slow path, TF was already set. | ||
1425 | */ | ||
1426 | if (test_thread_flag(TIF_SINGLESTEP)) | ||
1427 | regs->flags |= X86_EFLAGS_TF; | ||
1428 | |||
1486 | /* do the secure computing check first */ | 1429 | /* do the secure computing check first */ |
1487 | secure_computing(regs->orig_ax); | 1430 | secure_computing(regs->orig_ax); |
1488 | 1431 | ||
1489 | if (test_thread_flag(TIF_SYSCALL_TRACE) | 1432 | if (unlikely(test_thread_flag(TIF_SYSCALL_EMU))) |
1490 | && (current->ptrace & PT_PTRACED)) | 1433 | ret = -1L; |
1434 | |||
1435 | if (ret || test_thread_flag(TIF_SYSCALL_TRACE)) | ||
1491 | syscall_trace(regs); | 1436 | syscall_trace(regs); |
1492 | 1437 | ||
1493 | if (unlikely(current->audit_context)) { | 1438 | if (unlikely(current->audit_context)) { |
1494 | if (test_thread_flag(TIF_IA32)) { | 1439 | if (IS_IA32) |
1495 | audit_syscall_entry(AUDIT_ARCH_I386, | 1440 | audit_syscall_entry(AUDIT_ARCH_I386, |
1496 | regs->orig_ax, | 1441 | regs->orig_ax, |
1497 | regs->bx, regs->cx, | 1442 | regs->bx, regs->cx, |
1498 | regs->dx, regs->si); | 1443 | regs->dx, regs->si); |
1499 | } else { | 1444 | #ifdef CONFIG_X86_64 |
1445 | else | ||
1500 | audit_syscall_entry(AUDIT_ARCH_X86_64, | 1446 | audit_syscall_entry(AUDIT_ARCH_X86_64, |
1501 | regs->orig_ax, | 1447 | regs->orig_ax, |
1502 | regs->di, regs->si, | 1448 | regs->di, regs->si, |
1503 | regs->dx, regs->r10); | 1449 | regs->dx, regs->r10); |
1504 | } | 1450 | #endif |
1505 | } | 1451 | } |
1452 | |||
1453 | return ret ?: regs->orig_ax; | ||
1506 | } | 1454 | } |
1507 | 1455 | ||
1508 | asmlinkage void syscall_trace_leave(struct pt_regs *regs) | 1456 | asmregparm void syscall_trace_leave(struct pt_regs *regs) |
1509 | { | 1457 | { |
1510 | if (unlikely(current->audit_context)) | 1458 | if (unlikely(current->audit_context)) |
1511 | audit_syscall_exit(AUDITSC_RESULT(regs->ax), regs->ax); | 1459 | audit_syscall_exit(AUDITSC_RESULT(regs->ax), regs->ax); |
1512 | 1460 | ||
1513 | if ((test_thread_flag(TIF_SYSCALL_TRACE) | 1461 | if (test_thread_flag(TIF_SYSCALL_TRACE)) |
1514 | || test_thread_flag(TIF_SINGLESTEP)) | ||
1515 | && (current->ptrace & PT_PTRACED)) | ||
1516 | syscall_trace(regs); | 1462 | syscall_trace(regs); |
1517 | } | ||
1518 | 1463 | ||
1519 | #endif /* CONFIG_X86_32 */ | 1464 | /* |
1465 | * If TIF_SYSCALL_EMU is set, we only get here because of | ||
1466 | * TIF_SINGLESTEP (i.e. this is PTRACE_SYSEMU_SINGLESTEP). | ||
1467 | * We already reported this syscall instruction in | ||
1468 | * syscall_trace_enter(), so don't do any more now. | ||
1469 | */ | ||
1470 | if (unlikely(test_thread_flag(TIF_SYSCALL_EMU))) | ||
1471 | return; | ||
1472 | |||
1473 | /* | ||
1474 | * If we are single-stepping, synthesize a trap to follow the | ||
1475 | * system call instruction. | ||
1476 | */ | ||
1477 | if (test_thread_flag(TIF_SINGLESTEP) && | ||
1478 | (current->ptrace & PT_PTRACED)) | ||
1479 | send_sigtrap(current, regs, 0); | ||
1480 | } | ||
diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c index f8a62160e151..9dcf39c02972 100644 --- a/arch/x86/kernel/reboot.c +++ b/arch/x86/kernel/reboot.c | |||
@@ -177,6 +177,14 @@ static struct dmi_system_id __initdata reboot_dmi_table[] = { | |||
177 | DMI_MATCH(DMI_PRODUCT_NAME, "PowerEdge 2400"), | 177 | DMI_MATCH(DMI_PRODUCT_NAME, "PowerEdge 2400"), |
178 | }, | 178 | }, |
179 | }, | 179 | }, |
180 | { /* Handle problems with rebooting on Dell T5400's */ | ||
181 | .callback = set_bios_reboot, | ||
182 | .ident = "Dell Precision T5400", | ||
183 | .matches = { | ||
184 | DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), | ||
185 | DMI_MATCH(DMI_PRODUCT_NAME, "Precision WorkStation T5400"), | ||
186 | }, | ||
187 | }, | ||
180 | { /* Handle problems with rebooting on HP laptops */ | 188 | { /* Handle problems with rebooting on HP laptops */ |
181 | .callback = set_bios_reboot, | 189 | .callback = set_bios_reboot, |
182 | .ident = "HP Compaq Laptop", | 190 | .ident = "HP Compaq Laptop", |
diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index 531b55b8e81a..b4aacb9f52e3 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c | |||
@@ -57,12 +57,8 @@ | |||
57 | #include <linux/slab.h> | 57 | #include <linux/slab.h> |
58 | #include <linux/user.h> | 58 | #include <linux/user.h> |
59 | #include <linux/delay.h> | 59 | #include <linux/delay.h> |
60 | #include <linux/highmem.h> | ||
61 | 60 | ||
62 | #include <linux/kallsyms.h> | 61 | #include <linux/kallsyms.h> |
63 | #include <linux/edd.h> | ||
64 | #include <linux/iscsi_ibft.h> | ||
65 | #include <linux/kexec.h> | ||
66 | #include <linux/cpufreq.h> | 62 | #include <linux/cpufreq.h> |
67 | #include <linux/dma-mapping.h> | 63 | #include <linux/dma-mapping.h> |
68 | #include <linux/ctype.h> | 64 | #include <linux/ctype.h> |
@@ -96,7 +92,7 @@ | |||
96 | #include <asm/smp.h> | 92 | #include <asm/smp.h> |
97 | #include <asm/desc.h> | 93 | #include <asm/desc.h> |
98 | #include <asm/dma.h> | 94 | #include <asm/dma.h> |
99 | #include <asm/gart.h> | 95 | #include <asm/iommu.h> |
100 | #include <asm/mmu_context.h> | 96 | #include <asm/mmu_context.h> |
101 | #include <asm/proto.h> | 97 | #include <asm/proto.h> |
102 | 98 | ||
@@ -104,7 +100,6 @@ | |||
104 | #include <asm/paravirt.h> | 100 | #include <asm/paravirt.h> |
105 | 101 | ||
106 | #include <asm/percpu.h> | 102 | #include <asm/percpu.h> |
107 | #include <asm/sections.h> | ||
108 | #include <asm/topology.h> | 103 | #include <asm/topology.h> |
109 | #include <asm/apicdef.h> | 104 | #include <asm/apicdef.h> |
110 | #ifdef CONFIG_X86_64 | 105 | #ifdef CONFIG_X86_64 |
@@ -579,6 +574,10 @@ static int __init setup_elfcorehdr(char *arg) | |||
579 | early_param("elfcorehdr", setup_elfcorehdr); | 574 | early_param("elfcorehdr", setup_elfcorehdr); |
580 | #endif | 575 | #endif |
581 | 576 | ||
577 | static struct x86_quirks default_x86_quirks __initdata; | ||
578 | |||
579 | struct x86_quirks *x86_quirks __initdata = &default_x86_quirks; | ||
580 | |||
582 | /* | 581 | /* |
583 | * Determine if we were loaded by an EFI loader. If so, then we have also been | 582 | * Determine if we were loaded by an EFI loader. If so, then we have also been |
584 | * passed the efi memmap, systab, etc., so we should use these data structures | 583 | * passed the efi memmap, systab, etc., so we should use these data structures |
@@ -681,7 +680,7 @@ void __init setup_arch(char **cmdline_p) | |||
681 | #ifdef CONFIG_X86_LOCAL_APIC | 680 | #ifdef CONFIG_X86_LOCAL_APIC |
682 | disable_apic = 1; | 681 | disable_apic = 1; |
683 | #endif | 682 | #endif |
684 | clear_cpu_cap(&boot_cpu_data, X86_FEATURE_APIC); | 683 | setup_clear_cpu_cap(X86_FEATURE_APIC); |
685 | } | 684 | } |
686 | 685 | ||
687 | #ifdef CONFIG_PCI | 686 | #ifdef CONFIG_PCI |
@@ -824,7 +823,10 @@ void __init setup_arch(char **cmdline_p) | |||
824 | vmi_init(); | 823 | vmi_init(); |
825 | #endif | 824 | #endif |
826 | 825 | ||
826 | paravirt_pagetable_setup_start(swapper_pg_dir); | ||
827 | paging_init(); | 827 | paging_init(); |
828 | paravirt_pagetable_setup_done(swapper_pg_dir); | ||
829 | paravirt_post_allocator_init(); | ||
828 | 830 | ||
829 | #ifdef CONFIG_X86_64 | 831 | #ifdef CONFIG_X86_64 |
830 | map_vsyscall(); | 832 | map_vsyscall(); |
@@ -854,14 +856,6 @@ void __init setup_arch(char **cmdline_p) | |||
854 | init_cpu_to_node(); | 856 | init_cpu_to_node(); |
855 | #endif | 857 | #endif |
856 | 858 | ||
857 | #ifdef CONFIG_X86_NUMAQ | ||
858 | /* | ||
859 | * need to check online nodes num, call it | ||
860 | * here before time_init/tsc_init | ||
861 | */ | ||
862 | numaq_tsc_disable(); | ||
863 | #endif | ||
864 | |||
865 | init_apic_mappings(); | 859 | init_apic_mappings(); |
866 | ioapic_init_mappings(); | 860 | ioapic_init_mappings(); |
867 | 861 | ||
diff --git a/arch/x86/kernel/setup_percpu.c b/arch/x86/kernel/setup_percpu.c index cac68430d31f..f7745f94c006 100644 --- a/arch/x86/kernel/setup_percpu.c +++ b/arch/x86/kernel/setup_percpu.c | |||
@@ -227,8 +227,8 @@ static void __init setup_node_to_cpumask_map(void) | |||
227 | /* allocate the map */ | 227 | /* allocate the map */ |
228 | map = alloc_bootmem_low(nr_node_ids * sizeof(cpumask_t)); | 228 | map = alloc_bootmem_low(nr_node_ids * sizeof(cpumask_t)); |
229 | 229 | ||
230 | Dprintk(KERN_DEBUG "Node to cpumask map at %p for %d nodes\n", | 230 | pr_debug(KERN_DEBUG "Node to cpumask map at %p for %d nodes\n", |
231 | map, nr_node_ids); | 231 | map, nr_node_ids); |
232 | 232 | ||
233 | /* node_to_cpumask() will now work */ | 233 | /* node_to_cpumask() will now work */ |
234 | node_to_cpumask_map = map; | 234 | node_to_cpumask_map = map; |
@@ -248,7 +248,7 @@ void __cpuinit numa_set_node(int cpu, int node) | |||
248 | per_cpu(x86_cpu_to_node_map, cpu) = node; | 248 | per_cpu(x86_cpu_to_node_map, cpu) = node; |
249 | 249 | ||
250 | else | 250 | else |
251 | Dprintk(KERN_INFO "Setting node for non-present cpu %d\n", cpu); | 251 | pr_debug("Setting node for non-present cpu %d\n", cpu); |
252 | } | 252 | } |
253 | 253 | ||
254 | void __cpuinit numa_clear_node(int cpu) | 254 | void __cpuinit numa_clear_node(int cpu) |
diff --git a/arch/x86/kernel/signal_32.c b/arch/x86/kernel/signal_32.c index d92373630963..07faaa5109cb 100644 --- a/arch/x86/kernel/signal_32.c +++ b/arch/x86/kernel/signal_32.c | |||
@@ -212,7 +212,7 @@ asmlinkage unsigned long sys_sigreturn(unsigned long __unused) | |||
212 | 212 | ||
213 | badframe: | 213 | badframe: |
214 | if (show_unhandled_signals && printk_ratelimit()) { | 214 | if (show_unhandled_signals && printk_ratelimit()) { |
215 | printk(KERN_INFO "%s%s[%d] bad frame in sigreturn frame:" | 215 | printk("%s%s[%d] bad frame in sigreturn frame:" |
216 | "%p ip:%lx sp:%lx oeax:%lx", | 216 | "%p ip:%lx sp:%lx oeax:%lx", |
217 | task_pid_nr(current) > 1 ? KERN_INFO : KERN_EMERG, | 217 | task_pid_nr(current) > 1 ? KERN_INFO : KERN_EMERG, |
218 | current->comm, task_pid_nr(current), frame, regs->ip, | 218 | current->comm, task_pid_nr(current), frame, regs->ip, |
@@ -657,12 +657,6 @@ static void do_signal(struct pt_regs *regs) | |||
657 | void | 657 | void |
658 | do_notify_resume(struct pt_regs *regs, void *unused, __u32 thread_info_flags) | 658 | do_notify_resume(struct pt_regs *regs, void *unused, __u32 thread_info_flags) |
659 | { | 659 | { |
660 | /* Pending single-step? */ | ||
661 | if (thread_info_flags & _TIF_SINGLESTEP) { | ||
662 | regs->flags |= X86_EFLAGS_TF; | ||
663 | clear_thread_flag(TIF_SINGLESTEP); | ||
664 | } | ||
665 | |||
666 | /* deal with pending signal delivery */ | 660 | /* deal with pending signal delivery */ |
667 | if (thread_info_flags & _TIF_SIGPENDING) | 661 | if (thread_info_flags & _TIF_SIGPENDING) |
668 | do_signal(regs); | 662 | do_signal(regs); |
diff --git a/arch/x86/kernel/signal_64.c b/arch/x86/kernel/signal_64.c index e53b267662e7..bf87684474f1 100644 --- a/arch/x86/kernel/signal_64.c +++ b/arch/x86/kernel/signal_64.c | |||
@@ -487,12 +487,6 @@ static void do_signal(struct pt_regs *regs) | |||
487 | void do_notify_resume(struct pt_regs *regs, void *unused, | 487 | void do_notify_resume(struct pt_regs *regs, void *unused, |
488 | __u32 thread_info_flags) | 488 | __u32 thread_info_flags) |
489 | { | 489 | { |
490 | /* Pending single-step? */ | ||
491 | if (thread_info_flags & _TIF_SINGLESTEP) { | ||
492 | regs->flags |= X86_EFLAGS_TF; | ||
493 | clear_thread_flag(TIF_SINGLESTEP); | ||
494 | } | ||
495 | |||
496 | #ifdef CONFIG_X86_MCE | 490 | #ifdef CONFIG_X86_MCE |
497 | /* notify userspace of pending MCEs */ | 491 | /* notify userspace of pending MCEs */ |
498 | if (thread_info_flags & _TIF_MCE_NOTIFY) | 492 | if (thread_info_flags & _TIF_MCE_NOTIFY) |
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index 687376ab07e8..4b53a647bc0a 100644 --- a/arch/x86/kernel/smpboot.c +++ b/arch/x86/kernel/smpboot.c | |||
@@ -216,7 +216,7 @@ static void __cpuinit smp_callin(void) | |||
216 | panic("%s: phys CPU#%d, CPU#%d already present??\n", __func__, | 216 | panic("%s: phys CPU#%d, CPU#%d already present??\n", __func__, |
217 | phys_id, cpuid); | 217 | phys_id, cpuid); |
218 | } | 218 | } |
219 | Dprintk("CPU#%d (phys ID: %d) waiting for CALLOUT\n", cpuid, phys_id); | 219 | pr_debug("CPU#%d (phys ID: %d) waiting for CALLOUT\n", cpuid, phys_id); |
220 | 220 | ||
221 | /* | 221 | /* |
222 | * STARTUP IPIs are fragile beasts as they might sometimes | 222 | * STARTUP IPIs are fragile beasts as they might sometimes |
@@ -251,7 +251,7 @@ static void __cpuinit smp_callin(void) | |||
251 | * boards) | 251 | * boards) |
252 | */ | 252 | */ |
253 | 253 | ||
254 | Dprintk("CALLIN, before setup_local_APIC().\n"); | 254 | pr_debug("CALLIN, before setup_local_APIC().\n"); |
255 | smp_callin_clear_local_apic(); | 255 | smp_callin_clear_local_apic(); |
256 | setup_local_APIC(); | 256 | setup_local_APIC(); |
257 | end_local_APIC_setup(); | 257 | end_local_APIC_setup(); |
@@ -266,7 +266,7 @@ static void __cpuinit smp_callin(void) | |||
266 | local_irq_enable(); | 266 | local_irq_enable(); |
267 | calibrate_delay(); | 267 | calibrate_delay(); |
268 | local_irq_disable(); | 268 | local_irq_disable(); |
269 | Dprintk("Stack at about %p\n", &cpuid); | 269 | pr_debug("Stack at about %p\n", &cpuid); |
270 | 270 | ||
271 | /* | 271 | /* |
272 | * Save our processor parameters | 272 | * Save our processor parameters |
@@ -513,7 +513,7 @@ static void impress_friends(void) | |||
513 | /* | 513 | /* |
514 | * Allow the user to impress friends. | 514 | * Allow the user to impress friends. |
515 | */ | 515 | */ |
516 | Dprintk("Before bogomips.\n"); | 516 | pr_debug("Before bogomips.\n"); |
517 | for_each_possible_cpu(cpu) | 517 | for_each_possible_cpu(cpu) |
518 | if (cpu_isset(cpu, cpu_callout_map)) | 518 | if (cpu_isset(cpu, cpu_callout_map)) |
519 | bogosum += cpu_data(cpu).loops_per_jiffy; | 519 | bogosum += cpu_data(cpu).loops_per_jiffy; |
@@ -523,7 +523,7 @@ static void impress_friends(void) | |||
523 | bogosum/(500000/HZ), | 523 | bogosum/(500000/HZ), |
524 | (bogosum/(5000/HZ))%100); | 524 | (bogosum/(5000/HZ))%100); |
525 | 525 | ||
526 | Dprintk("Before bogocount - setting activated=1.\n"); | 526 | pr_debug("Before bogocount - setting activated=1.\n"); |
527 | } | 527 | } |
528 | 528 | ||
529 | static inline void __inquire_remote_apic(int apicid) | 529 | static inline void __inquire_remote_apic(int apicid) |
@@ -546,8 +546,8 @@ static inline void __inquire_remote_apic(int apicid) | |||
546 | printk(KERN_CONT | 546 | printk(KERN_CONT |
547 | "a previous APIC delivery may have failed\n"); | 547 | "a previous APIC delivery may have failed\n"); |
548 | 548 | ||
549 | apic_write_around(APIC_ICR2, SET_APIC_DEST_FIELD(apicid)); | 549 | apic_write(APIC_ICR2, SET_APIC_DEST_FIELD(apicid)); |
550 | apic_write_around(APIC_ICR, APIC_DM_REMRD | regs[i]); | 550 | apic_write(APIC_ICR, APIC_DM_REMRD | regs[i]); |
551 | 551 | ||
552 | timeout = 0; | 552 | timeout = 0; |
553 | do { | 553 | do { |
@@ -579,29 +579,24 @@ wakeup_secondary_cpu(int logical_apicid, unsigned long start_eip) | |||
579 | int maxlvt; | 579 | int maxlvt; |
580 | 580 | ||
581 | /* Target chip */ | 581 | /* Target chip */ |
582 | apic_write_around(APIC_ICR2, SET_APIC_DEST_FIELD(logical_apicid)); | 582 | apic_write(APIC_ICR2, SET_APIC_DEST_FIELD(logical_apicid)); |
583 | 583 | ||
584 | /* Boot on the stack */ | 584 | /* Boot on the stack */ |
585 | /* Kick the second */ | 585 | /* Kick the second */ |
586 | apic_write_around(APIC_ICR, APIC_DM_NMI | APIC_DEST_LOGICAL); | 586 | apic_write(APIC_ICR, APIC_DM_NMI | APIC_DEST_LOGICAL); |
587 | 587 | ||
588 | Dprintk("Waiting for send to finish...\n"); | 588 | pr_debug("Waiting for send to finish...\n"); |
589 | send_status = safe_apic_wait_icr_idle(); | 589 | send_status = safe_apic_wait_icr_idle(); |
590 | 590 | ||
591 | /* | 591 | /* |
592 | * Give the other CPU some time to accept the IPI. | 592 | * Give the other CPU some time to accept the IPI. |
593 | */ | 593 | */ |
594 | udelay(200); | 594 | udelay(200); |
595 | /* | ||
596 | * Due to the Pentium erratum 3AP. | ||
597 | */ | ||
598 | maxlvt = lapic_get_maxlvt(); | 595 | maxlvt = lapic_get_maxlvt(); |
599 | if (maxlvt > 3) { | 596 | if (maxlvt > 3) /* Due to the Pentium erratum 3AP. */ |
600 | apic_read_around(APIC_SPIV); | ||
601 | apic_write(APIC_ESR, 0); | 597 | apic_write(APIC_ESR, 0); |
602 | } | ||
603 | accept_status = (apic_read(APIC_ESR) & 0xEF); | 598 | accept_status = (apic_read(APIC_ESR) & 0xEF); |
604 | Dprintk("NMI sent.\n"); | 599 | pr_debug("NMI sent.\n"); |
605 | 600 | ||
606 | if (send_status) | 601 | if (send_status) |
607 | printk(KERN_ERR "APIC never delivered???\n"); | 602 | printk(KERN_ERR "APIC never delivered???\n"); |
@@ -625,42 +620,44 @@ wakeup_secondary_cpu(int phys_apicid, unsigned long start_eip) | |||
625 | return send_status; | 620 | return send_status; |
626 | } | 621 | } |
627 | 622 | ||
623 | maxlvt = lapic_get_maxlvt(); | ||
624 | |||
628 | /* | 625 | /* |
629 | * Be paranoid about clearing APIC errors. | 626 | * Be paranoid about clearing APIC errors. |
630 | */ | 627 | */ |
631 | if (APIC_INTEGRATED(apic_version[phys_apicid])) { | 628 | if (APIC_INTEGRATED(apic_version[phys_apicid])) { |
632 | apic_read_around(APIC_SPIV); | 629 | if (maxlvt > 3) /* Due to the Pentium erratum 3AP. */ |
633 | apic_write(APIC_ESR, 0); | 630 | apic_write(APIC_ESR, 0); |
634 | apic_read(APIC_ESR); | 631 | apic_read(APIC_ESR); |
635 | } | 632 | } |
636 | 633 | ||
637 | Dprintk("Asserting INIT.\n"); | 634 | pr_debug("Asserting INIT.\n"); |
638 | 635 | ||
639 | /* | 636 | /* |
640 | * Turn INIT on target chip | 637 | * Turn INIT on target chip |
641 | */ | 638 | */ |
642 | apic_write_around(APIC_ICR2, SET_APIC_DEST_FIELD(phys_apicid)); | 639 | apic_write(APIC_ICR2, SET_APIC_DEST_FIELD(phys_apicid)); |
643 | 640 | ||
644 | /* | 641 | /* |
645 | * Send IPI | 642 | * Send IPI |
646 | */ | 643 | */ |
647 | apic_write_around(APIC_ICR, APIC_INT_LEVELTRIG | APIC_INT_ASSERT | 644 | apic_write(APIC_ICR, |
648 | | APIC_DM_INIT); | 645 | APIC_INT_LEVELTRIG | APIC_INT_ASSERT | APIC_DM_INIT); |
649 | 646 | ||
650 | Dprintk("Waiting for send to finish...\n"); | 647 | pr_debug("Waiting for send to finish...\n"); |
651 | send_status = safe_apic_wait_icr_idle(); | 648 | send_status = safe_apic_wait_icr_idle(); |
652 | 649 | ||
653 | mdelay(10); | 650 | mdelay(10); |
654 | 651 | ||
655 | Dprintk("Deasserting INIT.\n"); | 652 | pr_debug("Deasserting INIT.\n"); |
656 | 653 | ||
657 | /* Target chip */ | 654 | /* Target chip */ |
658 | apic_write_around(APIC_ICR2, SET_APIC_DEST_FIELD(phys_apicid)); | 655 | apic_write(APIC_ICR2, SET_APIC_DEST_FIELD(phys_apicid)); |
659 | 656 | ||
660 | /* Send IPI */ | 657 | /* Send IPI */ |
661 | apic_write_around(APIC_ICR, APIC_INT_LEVELTRIG | APIC_DM_INIT); | 658 | apic_write(APIC_ICR, APIC_INT_LEVELTRIG | APIC_DM_INIT); |
662 | 659 | ||
663 | Dprintk("Waiting for send to finish...\n"); | 660 | pr_debug("Waiting for send to finish...\n"); |
664 | send_status = safe_apic_wait_icr_idle(); | 661 | send_status = safe_apic_wait_icr_idle(); |
665 | 662 | ||
666 | mb(); | 663 | mb(); |
@@ -687,55 +684,47 @@ wakeup_secondary_cpu(int phys_apicid, unsigned long start_eip) | |||
687 | /* | 684 | /* |
688 | * Run STARTUP IPI loop. | 685 | * Run STARTUP IPI loop. |
689 | */ | 686 | */ |
690 | Dprintk("#startup loops: %d.\n", num_starts); | 687 | pr_debug("#startup loops: %d.\n", num_starts); |
691 | |||
692 | maxlvt = lapic_get_maxlvt(); | ||
693 | 688 | ||
694 | for (j = 1; j <= num_starts; j++) { | 689 | for (j = 1; j <= num_starts; j++) { |
695 | Dprintk("Sending STARTUP #%d.\n", j); | 690 | pr_debug("Sending STARTUP #%d.\n", j); |
696 | apic_read_around(APIC_SPIV); | 691 | if (maxlvt > 3) /* Due to the Pentium erratum 3AP. */ |
697 | apic_write(APIC_ESR, 0); | 692 | apic_write(APIC_ESR, 0); |
698 | apic_read(APIC_ESR); | 693 | apic_read(APIC_ESR); |
699 | Dprintk("After apic_write.\n"); | 694 | pr_debug("After apic_write.\n"); |
700 | 695 | ||
701 | /* | 696 | /* |
702 | * STARTUP IPI | 697 | * STARTUP IPI |
703 | */ | 698 | */ |
704 | 699 | ||
705 | /* Target chip */ | 700 | /* Target chip */ |
706 | apic_write_around(APIC_ICR2, SET_APIC_DEST_FIELD(phys_apicid)); | 701 | apic_write(APIC_ICR2, SET_APIC_DEST_FIELD(phys_apicid)); |
707 | 702 | ||
708 | /* Boot on the stack */ | 703 | /* Boot on the stack */ |
709 | /* Kick the second */ | 704 | /* Kick the second */ |
710 | apic_write_around(APIC_ICR, APIC_DM_STARTUP | 705 | apic_write(APIC_ICR, APIC_DM_STARTUP | (start_eip >> 12)); |
711 | | (start_eip >> 12)); | ||
712 | 706 | ||
713 | /* | 707 | /* |
714 | * Give the other CPU some time to accept the IPI. | 708 | * Give the other CPU some time to accept the IPI. |
715 | */ | 709 | */ |
716 | udelay(300); | 710 | udelay(300); |
717 | 711 | ||
718 | Dprintk("Startup point 1.\n"); | 712 | pr_debug("Startup point 1.\n"); |
719 | 713 | ||
720 | Dprintk("Waiting for send to finish...\n"); | 714 | pr_debug("Waiting for send to finish...\n"); |
721 | send_status = safe_apic_wait_icr_idle(); | 715 | send_status = safe_apic_wait_icr_idle(); |
722 | 716 | ||
723 | /* | 717 | /* |
724 | * Give the other CPU some time to accept the IPI. | 718 | * Give the other CPU some time to accept the IPI. |
725 | */ | 719 | */ |
726 | udelay(200); | 720 | udelay(200); |
727 | /* | 721 | if (maxlvt > 3) /* Due to the Pentium erratum 3AP. */ |
728 | * Due to the Pentium erratum 3AP. | ||
729 | */ | ||
730 | if (maxlvt > 3) { | ||
731 | apic_read_around(APIC_SPIV); | ||
732 | apic_write(APIC_ESR, 0); | 722 | apic_write(APIC_ESR, 0); |
733 | } | ||
734 | accept_status = (apic_read(APIC_ESR) & 0xEF); | 723 | accept_status = (apic_read(APIC_ESR) & 0xEF); |
735 | if (send_status || accept_status) | 724 | if (send_status || accept_status) |
736 | break; | 725 | break; |
737 | } | 726 | } |
738 | Dprintk("After Startup.\n"); | 727 | pr_debug("After Startup.\n"); |
739 | 728 | ||
740 | if (send_status) | 729 | if (send_status) |
741 | printk(KERN_ERR "APIC never delivered???\n"); | 730 | printk(KERN_ERR "APIC never delivered???\n"); |
@@ -768,7 +757,7 @@ static void __cpuinit do_fork_idle(struct work_struct *work) | |||
768 | * | 757 | * |
769 | * Must be called after the _cpu_pda pointer table is initialized. | 758 | * Must be called after the _cpu_pda pointer table is initialized. |
770 | */ | 759 | */ |
771 | static int __cpuinit get_local_pda(int cpu) | 760 | int __cpuinit get_local_pda(int cpu) |
772 | { | 761 | { |
773 | struct x8664_pda *oldpda, *newpda; | 762 | struct x8664_pda *oldpda, *newpda; |
774 | unsigned long size = sizeof(struct x8664_pda); | 763 | unsigned long size = sizeof(struct x8664_pda); |
@@ -886,7 +875,7 @@ do_rest: | |||
886 | 875 | ||
887 | if (get_uv_system_type() != UV_NON_UNIQUE_APIC) { | 876 | if (get_uv_system_type() != UV_NON_UNIQUE_APIC) { |
888 | 877 | ||
889 | Dprintk("Setting warm reset code and vector.\n"); | 878 | pr_debug("Setting warm reset code and vector.\n"); |
890 | 879 | ||
891 | store_NMI_vector(&nmi_high, &nmi_low); | 880 | store_NMI_vector(&nmi_high, &nmi_low); |
892 | 881 | ||
@@ -907,9 +896,9 @@ do_rest: | |||
907 | /* | 896 | /* |
908 | * allow APs to start initializing. | 897 | * allow APs to start initializing. |
909 | */ | 898 | */ |
910 | Dprintk("Before Callout %d.\n", cpu); | 899 | pr_debug("Before Callout %d.\n", cpu); |
911 | cpu_set(cpu, cpu_callout_map); | 900 | cpu_set(cpu, cpu_callout_map); |
912 | Dprintk("After Callout %d.\n", cpu); | 901 | pr_debug("After Callout %d.\n", cpu); |
913 | 902 | ||
914 | /* | 903 | /* |
915 | * Wait 5s total for a response | 904 | * Wait 5s total for a response |
@@ -922,10 +911,10 @@ do_rest: | |||
922 | 911 | ||
923 | if (cpu_isset(cpu, cpu_callin_map)) { | 912 | if (cpu_isset(cpu, cpu_callin_map)) { |
924 | /* number CPUs logically, starting from 1 (BSP is 0) */ | 913 | /* number CPUs logically, starting from 1 (BSP is 0) */ |
925 | Dprintk("OK.\n"); | 914 | pr_debug("OK.\n"); |
926 | printk(KERN_INFO "CPU%d: ", cpu); | 915 | printk(KERN_INFO "CPU%d: ", cpu); |
927 | print_cpu_info(&cpu_data(cpu)); | 916 | print_cpu_info(&cpu_data(cpu)); |
928 | Dprintk("CPU has booted.\n"); | 917 | pr_debug("CPU has booted.\n"); |
929 | } else { | 918 | } else { |
930 | boot_error = 1; | 919 | boot_error = 1; |
931 | if (*((volatile unsigned char *)trampoline_base) | 920 | if (*((volatile unsigned char *)trampoline_base) |
@@ -970,7 +959,7 @@ int __cpuinit native_cpu_up(unsigned int cpu) | |||
970 | 959 | ||
971 | WARN_ON(irqs_disabled()); | 960 | WARN_ON(irqs_disabled()); |
972 | 961 | ||
973 | Dprintk("++++++++++++++++++++=_---CPU UP %u\n", cpu); | 962 | pr_debug("++++++++++++++++++++=_---CPU UP %u\n", cpu); |
974 | 963 | ||
975 | if (apicid == BAD_APICID || apicid == boot_cpu_physical_apicid || | 964 | if (apicid == BAD_APICID || apicid == boot_cpu_physical_apicid || |
976 | !physid_isset(apicid, phys_cpu_present_map)) { | 965 | !physid_isset(apicid, phys_cpu_present_map)) { |
@@ -982,7 +971,7 @@ int __cpuinit native_cpu_up(unsigned int cpu) | |||
982 | * Already booted CPU? | 971 | * Already booted CPU? |
983 | */ | 972 | */ |
984 | if (cpu_isset(cpu, cpu_callin_map)) { | 973 | if (cpu_isset(cpu, cpu_callin_map)) { |
985 | Dprintk("do_boot_cpu %d Already started\n", cpu); | 974 | pr_debug("do_boot_cpu %d Already started\n", cpu); |
986 | return -ENOSYS; | 975 | return -ENOSYS; |
987 | } | 976 | } |
988 | 977 | ||
@@ -1009,7 +998,7 @@ int __cpuinit native_cpu_up(unsigned int cpu) | |||
1009 | err = do_boot_cpu(apicid, cpu); | 998 | err = do_boot_cpu(apicid, cpu); |
1010 | #endif | 999 | #endif |
1011 | if (err) { | 1000 | if (err) { |
1012 | Dprintk("do_boot_cpu failed %d\n", err); | 1001 | pr_debug("do_boot_cpu failed %d\n", err); |
1013 | return -EIO; | 1002 | return -EIO; |
1014 | } | 1003 | } |
1015 | 1004 | ||
@@ -1213,7 +1202,7 @@ void __init native_smp_prepare_boot_cpu(void) | |||
1213 | 1202 | ||
1214 | void __init native_smp_cpus_done(unsigned int max_cpus) | 1203 | void __init native_smp_cpus_done(unsigned int max_cpus) |
1215 | { | 1204 | { |
1216 | Dprintk("Boot done.\n"); | 1205 | pr_debug("Boot done.\n"); |
1217 | 1206 | ||
1218 | impress_friends(); | 1207 | impress_friends(); |
1219 | smp_checks(); | 1208 | smp_checks(); |
@@ -1311,7 +1300,7 @@ static void __ref remove_cpu_from_maps(int cpu) | |||
1311 | cpu_clear(cpu, cpu_callout_map); | 1300 | cpu_clear(cpu, cpu_callout_map); |
1312 | cpu_clear(cpu, cpu_callin_map); | 1301 | cpu_clear(cpu, cpu_callin_map); |
1313 | /* was set by cpu_init() */ | 1302 | /* was set by cpu_init() */ |
1314 | clear_bit(cpu, (unsigned long *)&cpu_initialized); | 1303 | cpu_clear(cpu, cpu_initialized); |
1315 | numa_remove_cpu(cpu); | 1304 | numa_remove_cpu(cpu); |
1316 | } | 1305 | } |
1317 | 1306 | ||
@@ -1390,7 +1379,8 @@ static int __init parse_maxcpus(char *arg) | |||
1390 | { | 1379 | { |
1391 | extern unsigned int maxcpus; | 1380 | extern unsigned int maxcpus; |
1392 | 1381 | ||
1393 | maxcpus = simple_strtoul(arg, NULL, 0); | 1382 | if (arg) |
1383 | maxcpus = simple_strtoul(arg, NULL, 0); | ||
1394 | return 0; | 1384 | return 0; |
1395 | } | 1385 | } |
1396 | early_param("maxcpus", parse_maxcpus); | 1386 | early_param("maxcpus", parse_maxcpus); |
diff --git a/arch/x86/kernel/smpcommon_32.c b/arch/x86/kernel/smpcommon_32.c deleted file mode 100644 index 8b137891791f..000000000000 --- a/arch/x86/kernel/smpcommon_32.c +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | |||
diff --git a/arch/x86/kernel/step.c b/arch/x86/kernel/step.c index 92c20fee6781..e8b9863ef8c4 100644 --- a/arch/x86/kernel/step.c +++ b/arch/x86/kernel/step.c | |||
@@ -105,6 +105,20 @@ static int is_setting_trap_flag(struct task_struct *child, struct pt_regs *regs) | |||
105 | static int enable_single_step(struct task_struct *child) | 105 | static int enable_single_step(struct task_struct *child) |
106 | { | 106 | { |
107 | struct pt_regs *regs = task_pt_regs(child); | 107 | struct pt_regs *regs = task_pt_regs(child); |
108 | unsigned long oflags; | ||
109 | |||
110 | /* | ||
111 | * If we stepped into a sysenter/syscall insn, it trapped in | ||
112 | * kernel mode; do_debug() cleared TF and set TIF_SINGLESTEP. | ||
113 | * If user-mode had set TF itself, then it's still clear from | ||
114 | * do_debug() and we need to set it again to restore the user | ||
115 | * state so we don't wrongly set TIF_FORCED_TF below. | ||
116 | * If enable_single_step() was used last and that is what | ||
117 | * set TIF_SINGLESTEP, then both TF and TIF_FORCED_TF are | ||
118 | * already set and our bookkeeping is fine. | ||
119 | */ | ||
120 | if (unlikely(test_tsk_thread_flag(child, TIF_SINGLESTEP))) | ||
121 | regs->flags |= X86_EFLAGS_TF; | ||
108 | 122 | ||
109 | /* | 123 | /* |
110 | * Always set TIF_SINGLESTEP - this guarantees that | 124 | * Always set TIF_SINGLESTEP - this guarantees that |
@@ -113,11 +127,7 @@ static int enable_single_step(struct task_struct *child) | |||
113 | */ | 127 | */ |
114 | set_tsk_thread_flag(child, TIF_SINGLESTEP); | 128 | set_tsk_thread_flag(child, TIF_SINGLESTEP); |
115 | 129 | ||
116 | /* | 130 | oflags = regs->flags; |
117 | * If TF was already set, don't do anything else | ||
118 | */ | ||
119 | if (regs->flags & X86_EFLAGS_TF) | ||
120 | return 0; | ||
121 | 131 | ||
122 | /* Set TF on the kernel stack.. */ | 132 | /* Set TF on the kernel stack.. */ |
123 | regs->flags |= X86_EFLAGS_TF; | 133 | regs->flags |= X86_EFLAGS_TF; |
@@ -126,9 +136,22 @@ static int enable_single_step(struct task_struct *child) | |||
126 | * ..but if TF is changed by the instruction we will trace, | 136 | * ..but if TF is changed by the instruction we will trace, |
127 | * don't mark it as being "us" that set it, so that we | 137 | * don't mark it as being "us" that set it, so that we |
128 | * won't clear it by hand later. | 138 | * won't clear it by hand later. |
139 | * | ||
140 | * Note that if we don't actually execute the popf because | ||
141 | * of a signal arriving right now or suchlike, we will lose | ||
142 | * track of the fact that it really was "us" that set it. | ||
129 | */ | 143 | */ |
130 | if (is_setting_trap_flag(child, regs)) | 144 | if (is_setting_trap_flag(child, regs)) { |
145 | clear_tsk_thread_flag(child, TIF_FORCED_TF); | ||
131 | return 0; | 146 | return 0; |
147 | } | ||
148 | |||
149 | /* | ||
150 | * If TF was already set, check whether it was us who set it. | ||
151 | * If not, we should never attempt a block step. | ||
152 | */ | ||
153 | if (oflags & X86_EFLAGS_TF) | ||
154 | return test_tsk_thread_flag(child, TIF_FORCED_TF); | ||
132 | 155 | ||
133 | set_tsk_thread_flag(child, TIF_FORCED_TF); | 156 | set_tsk_thread_flag(child, TIF_FORCED_TF); |
134 | 157 | ||
diff --git a/arch/x86/kernel/time_32.c b/arch/x86/kernel/time_32.c index 059ca6ee59b4..ffe3c664afc0 100644 --- a/arch/x86/kernel/time_32.c +++ b/arch/x86/kernel/time_32.c | |||
@@ -129,6 +129,7 @@ void __init hpet_time_init(void) | |||
129 | */ | 129 | */ |
130 | void __init time_init(void) | 130 | void __init time_init(void) |
131 | { | 131 | { |
132 | pre_time_init_hook(); | ||
132 | tsc_init(); | 133 | tsc_init(); |
133 | late_time_init = choose_time_init(); | 134 | late_time_init = choose_time_init(); |
134 | } | 135 | } |
diff --git a/arch/x86/kernel/traps_32.c b/arch/x86/kernel/traps_32.c index 8a768973c4f0..03df8e45e5a1 100644 --- a/arch/x86/kernel/traps_32.c +++ b/arch/x86/kernel/traps_32.c | |||
@@ -58,6 +58,7 @@ | |||
58 | #include <asm/nmi.h> | 58 | #include <asm/nmi.h> |
59 | #include <asm/smp.h> | 59 | #include <asm/smp.h> |
60 | #include <asm/io.h> | 60 | #include <asm/io.h> |
61 | #include <asm/traps.h> | ||
61 | 62 | ||
62 | #include "mach_traps.h" | 63 | #include "mach_traps.h" |
63 | 64 | ||
@@ -77,26 +78,6 @@ char ignore_fpu_irq; | |||
77 | gate_desc idt_table[256] | 78 | gate_desc idt_table[256] |
78 | __attribute__((__section__(".data.idt"))) = { { { { 0, 0 } } }, }; | 79 | __attribute__((__section__(".data.idt"))) = { { { { 0, 0 } } }, }; |
79 | 80 | ||
80 | asmlinkage void divide_error(void); | ||
81 | asmlinkage void debug(void); | ||
82 | asmlinkage void nmi(void); | ||
83 | asmlinkage void int3(void); | ||
84 | asmlinkage void overflow(void); | ||
85 | asmlinkage void bounds(void); | ||
86 | asmlinkage void invalid_op(void); | ||
87 | asmlinkage void device_not_available(void); | ||
88 | asmlinkage void coprocessor_segment_overrun(void); | ||
89 | asmlinkage void invalid_TSS(void); | ||
90 | asmlinkage void segment_not_present(void); | ||
91 | asmlinkage void stack_segment(void); | ||
92 | asmlinkage void general_protection(void); | ||
93 | asmlinkage void page_fault(void); | ||
94 | asmlinkage void coprocessor_error(void); | ||
95 | asmlinkage void simd_coprocessor_error(void); | ||
96 | asmlinkage void alignment_check(void); | ||
97 | asmlinkage void spurious_interrupt_bug(void); | ||
98 | asmlinkage void machine_check(void); | ||
99 | |||
100 | int panic_on_unrecovered_nmi; | 81 | int panic_on_unrecovered_nmi; |
101 | int kstack_depth_to_print = 24; | 82 | int kstack_depth_to_print = 24; |
102 | static unsigned int code_bytes = 64; | 83 | static unsigned int code_bytes = 64; |
@@ -256,7 +237,7 @@ static const struct stacktrace_ops print_trace_ops = { | |||
256 | 237 | ||
257 | static void | 238 | static void |
258 | show_trace_log_lvl(struct task_struct *task, struct pt_regs *regs, | 239 | show_trace_log_lvl(struct task_struct *task, struct pt_regs *regs, |
259 | unsigned long *stack, unsigned long bp, char *log_lvl) | 240 | unsigned long *stack, unsigned long bp, char *log_lvl) |
260 | { | 241 | { |
261 | dump_trace(task, regs, stack, bp, &print_trace_ops, log_lvl); | 242 | dump_trace(task, regs, stack, bp, &print_trace_ops, log_lvl); |
262 | printk("%s =======================\n", log_lvl); | 243 | printk("%s =======================\n", log_lvl); |
@@ -383,6 +364,54 @@ int is_valid_bugaddr(unsigned long ip) | |||
383 | return ud2 == 0x0b0f; | 364 | return ud2 == 0x0b0f; |
384 | } | 365 | } |
385 | 366 | ||
367 | static raw_spinlock_t die_lock = __RAW_SPIN_LOCK_UNLOCKED; | ||
368 | static int die_owner = -1; | ||
369 | static unsigned int die_nest_count; | ||
370 | |||
371 | unsigned __kprobes long oops_begin(void) | ||
372 | { | ||
373 | unsigned long flags; | ||
374 | |||
375 | oops_enter(); | ||
376 | |||
377 | if (die_owner != raw_smp_processor_id()) { | ||
378 | console_verbose(); | ||
379 | raw_local_irq_save(flags); | ||
380 | __raw_spin_lock(&die_lock); | ||
381 | die_owner = smp_processor_id(); | ||
382 | die_nest_count = 0; | ||
383 | bust_spinlocks(1); | ||
384 | } else { | ||
385 | raw_local_irq_save(flags); | ||
386 | } | ||
387 | die_nest_count++; | ||
388 | return flags; | ||
389 | } | ||
390 | |||
391 | void __kprobes oops_end(unsigned long flags, struct pt_regs *regs, int signr) | ||
392 | { | ||
393 | bust_spinlocks(0); | ||
394 | die_owner = -1; | ||
395 | add_taint(TAINT_DIE); | ||
396 | __raw_spin_unlock(&die_lock); | ||
397 | raw_local_irq_restore(flags); | ||
398 | |||
399 | if (!regs) | ||
400 | return; | ||
401 | |||
402 | if (kexec_should_crash(current)) | ||
403 | crash_kexec(regs); | ||
404 | |||
405 | if (in_interrupt()) | ||
406 | panic("Fatal exception in interrupt"); | ||
407 | |||
408 | if (panic_on_oops) | ||
409 | panic("Fatal exception"); | ||
410 | |||
411 | oops_exit(); | ||
412 | do_exit(signr); | ||
413 | } | ||
414 | |||
386 | int __kprobes __die(const char *str, struct pt_regs *regs, long err) | 415 | int __kprobes __die(const char *str, struct pt_regs *regs, long err) |
387 | { | 416 | { |
388 | unsigned short ss; | 417 | unsigned short ss; |
@@ -423,31 +452,9 @@ int __kprobes __die(const char *str, struct pt_regs *regs, long err) | |||
423 | */ | 452 | */ |
424 | void die(const char *str, struct pt_regs *regs, long err) | 453 | void die(const char *str, struct pt_regs *regs, long err) |
425 | { | 454 | { |
426 | static struct { | 455 | unsigned long flags = oops_begin(); |
427 | raw_spinlock_t lock; | ||
428 | u32 lock_owner; | ||
429 | int lock_owner_depth; | ||
430 | } die = { | ||
431 | .lock = __RAW_SPIN_LOCK_UNLOCKED, | ||
432 | .lock_owner = -1, | ||
433 | .lock_owner_depth = 0 | ||
434 | }; | ||
435 | unsigned long flags; | ||
436 | |||
437 | oops_enter(); | ||
438 | |||
439 | if (die.lock_owner != raw_smp_processor_id()) { | ||
440 | console_verbose(); | ||
441 | raw_local_irq_save(flags); | ||
442 | __raw_spin_lock(&die.lock); | ||
443 | die.lock_owner = smp_processor_id(); | ||
444 | die.lock_owner_depth = 0; | ||
445 | bust_spinlocks(1); | ||
446 | } else { | ||
447 | raw_local_irq_save(flags); | ||
448 | } | ||
449 | 456 | ||
450 | if (++die.lock_owner_depth < 3) { | 457 | if (die_nest_count < 3) { |
451 | report_bug(regs->ip, regs); | 458 | report_bug(regs->ip, regs); |
452 | 459 | ||
453 | if (__die(str, regs, err)) | 460 | if (__die(str, regs, err)) |
@@ -456,26 +463,7 @@ void die(const char *str, struct pt_regs *regs, long err) | |||
456 | printk(KERN_EMERG "Recursive die() failure, output suppressed\n"); | 463 | printk(KERN_EMERG "Recursive die() failure, output suppressed\n"); |
457 | } | 464 | } |
458 | 465 | ||
459 | bust_spinlocks(0); | 466 | oops_end(flags, regs, SIGSEGV); |
460 | die.lock_owner = -1; | ||
461 | add_taint(TAINT_DIE); | ||
462 | __raw_spin_unlock(&die.lock); | ||
463 | raw_local_irq_restore(flags); | ||
464 | |||
465 | if (!regs) | ||
466 | return; | ||
467 | |||
468 | if (kexec_should_crash(current)) | ||
469 | crash_kexec(regs); | ||
470 | |||
471 | if (in_interrupt()) | ||
472 | panic("Fatal exception in interrupt"); | ||
473 | |||
474 | if (panic_on_oops) | ||
475 | panic("Fatal exception"); | ||
476 | |||
477 | oops_exit(); | ||
478 | do_exit(SIGSEGV); | ||
479 | } | 467 | } |
480 | 468 | ||
481 | static inline void | 469 | static inline void |
diff --git a/arch/x86/kernel/traps_64.c b/arch/x86/kernel/traps_64.c index 2696a6837782..3f18d73f420c 100644 --- a/arch/x86/kernel/traps_64.c +++ b/arch/x86/kernel/traps_64.c | |||
@@ -51,30 +51,10 @@ | |||
51 | #include <asm/pgalloc.h> | 51 | #include <asm/pgalloc.h> |
52 | #include <asm/proto.h> | 52 | #include <asm/proto.h> |
53 | #include <asm/pda.h> | 53 | #include <asm/pda.h> |
54 | #include <asm/traps.h> | ||
54 | 55 | ||
55 | #include <mach_traps.h> | 56 | #include <mach_traps.h> |
56 | 57 | ||
57 | asmlinkage void divide_error(void); | ||
58 | asmlinkage void debug(void); | ||
59 | asmlinkage void nmi(void); | ||
60 | asmlinkage void int3(void); | ||
61 | asmlinkage void overflow(void); | ||
62 | asmlinkage void bounds(void); | ||
63 | asmlinkage void invalid_op(void); | ||
64 | asmlinkage void device_not_available(void); | ||
65 | asmlinkage void double_fault(void); | ||
66 | asmlinkage void coprocessor_segment_overrun(void); | ||
67 | asmlinkage void invalid_TSS(void); | ||
68 | asmlinkage void segment_not_present(void); | ||
69 | asmlinkage void stack_segment(void); | ||
70 | asmlinkage void general_protection(void); | ||
71 | asmlinkage void page_fault(void); | ||
72 | asmlinkage void coprocessor_error(void); | ||
73 | asmlinkage void simd_coprocessor_error(void); | ||
74 | asmlinkage void alignment_check(void); | ||
75 | asmlinkage void spurious_interrupt_bug(void); | ||
76 | asmlinkage void machine_check(void); | ||
77 | |||
78 | int panic_on_unrecovered_nmi; | 58 | int panic_on_unrecovered_nmi; |
79 | int kstack_depth_to_print = 12; | 59 | int kstack_depth_to_print = 12; |
80 | static unsigned int code_bytes = 64; | 60 | static unsigned int code_bytes = 64; |
@@ -355,17 +335,24 @@ static const struct stacktrace_ops print_trace_ops = { | |||
355 | .address = print_trace_address, | 335 | .address = print_trace_address, |
356 | }; | 336 | }; |
357 | 337 | ||
358 | void show_trace(struct task_struct *task, struct pt_regs *regs, | 338 | static void |
359 | unsigned long *stack, unsigned long bp) | 339 | show_trace_log_lvl(struct task_struct *task, struct pt_regs *regs, |
340 | unsigned long *stack, unsigned long bp, char *log_lvl) | ||
360 | { | 341 | { |
361 | printk("\nCall Trace:\n"); | 342 | printk("\nCall Trace:\n"); |
362 | dump_trace(task, regs, stack, bp, &print_trace_ops, NULL); | 343 | dump_trace(task, regs, stack, bp, &print_trace_ops, log_lvl); |
363 | printk("\n"); | 344 | printk("\n"); |
364 | } | 345 | } |
365 | 346 | ||
347 | void show_trace(struct task_struct *task, struct pt_regs *regs, | ||
348 | unsigned long *stack, unsigned long bp) | ||
349 | { | ||
350 | show_trace_log_lvl(task, regs, stack, bp, ""); | ||
351 | } | ||
352 | |||
366 | static void | 353 | static void |
367 | _show_stack(struct task_struct *task, struct pt_regs *regs, | 354 | show_stack_log_lvl(struct task_struct *task, struct pt_regs *regs, |
368 | unsigned long *sp, unsigned long bp) | 355 | unsigned long *sp, unsigned long bp, char *log_lvl) |
369 | { | 356 | { |
370 | unsigned long *stack; | 357 | unsigned long *stack; |
371 | int i; | 358 | int i; |
@@ -399,12 +386,12 @@ _show_stack(struct task_struct *task, struct pt_regs *regs, | |||
399 | printk(" %016lx", *stack++); | 386 | printk(" %016lx", *stack++); |
400 | touch_nmi_watchdog(); | 387 | touch_nmi_watchdog(); |
401 | } | 388 | } |
402 | show_trace(task, regs, sp, bp); | 389 | show_trace_log_lvl(task, regs, sp, bp, log_lvl); |
403 | } | 390 | } |
404 | 391 | ||
405 | void show_stack(struct task_struct *task, unsigned long *sp) | 392 | void show_stack(struct task_struct *task, unsigned long *sp) |
406 | { | 393 | { |
407 | _show_stack(task, NULL, sp, 0); | 394 | show_stack_log_lvl(task, NULL, sp, 0, ""); |
408 | } | 395 | } |
409 | 396 | ||
410 | /* | 397 | /* |
@@ -454,7 +441,8 @@ void show_registers(struct pt_regs *regs) | |||
454 | u8 *ip; | 441 | u8 *ip; |
455 | 442 | ||
456 | printk("Stack: "); | 443 | printk("Stack: "); |
457 | _show_stack(NULL, regs, (unsigned long *)sp, regs->bp); | 444 | show_stack_log_lvl(NULL, regs, (unsigned long *)sp, |
445 | regs->bp, ""); | ||
458 | printk("\n"); | 446 | printk("\n"); |
459 | 447 | ||
460 | printk(KERN_EMERG "Code: "); | 448 | printk(KERN_EMERG "Code: "); |
@@ -518,7 +506,7 @@ unsigned __kprobes long oops_begin(void) | |||
518 | } | 506 | } |
519 | 507 | ||
520 | void __kprobes oops_end(unsigned long flags, struct pt_regs *regs, int signr) | 508 | void __kprobes oops_end(unsigned long flags, struct pt_regs *regs, int signr) |
521 | { | 509 | { |
522 | die_owner = -1; | 510 | die_owner = -1; |
523 | bust_spinlocks(0); | 511 | bust_spinlocks(0); |
524 | die_nest_count--; | 512 | die_nest_count--; |
diff --git a/arch/x86/kernel/visws_quirks.c b/arch/x86/kernel/visws_quirks.c index e94bdb6add1d..41e01b145c48 100644 --- a/arch/x86/kernel/visws_quirks.c +++ b/arch/x86/kernel/visws_quirks.c | |||
@@ -73,7 +73,7 @@ int is_visws_box(void) | |||
73 | return visws_board_type >= 0; | 73 | return visws_board_type >= 0; |
74 | } | 74 | } |
75 | 75 | ||
76 | static int __init visws_time_init_quirk(void) | 76 | static int __init visws_time_init(void) |
77 | { | 77 | { |
78 | printk(KERN_INFO "Starting Cobalt Timer system clock\n"); | 78 | printk(KERN_INFO "Starting Cobalt Timer system clock\n"); |
79 | 79 | ||
@@ -93,7 +93,7 @@ static int __init visws_time_init_quirk(void) | |||
93 | return 0; | 93 | return 0; |
94 | } | 94 | } |
95 | 95 | ||
96 | static int __init visws_pre_intr_init_quirk(void) | 96 | static int __init visws_pre_intr_init(void) |
97 | { | 97 | { |
98 | init_VISWS_APIC_irqs(); | 98 | init_VISWS_APIC_irqs(); |
99 | 99 | ||
@@ -114,7 +114,7 @@ EXPORT_SYMBOL(sgivwfb_mem_size); | |||
114 | 114 | ||
115 | long long mem_size __initdata = 0; | 115 | long long mem_size __initdata = 0; |
116 | 116 | ||
117 | static char * __init visws_memory_setup_quirk(void) | 117 | static char * __init visws_memory_setup(void) |
118 | { | 118 | { |
119 | long long gfx_mem_size = 8 * MB; | 119 | long long gfx_mem_size = 8 * MB; |
120 | 120 | ||
@@ -176,7 +176,7 @@ static void visws_machine_power_off(void) | |||
176 | outl(PIIX_SPECIAL_STOP, 0xCFC); | 176 | outl(PIIX_SPECIAL_STOP, 0xCFC); |
177 | } | 177 | } |
178 | 178 | ||
179 | static int __init visws_get_smp_config_quirk(unsigned int early) | 179 | static int __init visws_get_smp_config(unsigned int early) |
180 | { | 180 | { |
181 | /* | 181 | /* |
182 | * Prevent MP-table parsing by the generic code: | 182 | * Prevent MP-table parsing by the generic code: |
@@ -192,7 +192,7 @@ extern unsigned int __cpuinitdata maxcpus; | |||
192 | * No problem for Linux. | 192 | * No problem for Linux. |
193 | */ | 193 | */ |
194 | 194 | ||
195 | static void __init MP_processor_info (struct mpc_config_processor *m) | 195 | static void __init MP_processor_info(struct mpc_config_processor *m) |
196 | { | 196 | { |
197 | int ver, logical_apicid; | 197 | int ver, logical_apicid; |
198 | physid_mask_t apic_cpus; | 198 | physid_mask_t apic_cpus; |
@@ -232,7 +232,7 @@ static void __init MP_processor_info (struct mpc_config_processor *m) | |||
232 | apic_version[m->mpc_apicid] = ver; | 232 | apic_version[m->mpc_apicid] = ver; |
233 | } | 233 | } |
234 | 234 | ||
235 | int __init visws_find_smp_config_quirk(unsigned int reserve) | 235 | static int __init visws_find_smp_config(unsigned int reserve) |
236 | { | 236 | { |
237 | struct mpc_config_processor *mp = phys_to_virt(CO_CPU_TAB_PHYS); | 237 | struct mpc_config_processor *mp = phys_to_virt(CO_CPU_TAB_PHYS); |
238 | unsigned short ncpus = readw(phys_to_virt(CO_CPU_NUM_PHYS)); | 238 | unsigned short ncpus = readw(phys_to_virt(CO_CPU_NUM_PHYS)); |
@@ -258,7 +258,17 @@ int __init visws_find_smp_config_quirk(unsigned int reserve) | |||
258 | return 1; | 258 | return 1; |
259 | } | 259 | } |
260 | 260 | ||
261 | extern int visws_trap_init_quirk(void); | 261 | static int visws_trap_init(void); |
262 | |||
263 | static struct x86_quirks visws_x86_quirks __initdata = { | ||
264 | .arch_time_init = visws_time_init, | ||
265 | .arch_pre_intr_init = visws_pre_intr_init, | ||
266 | .arch_memory_setup = visws_memory_setup, | ||
267 | .arch_intr_init = NULL, | ||
268 | .arch_trap_init = visws_trap_init, | ||
269 | .mach_get_smp_config = visws_get_smp_config, | ||
270 | .mach_find_smp_config = visws_find_smp_config, | ||
271 | }; | ||
262 | 272 | ||
263 | void __init visws_early_detect(void) | 273 | void __init visws_early_detect(void) |
264 | { | 274 | { |
@@ -272,16 +282,10 @@ void __init visws_early_detect(void) | |||
272 | 282 | ||
273 | /* | 283 | /* |
274 | * Install special quirks for timer, interrupt and memory setup: | 284 | * Install special quirks for timer, interrupt and memory setup: |
275 | */ | ||
276 | arch_time_init_quirk = visws_time_init_quirk; | ||
277 | arch_pre_intr_init_quirk = visws_pre_intr_init_quirk; | ||
278 | arch_memory_setup_quirk = visws_memory_setup_quirk; | ||
279 | |||
280 | /* | ||
281 | * Fall back to generic behavior for traps: | 285 | * Fall back to generic behavior for traps: |
286 | * Override generic MP-table parsing: | ||
282 | */ | 287 | */ |
283 | arch_intr_init_quirk = NULL; | 288 | x86_quirks = &visws_x86_quirks; |
284 | arch_trap_init_quirk = visws_trap_init_quirk; | ||
285 | 289 | ||
286 | /* | 290 | /* |
287 | * Install reboot quirks: | 291 | * Install reboot quirks: |
@@ -294,12 +298,6 @@ void __init visws_early_detect(void) | |||
294 | */ | 298 | */ |
295 | no_broadcast = 0; | 299 | no_broadcast = 0; |
296 | 300 | ||
297 | /* | ||
298 | * Override generic MP-table parsing: | ||
299 | */ | ||
300 | mach_get_smp_config_quirk = visws_get_smp_config_quirk; | ||
301 | mach_find_smp_config_quirk = visws_find_smp_config_quirk; | ||
302 | |||
303 | #ifdef CONFIG_X86_IO_APIC | 301 | #ifdef CONFIG_X86_IO_APIC |
304 | /* | 302 | /* |
305 | * Turn off IO-APIC detection and initialization: | 303 | * Turn off IO-APIC detection and initialization: |
@@ -426,7 +424,7 @@ static __init void cobalt_init(void) | |||
426 | co_apic_read(CO_APIC_ID)); | 424 | co_apic_read(CO_APIC_ID)); |
427 | } | 425 | } |
428 | 426 | ||
429 | int __init visws_trap_init_quirk(void) | 427 | static int __init visws_trap_init(void) |
430 | { | 428 | { |
431 | lithium_init(); | 429 | lithium_init(); |
432 | cobalt_init(); | 430 | cobalt_init(); |
diff --git a/arch/x86/kernel/vmi_32.c b/arch/x86/kernel/vmi_32.c index b15346092b7b..0a1b1a9d922d 100644 --- a/arch/x86/kernel/vmi_32.c +++ b/arch/x86/kernel/vmi_32.c | |||
@@ -906,7 +906,6 @@ static inline int __init activate_vmi(void) | |||
906 | #ifdef CONFIG_X86_LOCAL_APIC | 906 | #ifdef CONFIG_X86_LOCAL_APIC |
907 | para_fill(pv_apic_ops.apic_read, APICRead); | 907 | para_fill(pv_apic_ops.apic_read, APICRead); |
908 | para_fill(pv_apic_ops.apic_write, APICWrite); | 908 | para_fill(pv_apic_ops.apic_write, APICWrite); |
909 | para_fill(pv_apic_ops.apic_write_atomic, APICWrite); | ||
910 | #endif | 909 | #endif |
911 | 910 | ||
912 | /* | 911 | /* |
diff --git a/arch/x86/lguest/boot.c b/arch/x86/lguest/boot.c index 50dad44fb542..0313a5eec412 100644 --- a/arch/x86/lguest/boot.c +++ b/arch/x86/lguest/boot.c | |||
@@ -991,7 +991,6 @@ __init void lguest_init(void) | |||
991 | #ifdef CONFIG_X86_LOCAL_APIC | 991 | #ifdef CONFIG_X86_LOCAL_APIC |
992 | /* apic read/write intercepts */ | 992 | /* apic read/write intercepts */ |
993 | pv_apic_ops.apic_write = lguest_apic_write; | 993 | pv_apic_ops.apic_write = lguest_apic_write; |
994 | pv_apic_ops.apic_write_atomic = lguest_apic_write; | ||
995 | pv_apic_ops.apic_read = lguest_apic_read; | 994 | pv_apic_ops.apic_read = lguest_apic_read; |
996 | #endif | 995 | #endif |
997 | 996 | ||
diff --git a/arch/x86/mach-default/setup.c b/arch/x86/mach-default/setup.c index 48278fa7d3de..3d317836be9e 100644 --- a/arch/x86/mach-default/setup.c +++ b/arch/x86/mach-default/setup.c | |||
@@ -10,14 +10,6 @@ | |||
10 | #include <asm/e820.h> | 10 | #include <asm/e820.h> |
11 | #include <asm/setup.h> | 11 | #include <asm/setup.h> |
12 | 12 | ||
13 | /* | ||
14 | * Any quirks to be performed to initialize timers/irqs/etc? | ||
15 | */ | ||
16 | int (*arch_time_init_quirk)(void); | ||
17 | int (*arch_pre_intr_init_quirk)(void); | ||
18 | int (*arch_intr_init_quirk)(void); | ||
19 | int (*arch_trap_init_quirk)(void); | ||
20 | |||
21 | #ifdef CONFIG_HOTPLUG_CPU | 13 | #ifdef CONFIG_HOTPLUG_CPU |
22 | #define DEFAULT_SEND_IPI (1) | 14 | #define DEFAULT_SEND_IPI (1) |
23 | #else | 15 | #else |
@@ -37,8 +29,8 @@ int no_broadcast=DEFAULT_SEND_IPI; | |||
37 | **/ | 29 | **/ |
38 | void __init pre_intr_init_hook(void) | 30 | void __init pre_intr_init_hook(void) |
39 | { | 31 | { |
40 | if (arch_pre_intr_init_quirk) { | 32 | if (x86_quirks->arch_pre_intr_init) { |
41 | if (arch_pre_intr_init_quirk()) | 33 | if (x86_quirks->arch_pre_intr_init()) |
42 | return; | 34 | return; |
43 | } | 35 | } |
44 | init_ISA_irqs(); | 36 | init_ISA_irqs(); |
@@ -64,8 +56,8 @@ static struct irqaction irq2 = { | |||
64 | **/ | 56 | **/ |
65 | void __init intr_init_hook(void) | 57 | void __init intr_init_hook(void) |
66 | { | 58 | { |
67 | if (arch_intr_init_quirk) { | 59 | if (x86_quirks->arch_intr_init) { |
68 | if (arch_intr_init_quirk()) | 60 | if (x86_quirks->arch_intr_init()) |
69 | return; | 61 | return; |
70 | } | 62 | } |
71 | #ifdef CONFIG_X86_LOCAL_APIC | 63 | #ifdef CONFIG_X86_LOCAL_APIC |
@@ -97,8 +89,8 @@ void __init pre_setup_arch_hook(void) | |||
97 | **/ | 89 | **/ |
98 | void __init trap_init_hook(void) | 90 | void __init trap_init_hook(void) |
99 | { | 91 | { |
100 | if (arch_trap_init_quirk) { | 92 | if (x86_quirks->arch_trap_init) { |
101 | if (arch_trap_init_quirk()) | 93 | if (x86_quirks->arch_trap_init()) |
102 | return; | 94 | return; |
103 | } | 95 | } |
104 | } | 96 | } |
@@ -111,6 +103,16 @@ static struct irqaction irq0 = { | |||
111 | }; | 103 | }; |
112 | 104 | ||
113 | /** | 105 | /** |
106 | * pre_time_init_hook - do any specific initialisations before. | ||
107 | * | ||
108 | **/ | ||
109 | void __init pre_time_init_hook(void) | ||
110 | { | ||
111 | if (x86_quirks->arch_pre_time_init) | ||
112 | x86_quirks->arch_pre_time_init(); | ||
113 | } | ||
114 | |||
115 | /** | ||
114 | * time_init_hook - do any specific initialisations for the system timer. | 116 | * time_init_hook - do any specific initialisations for the system timer. |
115 | * | 117 | * |
116 | * Description: | 118 | * Description: |
@@ -119,13 +121,13 @@ static struct irqaction irq0 = { | |||
119 | **/ | 121 | **/ |
120 | void __init time_init_hook(void) | 122 | void __init time_init_hook(void) |
121 | { | 123 | { |
122 | if (arch_time_init_quirk) { | 124 | if (x86_quirks->arch_time_init) { |
123 | /* | 125 | /* |
124 | * A nonzero return code does not mean failure, it means | 126 | * A nonzero return code does not mean failure, it means |
125 | * that the architecture quirk does not want any | 127 | * that the architecture quirk does not want any |
126 | * generic (timer) setup to be performed after this: | 128 | * generic (timer) setup to be performed after this: |
127 | */ | 129 | */ |
128 | if (arch_time_init_quirk()) | 130 | if (x86_quirks->arch_time_init()) |
129 | return; | 131 | return; |
130 | } | 132 | } |
131 | 133 | ||
diff --git a/arch/x86/mach-es7000/es7000plat.c b/arch/x86/mach-es7000/es7000plat.c index 4354ce804889..50189af14b85 100644 --- a/arch/x86/mach-es7000/es7000plat.c +++ b/arch/x86/mach-es7000/es7000plat.c | |||
@@ -130,10 +130,10 @@ parse_unisys_oem (char *oemptr) | |||
130 | mip_addr = val; | 130 | mip_addr = val; |
131 | mip = (struct mip_reg *)val; | 131 | mip = (struct mip_reg *)val; |
132 | mip_reg = __va(mip); | 132 | mip_reg = __va(mip); |
133 | Dprintk("es7000_mipcfg: host_reg = 0x%lx \n", | 133 | pr_debug("es7000_mipcfg: host_reg = 0x%lx \n", |
134 | (unsigned long)host_reg); | 134 | (unsigned long)host_reg); |
135 | Dprintk("es7000_mipcfg: mip_reg = 0x%lx \n", | 135 | pr_debug("es7000_mipcfg: mip_reg = 0x%lx \n", |
136 | (unsigned long)mip_reg); | 136 | (unsigned long)mip_reg); |
137 | success++; | 137 | success++; |
138 | break; | 138 | break; |
139 | case MIP_PSAI_REG: | 139 | case MIP_PSAI_REG: |
diff --git a/arch/x86/mm/Makefile b/arch/x86/mm/Makefile index 9873716e9f76..1fbb844c3d7a 100644 --- a/arch/x86/mm/Makefile +++ b/arch/x86/mm/Makefile | |||
@@ -21,3 +21,4 @@ obj-$(CONFIG_K8_NUMA) += k8topology_64.o | |||
21 | endif | 21 | endif |
22 | obj-$(CONFIG_ACPI_NUMA) += srat_$(BITS).o | 22 | obj-$(CONFIG_ACPI_NUMA) += srat_$(BITS).o |
23 | 23 | ||
24 | obj-$(CONFIG_MEMTEST) += memtest.o | ||
diff --git a/arch/x86/mm/dump_pagetables.c b/arch/x86/mm/dump_pagetables.c index 0bb0caed8971..a20d1fa64b4e 100644 --- a/arch/x86/mm/dump_pagetables.c +++ b/arch/x86/mm/dump_pagetables.c | |||
@@ -148,8 +148,8 @@ static void note_page(struct seq_file *m, struct pg_state *st, | |||
148 | * we have now. "break" is either changing perms, levels or | 148 | * we have now. "break" is either changing perms, levels or |
149 | * address space marker. | 149 | * address space marker. |
150 | */ | 150 | */ |
151 | prot = pgprot_val(new_prot) & ~(PTE_MASK); | 151 | prot = pgprot_val(new_prot) & ~(PTE_PFN_MASK); |
152 | cur = pgprot_val(st->current_prot) & ~(PTE_MASK); | 152 | cur = pgprot_val(st->current_prot) & ~(PTE_PFN_MASK); |
153 | 153 | ||
154 | if (!st->level) { | 154 | if (!st->level) { |
155 | /* First entry */ | 155 | /* First entry */ |
@@ -221,7 +221,7 @@ static void walk_pmd_level(struct seq_file *m, struct pg_state *st, pud_t addr, | |||
221 | for (i = 0; i < PTRS_PER_PMD; i++) { | 221 | for (i = 0; i < PTRS_PER_PMD; i++) { |
222 | st->current_address = normalize_addr(P + i * PMD_LEVEL_MULT); | 222 | st->current_address = normalize_addr(P + i * PMD_LEVEL_MULT); |
223 | if (!pmd_none(*start)) { | 223 | if (!pmd_none(*start)) { |
224 | pgprotval_t prot = pmd_val(*start) & ~PTE_MASK; | 224 | pgprotval_t prot = pmd_val(*start) & PTE_FLAGS_MASK; |
225 | 225 | ||
226 | if (pmd_large(*start) || !pmd_present(*start)) | 226 | if (pmd_large(*start) || !pmd_present(*start)) |
227 | note_page(m, st, __pgprot(prot), 3); | 227 | note_page(m, st, __pgprot(prot), 3); |
@@ -253,7 +253,7 @@ static void walk_pud_level(struct seq_file *m, struct pg_state *st, pgd_t addr, | |||
253 | for (i = 0; i < PTRS_PER_PUD; i++) { | 253 | for (i = 0; i < PTRS_PER_PUD; i++) { |
254 | st->current_address = normalize_addr(P + i * PUD_LEVEL_MULT); | 254 | st->current_address = normalize_addr(P + i * PUD_LEVEL_MULT); |
255 | if (!pud_none(*start)) { | 255 | if (!pud_none(*start)) { |
256 | pgprotval_t prot = pud_val(*start) & ~PTE_MASK; | 256 | pgprotval_t prot = pud_val(*start) & PTE_FLAGS_MASK; |
257 | 257 | ||
258 | if (pud_large(*start) || !pud_present(*start)) | 258 | if (pud_large(*start) || !pud_present(*start)) |
259 | note_page(m, st, __pgprot(prot), 2); | 259 | note_page(m, st, __pgprot(prot), 2); |
@@ -288,7 +288,7 @@ static void walk_pgd_level(struct seq_file *m) | |||
288 | for (i = 0; i < PTRS_PER_PGD; i++) { | 288 | for (i = 0; i < PTRS_PER_PGD; i++) { |
289 | st.current_address = normalize_addr(i * PGD_LEVEL_MULT); | 289 | st.current_address = normalize_addr(i * PGD_LEVEL_MULT); |
290 | if (!pgd_none(*start)) { | 290 | if (!pgd_none(*start)) { |
291 | pgprotval_t prot = pgd_val(*start) & ~PTE_MASK; | 291 | pgprotval_t prot = pgd_val(*start) & PTE_FLAGS_MASK; |
292 | 292 | ||
293 | if (pgd_large(*start) || !pgd_present(*start)) | 293 | if (pgd_large(*start) || !pgd_present(*start)) |
294 | note_page(m, &st, __pgprot(prot), 1); | 294 | note_page(m, &st, __pgprot(prot), 1); |
diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c index 9689a5138e64..d37f29376b0c 100644 --- a/arch/x86/mm/init_32.c +++ b/arch/x86/mm/init_32.c | |||
@@ -844,6 +844,9 @@ unsigned long __init_refok init_memory_mapping(unsigned long start, | |||
844 | reserve_early(table_start << PAGE_SHIFT, | 844 | reserve_early(table_start << PAGE_SHIFT, |
845 | table_end << PAGE_SHIFT, "PGTABLE"); | 845 | table_end << PAGE_SHIFT, "PGTABLE"); |
846 | 846 | ||
847 | if (!after_init_bootmem) | ||
848 | early_memtest(start, end); | ||
849 | |||
847 | return end >> PAGE_SHIFT; | 850 | return end >> PAGE_SHIFT; |
848 | } | 851 | } |
849 | 852 | ||
@@ -868,8 +871,6 @@ void __init paging_init(void) | |||
868 | */ | 871 | */ |
869 | sparse_init(); | 872 | sparse_init(); |
870 | zone_sizes_init(); | 873 | zone_sizes_init(); |
871 | |||
872 | paravirt_post_allocator_init(); | ||
873 | } | 874 | } |
874 | 875 | ||
875 | /* | 876 | /* |
diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c index 306049edd553..ec37121f6709 100644 --- a/arch/x86/mm/init_64.c +++ b/arch/x86/mm/init_64.c | |||
@@ -517,118 +517,6 @@ static void __init init_gbpages(void) | |||
517 | direct_gbpages = 0; | 517 | direct_gbpages = 0; |
518 | } | 518 | } |
519 | 519 | ||
520 | #ifdef CONFIG_MEMTEST | ||
521 | |||
522 | static void __init memtest(unsigned long start_phys, unsigned long size, | ||
523 | unsigned pattern) | ||
524 | { | ||
525 | unsigned long i; | ||
526 | unsigned long *start; | ||
527 | unsigned long start_bad; | ||
528 | unsigned long last_bad; | ||
529 | unsigned long val; | ||
530 | unsigned long start_phys_aligned; | ||
531 | unsigned long count; | ||
532 | unsigned long incr; | ||
533 | |||
534 | switch (pattern) { | ||
535 | case 0: | ||
536 | val = 0UL; | ||
537 | break; | ||
538 | case 1: | ||
539 | val = -1UL; | ||
540 | break; | ||
541 | case 2: | ||
542 | val = 0x5555555555555555UL; | ||
543 | break; | ||
544 | case 3: | ||
545 | val = 0xaaaaaaaaaaaaaaaaUL; | ||
546 | break; | ||
547 | default: | ||
548 | return; | ||
549 | } | ||
550 | |||
551 | incr = sizeof(unsigned long); | ||
552 | start_phys_aligned = ALIGN(start_phys, incr); | ||
553 | count = (size - (start_phys_aligned - start_phys))/incr; | ||
554 | start = __va(start_phys_aligned); | ||
555 | start_bad = 0; | ||
556 | last_bad = 0; | ||
557 | |||
558 | for (i = 0; i < count; i++) | ||
559 | start[i] = val; | ||
560 | for (i = 0; i < count; i++, start++, start_phys_aligned += incr) { | ||
561 | if (*start != val) { | ||
562 | if (start_phys_aligned == last_bad + incr) { | ||
563 | last_bad += incr; | ||
564 | } else { | ||
565 | if (start_bad) { | ||
566 | printk(KERN_CONT "\n %016lx bad mem addr %016lx - %016lx reserved", | ||
567 | val, start_bad, last_bad + incr); | ||
568 | reserve_early(start_bad, last_bad - start_bad, "BAD RAM"); | ||
569 | } | ||
570 | start_bad = last_bad = start_phys_aligned; | ||
571 | } | ||
572 | } | ||
573 | } | ||
574 | if (start_bad) { | ||
575 | printk(KERN_CONT "\n %016lx bad mem addr %016lx - %016lx reserved", | ||
576 | val, start_bad, last_bad + incr); | ||
577 | reserve_early(start_bad, last_bad - start_bad, "BAD RAM"); | ||
578 | } | ||
579 | |||
580 | } | ||
581 | |||
582 | /* default is disabled */ | ||
583 | static int memtest_pattern __initdata; | ||
584 | |||
585 | static int __init parse_memtest(char *arg) | ||
586 | { | ||
587 | if (arg) | ||
588 | memtest_pattern = simple_strtoul(arg, NULL, 0); | ||
589 | return 0; | ||
590 | } | ||
591 | |||
592 | early_param("memtest", parse_memtest); | ||
593 | |||
594 | static void __init early_memtest(unsigned long start, unsigned long end) | ||
595 | { | ||
596 | u64 t_start, t_size; | ||
597 | unsigned pattern; | ||
598 | |||
599 | if (!memtest_pattern) | ||
600 | return; | ||
601 | |||
602 | printk(KERN_INFO "early_memtest: pattern num %d", memtest_pattern); | ||
603 | for (pattern = 0; pattern < memtest_pattern; pattern++) { | ||
604 | t_start = start; | ||
605 | t_size = 0; | ||
606 | while (t_start < end) { | ||
607 | t_start = find_e820_area_size(t_start, &t_size, 1); | ||
608 | |||
609 | /* done ? */ | ||
610 | if (t_start >= end) | ||
611 | break; | ||
612 | if (t_start + t_size > end) | ||
613 | t_size = end - t_start; | ||
614 | |||
615 | printk(KERN_CONT "\n %016llx - %016llx pattern %d", | ||
616 | (unsigned long long)t_start, | ||
617 | (unsigned long long)t_start + t_size, pattern); | ||
618 | |||
619 | memtest(t_start, t_size, pattern); | ||
620 | |||
621 | t_start += t_size; | ||
622 | } | ||
623 | } | ||
624 | printk(KERN_CONT "\n"); | ||
625 | } | ||
626 | #else | ||
627 | static void __init early_memtest(unsigned long start, unsigned long end) | ||
628 | { | ||
629 | } | ||
630 | #endif | ||
631 | |||
632 | static unsigned long __init kernel_physical_mapping_init(unsigned long start, | 520 | static unsigned long __init kernel_physical_mapping_init(unsigned long start, |
633 | unsigned long end, | 521 | unsigned long end, |
634 | unsigned long page_size_mask) | 522 | unsigned long page_size_mask) |
diff --git a/arch/x86/mm/memtest.c b/arch/x86/mm/memtest.c new file mode 100644 index 000000000000..672e17f8262a --- /dev/null +++ b/arch/x86/mm/memtest.c | |||
@@ -0,0 +1,123 @@ | |||
1 | #include <linux/kernel.h> | ||
2 | #include <linux/errno.h> | ||
3 | #include <linux/string.h> | ||
4 | #include <linux/types.h> | ||
5 | #include <linux/mm.h> | ||
6 | #include <linux/smp.h> | ||
7 | #include <linux/init.h> | ||
8 | #include <linux/pfn.h> | ||
9 | |||
10 | #include <asm/e820.h> | ||
11 | |||
12 | static void __init memtest(unsigned long start_phys, unsigned long size, | ||
13 | unsigned pattern) | ||
14 | { | ||
15 | unsigned long i; | ||
16 | unsigned long *start; | ||
17 | unsigned long start_bad; | ||
18 | unsigned long last_bad; | ||
19 | unsigned long val; | ||
20 | unsigned long start_phys_aligned; | ||
21 | unsigned long count; | ||
22 | unsigned long incr; | ||
23 | |||
24 | switch (pattern) { | ||
25 | case 0: | ||
26 | val = 0UL; | ||
27 | break; | ||
28 | case 1: | ||
29 | val = -1UL; | ||
30 | break; | ||
31 | case 2: | ||
32 | #ifdef CONFIG_X86_64 | ||
33 | val = 0x5555555555555555UL; | ||
34 | #else | ||
35 | val = 0x55555555UL; | ||
36 | #endif | ||
37 | break; | ||
38 | case 3: | ||
39 | #ifdef CONFIG_X86_64 | ||
40 | val = 0xaaaaaaaaaaaaaaaaUL; | ||
41 | #else | ||
42 | val = 0xaaaaaaaaUL; | ||
43 | #endif | ||
44 | break; | ||
45 | default: | ||
46 | return; | ||
47 | } | ||
48 | |||
49 | incr = sizeof(unsigned long); | ||
50 | start_phys_aligned = ALIGN(start_phys, incr); | ||
51 | count = (size - (start_phys_aligned - start_phys))/incr; | ||
52 | start = __va(start_phys_aligned); | ||
53 | start_bad = 0; | ||
54 | last_bad = 0; | ||
55 | |||
56 | for (i = 0; i < count; i++) | ||
57 | start[i] = val; | ||
58 | for (i = 0; i < count; i++, start++, start_phys_aligned += incr) { | ||
59 | if (*start != val) { | ||
60 | if (start_phys_aligned == last_bad + incr) { | ||
61 | last_bad += incr; | ||
62 | } else { | ||
63 | if (start_bad) { | ||
64 | printk(KERN_CONT "\n %010lx bad mem addr %010lx - %010lx reserved", | ||
65 | val, start_bad, last_bad + incr); | ||
66 | reserve_early(start_bad, last_bad - start_bad, "BAD RAM"); | ||
67 | } | ||
68 | start_bad = last_bad = start_phys_aligned; | ||
69 | } | ||
70 | } | ||
71 | } | ||
72 | if (start_bad) { | ||
73 | printk(KERN_CONT "\n %016lx bad mem addr %010lx - %010lx reserved", | ||
74 | val, start_bad, last_bad + incr); | ||
75 | reserve_early(start_bad, last_bad - start_bad, "BAD RAM"); | ||
76 | } | ||
77 | |||
78 | } | ||
79 | |||
80 | /* default is disabled */ | ||
81 | static int memtest_pattern __initdata; | ||
82 | |||
83 | static int __init parse_memtest(char *arg) | ||
84 | { | ||
85 | if (arg) | ||
86 | memtest_pattern = simple_strtoul(arg, NULL, 0); | ||
87 | return 0; | ||
88 | } | ||
89 | |||
90 | early_param("memtest", parse_memtest); | ||
91 | |||
92 | void __init early_memtest(unsigned long start, unsigned long end) | ||
93 | { | ||
94 | u64 t_start, t_size; | ||
95 | unsigned pattern; | ||
96 | |||
97 | if (!memtest_pattern) | ||
98 | return; | ||
99 | |||
100 | printk(KERN_INFO "early_memtest: pattern num %d", memtest_pattern); | ||
101 | for (pattern = 0; pattern < memtest_pattern; pattern++) { | ||
102 | t_start = start; | ||
103 | t_size = 0; | ||
104 | while (t_start < end) { | ||
105 | t_start = find_e820_area_size(t_start, &t_size, 1); | ||
106 | |||
107 | /* done ? */ | ||
108 | if (t_start >= end) | ||
109 | break; | ||
110 | if (t_start + t_size > end) | ||
111 | t_size = end - t_start; | ||
112 | |||
113 | printk(KERN_CONT "\n %010llx - %010llx pattern %d", | ||
114 | (unsigned long long)t_start, | ||
115 | (unsigned long long)t_start + t_size, pattern); | ||
116 | |||
117 | memtest(t_start, t_size, pattern); | ||
118 | |||
119 | t_start += t_size; | ||
120 | } | ||
121 | } | ||
122 | printk(KERN_CONT "\n"); | ||
123 | } | ||
diff --git a/arch/x86/mm/numa_64.c b/arch/x86/mm/numa_64.c index b432d5781773..9782f42dd319 100644 --- a/arch/x86/mm/numa_64.c +++ b/arch/x86/mm/numa_64.c | |||
@@ -20,10 +20,6 @@ | |||
20 | #include <asm/acpi.h> | 20 | #include <asm/acpi.h> |
21 | #include <asm/k8.h> | 21 | #include <asm/k8.h> |
22 | 22 | ||
23 | #ifndef Dprintk | ||
24 | #define Dprintk(x...) | ||
25 | #endif | ||
26 | |||
27 | struct pglist_data *node_data[MAX_NUMNODES] __read_mostly; | 23 | struct pglist_data *node_data[MAX_NUMNODES] __read_mostly; |
28 | EXPORT_SYMBOL(node_data); | 24 | EXPORT_SYMBOL(node_data); |
29 | 25 | ||
diff --git a/arch/x86/mm/pat.c b/arch/x86/mm/pat.c index d4585077977a..2fe30916d4b6 100644 --- a/arch/x86/mm/pat.c +++ b/arch/x86/mm/pat.c | |||
@@ -12,6 +12,8 @@ | |||
12 | #include <linux/gfp.h> | 12 | #include <linux/gfp.h> |
13 | #include <linux/fs.h> | 13 | #include <linux/fs.h> |
14 | #include <linux/bootmem.h> | 14 | #include <linux/bootmem.h> |
15 | #include <linux/debugfs.h> | ||
16 | #include <linux/seq_file.h> | ||
15 | 17 | ||
16 | #include <asm/msr.h> | 18 | #include <asm/msr.h> |
17 | #include <asm/tlbflush.h> | 19 | #include <asm/tlbflush.h> |
@@ -373,8 +375,8 @@ pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn, | |||
373 | return vma_prot; | 375 | return vma_prot; |
374 | } | 376 | } |
375 | 377 | ||
376 | #ifdef CONFIG_NONPROMISC_DEVMEM | 378 | #ifdef CONFIG_STRICT_DEVMEM |
377 | /* This check is done in drivers/char/mem.c in case of NONPROMISC_DEVMEM*/ | 379 | /* This check is done in drivers/char/mem.c in case of STRICT_DEVMEM*/ |
378 | static inline int range_is_allowed(unsigned long pfn, unsigned long size) | 380 | static inline int range_is_allowed(unsigned long pfn, unsigned long size) |
379 | { | 381 | { |
380 | return 1; | 382 | return 1; |
@@ -398,7 +400,7 @@ static inline int range_is_allowed(unsigned long pfn, unsigned long size) | |||
398 | } | 400 | } |
399 | return 1; | 401 | return 1; |
400 | } | 402 | } |
401 | #endif /* CONFIG_NONPROMISC_DEVMEM */ | 403 | #endif /* CONFIG_STRICT_DEVMEM */ |
402 | 404 | ||
403 | int phys_mem_access_prot_allowed(struct file *file, unsigned long pfn, | 405 | int phys_mem_access_prot_allowed(struct file *file, unsigned long pfn, |
404 | unsigned long size, pgprot_t *vma_prot) | 406 | unsigned long size, pgprot_t *vma_prot) |
@@ -489,3 +491,89 @@ void unmap_devmem(unsigned long pfn, unsigned long size, pgprot_t vma_prot) | |||
489 | 491 | ||
490 | free_memtype(addr, addr + size); | 492 | free_memtype(addr, addr + size); |
491 | } | 493 | } |
494 | |||
495 | #if defined(CONFIG_DEBUG_FS) | ||
496 | |||
497 | /* get Nth element of the linked list */ | ||
498 | static struct memtype *memtype_get_idx(loff_t pos) | ||
499 | { | ||
500 | struct memtype *list_node, *print_entry; | ||
501 | int i = 1; | ||
502 | |||
503 | print_entry = kmalloc(sizeof(struct memtype), GFP_KERNEL); | ||
504 | if (!print_entry) | ||
505 | return NULL; | ||
506 | |||
507 | spin_lock(&memtype_lock); | ||
508 | list_for_each_entry(list_node, &memtype_list, nd) { | ||
509 | if (pos == i) { | ||
510 | *print_entry = *list_node; | ||
511 | spin_unlock(&memtype_lock); | ||
512 | return print_entry; | ||
513 | } | ||
514 | ++i; | ||
515 | } | ||
516 | spin_unlock(&memtype_lock); | ||
517 | kfree(print_entry); | ||
518 | return NULL; | ||
519 | } | ||
520 | |||
521 | static void *memtype_seq_start(struct seq_file *seq, loff_t *pos) | ||
522 | { | ||
523 | if (*pos == 0) { | ||
524 | ++*pos; | ||
525 | seq_printf(seq, "PAT memtype list:\n"); | ||
526 | } | ||
527 | |||
528 | return memtype_get_idx(*pos); | ||
529 | } | ||
530 | |||
531 | static void *memtype_seq_next(struct seq_file *seq, void *v, loff_t *pos) | ||
532 | { | ||
533 | ++*pos; | ||
534 | return memtype_get_idx(*pos); | ||
535 | } | ||
536 | |||
537 | static void memtype_seq_stop(struct seq_file *seq, void *v) | ||
538 | { | ||
539 | } | ||
540 | |||
541 | static int memtype_seq_show(struct seq_file *seq, void *v) | ||
542 | { | ||
543 | struct memtype *print_entry = (struct memtype *)v; | ||
544 | |||
545 | seq_printf(seq, "%s @ 0x%Lx-0x%Lx\n", cattr_name(print_entry->type), | ||
546 | print_entry->start, print_entry->end); | ||
547 | kfree(print_entry); | ||
548 | return 0; | ||
549 | } | ||
550 | |||
551 | static struct seq_operations memtype_seq_ops = { | ||
552 | .start = memtype_seq_start, | ||
553 | .next = memtype_seq_next, | ||
554 | .stop = memtype_seq_stop, | ||
555 | .show = memtype_seq_show, | ||
556 | }; | ||
557 | |||
558 | static int memtype_seq_open(struct inode *inode, struct file *file) | ||
559 | { | ||
560 | return seq_open(file, &memtype_seq_ops); | ||
561 | } | ||
562 | |||
563 | static const struct file_operations memtype_fops = { | ||
564 | .open = memtype_seq_open, | ||
565 | .read = seq_read, | ||
566 | .llseek = seq_lseek, | ||
567 | .release = seq_release, | ||
568 | }; | ||
569 | |||
570 | static int __init pat_memtype_list_init(void) | ||
571 | { | ||
572 | debugfs_create_file("pat_memtype_list", S_IRUSR, arch_debugfs_dir, | ||
573 | NULL, &memtype_fops); | ||
574 | return 0; | ||
575 | } | ||
576 | |||
577 | late_initcall(pat_memtype_list_init); | ||
578 | |||
579 | #endif /* CONFIG_DEBUG_FS */ | ||
diff --git a/arch/x86/pci/Makefile b/arch/x86/pci/Makefile index e515e8db842a..d49202e740ea 100644 --- a/arch/x86/pci/Makefile +++ b/arch/x86/pci/Makefile | |||
@@ -5,13 +5,13 @@ obj-$(CONFIG_PCI_MMCONFIG) += mmconfig_$(BITS).o direct.o mmconfig-shared.o | |||
5 | obj-$(CONFIG_PCI_DIRECT) += direct.o | 5 | obj-$(CONFIG_PCI_DIRECT) += direct.o |
6 | obj-$(CONFIG_PCI_OLPC) += olpc.o | 6 | obj-$(CONFIG_PCI_OLPC) += olpc.o |
7 | 7 | ||
8 | pci-y := fixup.o | 8 | obj-y += fixup.o |
9 | pci-$(CONFIG_ACPI) += acpi.o | 9 | obj-$(CONFIG_ACPI) += acpi.o |
10 | pci-y += legacy.o irq.o | 10 | obj-y += legacy.o irq.o |
11 | 11 | ||
12 | pci-$(CONFIG_X86_VISWS) += visws.o | 12 | obj-$(CONFIG_X86_VISWS) += visws.o |
13 | 13 | ||
14 | pci-$(CONFIG_X86_NUMAQ) += numa.o | 14 | obj-$(CONFIG_X86_NUMAQ) += numaq_32.o |
15 | 15 | ||
16 | obj-y += $(pci-y) common.o early.o | 16 | obj-y += common.o early.o |
17 | obj-y += amd_bus.o | 17 | obj-y += amd_bus.o |
diff --git a/arch/x86/pci/early.c b/arch/x86/pci/early.c index 858dbe3399f9..86631ccbc25a 100644 --- a/arch/x86/pci/early.c +++ b/arch/x86/pci/early.c | |||
@@ -7,15 +7,13 @@ | |||
7 | /* Direct PCI access. This is used for PCI accesses in early boot before | 7 | /* Direct PCI access. This is used for PCI accesses in early boot before |
8 | the PCI subsystem works. */ | 8 | the PCI subsystem works. */ |
9 | 9 | ||
10 | #define PDprintk(x...) | ||
11 | |||
12 | u32 read_pci_config(u8 bus, u8 slot, u8 func, u8 offset) | 10 | u32 read_pci_config(u8 bus, u8 slot, u8 func, u8 offset) |
13 | { | 11 | { |
14 | u32 v; | 12 | u32 v; |
15 | outl(0x80000000 | (bus<<16) | (slot<<11) | (func<<8) | offset, 0xcf8); | 13 | outl(0x80000000 | (bus<<16) | (slot<<11) | (func<<8) | offset, 0xcf8); |
16 | v = inl(0xcfc); | 14 | v = inl(0xcfc); |
17 | if (v != 0xffffffff) | 15 | if (v != 0xffffffff) |
18 | PDprintk("%x reading 4 from %x: %x\n", slot, offset, v); | 16 | pr_debug("%x reading 4 from %x: %x\n", slot, offset, v); |
19 | return v; | 17 | return v; |
20 | } | 18 | } |
21 | 19 | ||
@@ -24,7 +22,7 @@ u8 read_pci_config_byte(u8 bus, u8 slot, u8 func, u8 offset) | |||
24 | u8 v; | 22 | u8 v; |
25 | outl(0x80000000 | (bus<<16) | (slot<<11) | (func<<8) | offset, 0xcf8); | 23 | outl(0x80000000 | (bus<<16) | (slot<<11) | (func<<8) | offset, 0xcf8); |
26 | v = inb(0xcfc + (offset&3)); | 24 | v = inb(0xcfc + (offset&3)); |
27 | PDprintk("%x reading 1 from %x: %x\n", slot, offset, v); | 25 | pr_debug("%x reading 1 from %x: %x\n", slot, offset, v); |
28 | return v; | 26 | return v; |
29 | } | 27 | } |
30 | 28 | ||
@@ -33,28 +31,28 @@ u16 read_pci_config_16(u8 bus, u8 slot, u8 func, u8 offset) | |||
33 | u16 v; | 31 | u16 v; |
34 | outl(0x80000000 | (bus<<16) | (slot<<11) | (func<<8) | offset, 0xcf8); | 32 | outl(0x80000000 | (bus<<16) | (slot<<11) | (func<<8) | offset, 0xcf8); |
35 | v = inw(0xcfc + (offset&2)); | 33 | v = inw(0xcfc + (offset&2)); |
36 | PDprintk("%x reading 2 from %x: %x\n", slot, offset, v); | 34 | pr_debug("%x reading 2 from %x: %x\n", slot, offset, v); |
37 | return v; | 35 | return v; |
38 | } | 36 | } |
39 | 37 | ||
40 | void write_pci_config(u8 bus, u8 slot, u8 func, u8 offset, | 38 | void write_pci_config(u8 bus, u8 slot, u8 func, u8 offset, |
41 | u32 val) | 39 | u32 val) |
42 | { | 40 | { |
43 | PDprintk("%x writing to %x: %x\n", slot, offset, val); | 41 | pr_debug("%x writing to %x: %x\n", slot, offset, val); |
44 | outl(0x80000000 | (bus<<16) | (slot<<11) | (func<<8) | offset, 0xcf8); | 42 | outl(0x80000000 | (bus<<16) | (slot<<11) | (func<<8) | offset, 0xcf8); |
45 | outl(val, 0xcfc); | 43 | outl(val, 0xcfc); |
46 | } | 44 | } |
47 | 45 | ||
48 | void write_pci_config_byte(u8 bus, u8 slot, u8 func, u8 offset, u8 val) | 46 | void write_pci_config_byte(u8 bus, u8 slot, u8 func, u8 offset, u8 val) |
49 | { | 47 | { |
50 | PDprintk("%x writing to %x: %x\n", slot, offset, val); | 48 | pr_debug("%x writing to %x: %x\n", slot, offset, val); |
51 | outl(0x80000000 | (bus<<16) | (slot<<11) | (func<<8) | offset, 0xcf8); | 49 | outl(0x80000000 | (bus<<16) | (slot<<11) | (func<<8) | offset, 0xcf8); |
52 | outb(val, 0xcfc + (offset&3)); | 50 | outb(val, 0xcfc + (offset&3)); |
53 | } | 51 | } |
54 | 52 | ||
55 | void write_pci_config_16(u8 bus, u8 slot, u8 func, u8 offset, u16 val) | 53 | void write_pci_config_16(u8 bus, u8 slot, u8 func, u8 offset, u16 val) |
56 | { | 54 | { |
57 | PDprintk("%x writing to %x: %x\n", slot, offset, val); | 55 | pr_debug("%x writing to %x: %x\n", slot, offset, val); |
58 | outl(0x80000000 | (bus<<16) | (slot<<11) | (func<<8) | offset, 0xcf8); | 56 | outl(0x80000000 | (bus<<16) | (slot<<11) | (func<<8) | offset, 0xcf8); |
59 | outw(val, 0xcfc + (offset&2)); | 57 | outw(val, 0xcfc + (offset&2)); |
60 | } | 58 | } |
@@ -71,7 +69,7 @@ void early_dump_pci_device(u8 bus, u8 slot, u8 func) | |||
71 | int j; | 69 | int j; |
72 | u32 val; | 70 | u32 val; |
73 | 71 | ||
74 | printk("PCI: %02x:%02x:%02x", bus, slot, func); | 72 | printk(KERN_INFO "PCI: %02x:%02x:%02x", bus, slot, func); |
75 | 73 | ||
76 | for (i = 0; i < 256; i += 4) { | 74 | for (i = 0; i < 256; i += 4) { |
77 | if (!(i & 0x0f)) | 75 | if (!(i & 0x0f)) |
diff --git a/arch/x86/pci/legacy.c b/arch/x86/pci/legacy.c index 132876cc6fca..ec9ce35e44d6 100644 --- a/arch/x86/pci/legacy.c +++ b/arch/x86/pci/legacy.c | |||
@@ -57,14 +57,17 @@ static int __init pci_legacy_init(void) | |||
57 | 57 | ||
58 | int __init pci_subsys_init(void) | 58 | int __init pci_subsys_init(void) |
59 | { | 59 | { |
60 | #ifdef CONFIG_X86_NUMAQ | ||
61 | pci_numaq_init(); | ||
62 | #endif | ||
60 | #ifdef CONFIG_ACPI | 63 | #ifdef CONFIG_ACPI |
61 | pci_acpi_init(); | 64 | pci_acpi_init(); |
62 | #endif | 65 | #endif |
66 | #ifdef CONFIG_X86_VISWS | ||
67 | pci_visws_init(); | ||
68 | #endif | ||
63 | pci_legacy_init(); | 69 | pci_legacy_init(); |
64 | pcibios_irq_init(); | 70 | pcibios_irq_init(); |
65 | #ifdef CONFIG_X86_NUMAQ | ||
66 | pci_numa_init(); | ||
67 | #endif | ||
68 | pcibios_init(); | 71 | pcibios_init(); |
69 | 72 | ||
70 | return 0; | 73 | return 0; |
diff --git a/arch/x86/pci/numa.c b/arch/x86/pci/numaq_32.c index 8b5ca1966731..f4b16dc11dad 100644 --- a/arch/x86/pci/numa.c +++ b/arch/x86/pci/numaq_32.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * numa.c - Low-level PCI access for NUMA-Q machines | 2 | * numaq_32.c - Low-level PCI access for NUMA-Q machines |
3 | */ | 3 | */ |
4 | 4 | ||
5 | #include <linux/pci.h> | 5 | #include <linux/pci.h> |
@@ -151,7 +151,7 @@ static void __devinit pci_fixup_i450nx(struct pci_dev *d) | |||
151 | } | 151 | } |
152 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82451NX, pci_fixup_i450nx); | 152 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82451NX, pci_fixup_i450nx); |
153 | 153 | ||
154 | int __init pci_numa_init(void) | 154 | int __init pci_numaq_init(void) |
155 | { | 155 | { |
156 | int quad; | 156 | int quad; |
157 | 157 | ||
diff --git a/arch/x86/pci/pci.h b/arch/x86/pci/pci.h index 3e25deb821ac..15b9cf6be729 100644 --- a/arch/x86/pci/pci.h +++ b/arch/x86/pci/pci.h | |||
@@ -108,7 +108,8 @@ extern void __init dmi_check_skip_isa_align(void); | |||
108 | /* some common used subsys_initcalls */ | 108 | /* some common used subsys_initcalls */ |
109 | extern int __init pci_acpi_init(void); | 109 | extern int __init pci_acpi_init(void); |
110 | extern int __init pcibios_irq_init(void); | 110 | extern int __init pcibios_irq_init(void); |
111 | extern int __init pci_numa_init(void); | 111 | extern int __init pci_visws_init(void); |
112 | extern int __init pci_numaq_init(void); | ||
112 | extern int __init pcibios_init(void); | 113 | extern int __init pcibios_init(void); |
113 | 114 | ||
114 | /* pci-mmconfig.c */ | 115 | /* pci-mmconfig.c */ |
diff --git a/arch/x86/pci/visws.c b/arch/x86/pci/visws.c index 1a7bed492bb1..42f4cb19faca 100644 --- a/arch/x86/pci/visws.c +++ b/arch/x86/pci/visws.c | |||
@@ -86,8 +86,14 @@ void __init pcibios_update_irq(struct pci_dev *dev, int irq) | |||
86 | pci_write_config_byte(dev, PCI_INTERRUPT_LINE, irq); | 86 | pci_write_config_byte(dev, PCI_INTERRUPT_LINE, irq); |
87 | } | 87 | } |
88 | 88 | ||
89 | static int __init pci_visws_init(void) | 89 | int __init pci_visws_init(void) |
90 | { | 90 | { |
91 | if (!is_visws_box()) | ||
92 | return -1; | ||
93 | |||
94 | pcibios_enable_irq = &pci_visws_enable_irq; | ||
95 | pcibios_disable_irq = &pci_visws_disable_irq; | ||
96 | |||
91 | /* The VISWS supports configuration access type 1 only */ | 97 | /* The VISWS supports configuration access type 1 only */ |
92 | pci_probe = (pci_probe | PCI_PROBE_CONF1) & | 98 | pci_probe = (pci_probe | PCI_PROBE_CONF1) & |
93 | ~(PCI_PROBE_BIOS | PCI_PROBE_CONF2); | 99 | ~(PCI_PROBE_BIOS | PCI_PROBE_CONF2); |
@@ -105,18 +111,3 @@ static int __init pci_visws_init(void) | |||
105 | pcibios_resource_survey(); | 111 | pcibios_resource_survey(); |
106 | return 0; | 112 | return 0; |
107 | } | 113 | } |
108 | |||
109 | static __init int pci_subsys_init(void) | ||
110 | { | ||
111 | if (!is_visws_box()) | ||
112 | return -1; | ||
113 | |||
114 | pcibios_enable_irq = &pci_visws_enable_irq; | ||
115 | pcibios_disable_irq = &pci_visws_disable_irq; | ||
116 | |||
117 | pci_visws_init(); | ||
118 | pcibios_init(); | ||
119 | |||
120 | return 0; | ||
121 | } | ||
122 | subsys_initcall(pci_subsys_init); | ||
diff --git a/arch/x86/vdso/Makefile b/arch/x86/vdso/Makefile index b7ad9f89d21f..4d6ef0a336d6 100644 --- a/arch/x86/vdso/Makefile +++ b/arch/x86/vdso/Makefile | |||
@@ -62,7 +62,7 @@ $(obj)/%-syms.lds: $(obj)/%.so.dbg FORCE | |||
62 | # Build multiple 32-bit vDSO images to choose from at boot time. | 62 | # Build multiple 32-bit vDSO images to choose from at boot time. |
63 | # | 63 | # |
64 | obj-$(VDSO32-y) += vdso32-syms.lds | 64 | obj-$(VDSO32-y) += vdso32-syms.lds |
65 | vdso32.so-$(CONFIG_X86_32) += int80 | 65 | vdso32.so-$(VDSO32-y) += int80 |
66 | vdso32.so-$(CONFIG_COMPAT) += syscall | 66 | vdso32.so-$(CONFIG_COMPAT) += syscall |
67 | vdso32.so-$(VDSO32-y) += sysenter | 67 | vdso32.so-$(VDSO32-y) += sysenter |
68 | 68 | ||
diff --git a/arch/x86/vdso/vdso32-setup.c b/arch/x86/vdso/vdso32-setup.c index 0bce5429a515..513f330c5832 100644 --- a/arch/x86/vdso/vdso32-setup.c +++ b/arch/x86/vdso/vdso32-setup.c | |||
@@ -193,17 +193,12 @@ static __init void relocate_vdso(Elf32_Ehdr *ehdr) | |||
193 | } | 193 | } |
194 | } | 194 | } |
195 | 195 | ||
196 | /* | ||
197 | * These symbols are defined by vdso32.S to mark the bounds | ||
198 | * of the ELF DSO images included therein. | ||
199 | */ | ||
200 | extern const char vdso32_default_start, vdso32_default_end; | ||
201 | extern const char vdso32_sysenter_start, vdso32_sysenter_end; | ||
202 | static struct page *vdso32_pages[1]; | 196 | static struct page *vdso32_pages[1]; |
203 | 197 | ||
204 | #ifdef CONFIG_X86_64 | 198 | #ifdef CONFIG_X86_64 |
205 | 199 | ||
206 | #define vdso32_sysenter() (boot_cpu_has(X86_FEATURE_SYSENTER32)) | 200 | #define vdso32_sysenter() (boot_cpu_has(X86_FEATURE_SYSENTER32)) |
201 | #define vdso32_syscall() (boot_cpu_has(X86_FEATURE_SYSCALL32)) | ||
207 | 202 | ||
208 | /* May not be __init: called during resume */ | 203 | /* May not be __init: called during resume */ |
209 | void syscall32_cpu_init(void) | 204 | void syscall32_cpu_init(void) |
@@ -226,6 +221,7 @@ static inline void map_compat_vdso(int map) | |||
226 | #else /* CONFIG_X86_32 */ | 221 | #else /* CONFIG_X86_32 */ |
227 | 222 | ||
228 | #define vdso32_sysenter() (boot_cpu_has(X86_FEATURE_SEP)) | 223 | #define vdso32_sysenter() (boot_cpu_has(X86_FEATURE_SEP)) |
224 | #define vdso32_syscall() (0) | ||
229 | 225 | ||
230 | void enable_sep_cpu(void) | 226 | void enable_sep_cpu(void) |
231 | { | 227 | { |
@@ -296,12 +292,15 @@ int __init sysenter_setup(void) | |||
296 | gate_vma_init(); | 292 | gate_vma_init(); |
297 | #endif | 293 | #endif |
298 | 294 | ||
299 | if (!vdso32_sysenter()) { | 295 | if (vdso32_syscall()) { |
300 | vsyscall = &vdso32_default_start; | 296 | vsyscall = &vdso32_syscall_start; |
301 | vsyscall_len = &vdso32_default_end - &vdso32_default_start; | 297 | vsyscall_len = &vdso32_syscall_end - &vdso32_syscall_start; |
302 | } else { | 298 | } else if (vdso32_sysenter()){ |
303 | vsyscall = &vdso32_sysenter_start; | 299 | vsyscall = &vdso32_sysenter_start; |
304 | vsyscall_len = &vdso32_sysenter_end - &vdso32_sysenter_start; | 300 | vsyscall_len = &vdso32_sysenter_end - &vdso32_sysenter_start; |
301 | } else { | ||
302 | vsyscall = &vdso32_int80_start; | ||
303 | vsyscall_len = &vdso32_int80_end - &vdso32_int80_start; | ||
305 | } | 304 | } |
306 | 305 | ||
307 | memcpy(syscall_page, vsyscall, vsyscall_len); | 306 | memcpy(syscall_page, vsyscall, vsyscall_len); |
diff --git a/arch/x86/vdso/vdso32.S b/arch/x86/vdso/vdso32.S index 1e36f72cab86..2ce5f82c333b 100644 --- a/arch/x86/vdso/vdso32.S +++ b/arch/x86/vdso/vdso32.S | |||
@@ -2,14 +2,17 @@ | |||
2 | 2 | ||
3 | __INITDATA | 3 | __INITDATA |
4 | 4 | ||
5 | .globl vdso32_default_start, vdso32_default_end | 5 | .globl vdso32_int80_start, vdso32_int80_end |
6 | vdso32_default_start: | 6 | vdso32_int80_start: |
7 | #ifdef CONFIG_X86_32 | ||
8 | .incbin "arch/x86/vdso/vdso32-int80.so" | 7 | .incbin "arch/x86/vdso/vdso32-int80.so" |
9 | #else | 8 | vdso32_int80_end: |
9 | |||
10 | .globl vdso32_syscall_start, vdso32_syscall_end | ||
11 | vdso32_syscall_start: | ||
12 | #ifdef CONFIG_COMPAT | ||
10 | .incbin "arch/x86/vdso/vdso32-syscall.so" | 13 | .incbin "arch/x86/vdso/vdso32-syscall.so" |
11 | #endif | 14 | #endif |
12 | vdso32_default_end: | 15 | vdso32_syscall_end: |
13 | 16 | ||
14 | .globl vdso32_sysenter_start, vdso32_sysenter_end | 17 | .globl vdso32_sysenter_start, vdso32_sysenter_end |
15 | vdso32_sysenter_start: | 18 | vdso32_sysenter_start: |
diff --git a/arch/x86/vdso/vma.c b/arch/x86/vdso/vma.c index 19a6cfaf5db9..257ba4a10abf 100644 --- a/arch/x86/vdso/vma.c +++ b/arch/x86/vdso/vma.c | |||
@@ -21,7 +21,8 @@ unsigned int __read_mostly vdso_enabled = 1; | |||
21 | extern char vdso_start[], vdso_end[]; | 21 | extern char vdso_start[], vdso_end[]; |
22 | extern unsigned short vdso_sync_cpuid; | 22 | extern unsigned short vdso_sync_cpuid; |
23 | 23 | ||
24 | struct page **vdso_pages; | 24 | static struct page **vdso_pages; |
25 | static unsigned vdso_size; | ||
25 | 26 | ||
26 | static inline void *var_ref(void *p, char *name) | 27 | static inline void *var_ref(void *p, char *name) |
27 | { | 28 | { |
@@ -38,6 +39,7 @@ static int __init init_vdso_vars(void) | |||
38 | int i; | 39 | int i; |
39 | char *vbase; | 40 | char *vbase; |
40 | 41 | ||
42 | vdso_size = npages << PAGE_SHIFT; | ||
41 | vdso_pages = kmalloc(sizeof(struct page *) * npages, GFP_KERNEL); | 43 | vdso_pages = kmalloc(sizeof(struct page *) * npages, GFP_KERNEL); |
42 | if (!vdso_pages) | 44 | if (!vdso_pages) |
43 | goto oom; | 45 | goto oom; |
@@ -101,20 +103,19 @@ int arch_setup_additional_pages(struct linux_binprm *bprm, int exstack) | |||
101 | struct mm_struct *mm = current->mm; | 103 | struct mm_struct *mm = current->mm; |
102 | unsigned long addr; | 104 | unsigned long addr; |
103 | int ret; | 105 | int ret; |
104 | unsigned len = round_up(vdso_end - vdso_start, PAGE_SIZE); | ||
105 | 106 | ||
106 | if (!vdso_enabled) | 107 | if (!vdso_enabled) |
107 | return 0; | 108 | return 0; |
108 | 109 | ||
109 | down_write(&mm->mmap_sem); | 110 | down_write(&mm->mmap_sem); |
110 | addr = vdso_addr(mm->start_stack, len); | 111 | addr = vdso_addr(mm->start_stack, vdso_size); |
111 | addr = get_unmapped_area(NULL, addr, len, 0, 0); | 112 | addr = get_unmapped_area(NULL, addr, vdso_size, 0, 0); |
112 | if (IS_ERR_VALUE(addr)) { | 113 | if (IS_ERR_VALUE(addr)) { |
113 | ret = addr; | 114 | ret = addr; |
114 | goto up_fail; | 115 | goto up_fail; |
115 | } | 116 | } |
116 | 117 | ||
117 | ret = install_special_mapping(mm, addr, len, | 118 | ret = install_special_mapping(mm, addr, vdso_size, |
118 | VM_READ|VM_EXEC| | 119 | VM_READ|VM_EXEC| |
119 | VM_MAYREAD|VM_MAYWRITE|VM_MAYEXEC| | 120 | VM_MAYREAD|VM_MAYWRITE|VM_MAYEXEC| |
120 | VM_ALWAYSDUMP, | 121 | VM_ALWAYSDUMP, |
diff --git a/arch/x86/xen/Kconfig b/arch/x86/xen/Kconfig index c2cc99580871..3815e425f470 100644 --- a/arch/x86/xen/Kconfig +++ b/arch/x86/xen/Kconfig | |||
@@ -6,8 +6,8 @@ config XEN | |||
6 | bool "Xen guest support" | 6 | bool "Xen guest support" |
7 | select PARAVIRT | 7 | select PARAVIRT |
8 | select PARAVIRT_CLOCK | 8 | select PARAVIRT_CLOCK |
9 | depends on X86_32 | 9 | depends on X86_64 || (X86_32 && X86_PAE && !(X86_VISWS || X86_VOYAGER)) |
10 | depends on X86_CMPXCHG && X86_TSC && X86_PAE && !(X86_VISWS || X86_VOYAGER) | 10 | depends on X86_CMPXCHG && X86_TSC |
11 | help | 11 | help |
12 | This is the Linux Xen port. Enabling this will allow the | 12 | This is the Linux Xen port. Enabling this will allow the |
13 | kernel to boot in a paravirtualized environment under the | 13 | kernel to boot in a paravirtualized environment under the |
@@ -15,10 +15,16 @@ config XEN | |||
15 | 15 | ||
16 | config XEN_MAX_DOMAIN_MEMORY | 16 | config XEN_MAX_DOMAIN_MEMORY |
17 | int "Maximum allowed size of a domain in gigabytes" | 17 | int "Maximum allowed size of a domain in gigabytes" |
18 | default 8 | 18 | default 8 if X86_32 |
19 | default 32 if X86_64 | ||
19 | depends on XEN | 20 | depends on XEN |
20 | help | 21 | help |
21 | The pseudo-physical to machine address array is sized | 22 | The pseudo-physical to machine address array is sized |
22 | according to the maximum possible memory size of a Xen | 23 | according to the maximum possible memory size of a Xen |
23 | domain. This array uses 1 page per gigabyte, so there's no | 24 | domain. This array uses 1 page per gigabyte, so there's no |
24 | need to be too stingy here. \ No newline at end of file | 25 | need to be too stingy here. |
26 | |||
27 | config XEN_SAVE_RESTORE | ||
28 | bool | ||
29 | depends on PM | ||
30 | default y \ No newline at end of file | ||
diff --git a/arch/x86/xen/Makefile b/arch/x86/xen/Makefile index 2ba2d1649131..59c1e539aed2 100644 --- a/arch/x86/xen/Makefile +++ b/arch/x86/xen/Makefile | |||
@@ -1,4 +1,4 @@ | |||
1 | obj-y := enlighten.o setup.o multicalls.o mmu.o \ | 1 | obj-y := enlighten.o setup.o multicalls.o mmu.o \ |
2 | time.o xen-asm.o grant-table.o suspend.o | 2 | time.o xen-asm_$(BITS).o grant-table.o suspend.o |
3 | 3 | ||
4 | obj-$(CONFIG_SMP) += smp.o | 4 | obj-$(CONFIG_SMP) += smp.o |
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index bb508456ef52..9ff6e3cbf08f 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c | |||
@@ -33,6 +33,7 @@ | |||
33 | #include <xen/interface/sched.h> | 33 | #include <xen/interface/sched.h> |
34 | #include <xen/features.h> | 34 | #include <xen/features.h> |
35 | #include <xen/page.h> | 35 | #include <xen/page.h> |
36 | #include <xen/hvc-console.h> | ||
36 | 37 | ||
37 | #include <asm/paravirt.h> | 38 | #include <asm/paravirt.h> |
38 | #include <asm/page.h> | 39 | #include <asm/page.h> |
@@ -40,12 +41,12 @@ | |||
40 | #include <asm/xen/hypervisor.h> | 41 | #include <asm/xen/hypervisor.h> |
41 | #include <asm/fixmap.h> | 42 | #include <asm/fixmap.h> |
42 | #include <asm/processor.h> | 43 | #include <asm/processor.h> |
44 | #include <asm/msr-index.h> | ||
43 | #include <asm/setup.h> | 45 | #include <asm/setup.h> |
44 | #include <asm/desc.h> | 46 | #include <asm/desc.h> |
45 | #include <asm/pgtable.h> | 47 | #include <asm/pgtable.h> |
46 | #include <asm/tlbflush.h> | 48 | #include <asm/tlbflush.h> |
47 | #include <asm/reboot.h> | 49 | #include <asm/reboot.h> |
48 | #include <asm/pgalloc.h> | ||
49 | 50 | ||
50 | #include "xen-ops.h" | 51 | #include "xen-ops.h" |
51 | #include "mmu.h" | 52 | #include "mmu.h" |
@@ -57,6 +58,18 @@ DEFINE_PER_CPU(struct vcpu_info *, xen_vcpu); | |||
57 | DEFINE_PER_CPU(struct vcpu_info, xen_vcpu_info); | 58 | DEFINE_PER_CPU(struct vcpu_info, xen_vcpu_info); |
58 | 59 | ||
59 | /* | 60 | /* |
61 | * Identity map, in addition to plain kernel map. This needs to be | ||
62 | * large enough to allocate page table pages to allocate the rest. | ||
63 | * Each page can map 2MB. | ||
64 | */ | ||
65 | static pte_t level1_ident_pgt[PTRS_PER_PTE * 4] __page_aligned_bss; | ||
66 | |||
67 | #ifdef CONFIG_X86_64 | ||
68 | /* l3 pud for userspace vsyscall mapping */ | ||
69 | static pud_t level3_user_vsyscall[PTRS_PER_PUD] __page_aligned_bss; | ||
70 | #endif /* CONFIG_X86_64 */ | ||
71 | |||
72 | /* | ||
60 | * Note about cr3 (pagetable base) values: | 73 | * Note about cr3 (pagetable base) values: |
61 | * | 74 | * |
62 | * xen_cr3 contains the current logical cr3 value; it contains the | 75 | * xen_cr3 contains the current logical cr3 value; it contains the |
@@ -167,10 +180,14 @@ void xen_vcpu_restore(void) | |||
167 | 180 | ||
168 | static void __init xen_banner(void) | 181 | static void __init xen_banner(void) |
169 | { | 182 | { |
183 | unsigned version = HYPERVISOR_xen_version(XENVER_version, NULL); | ||
184 | struct xen_extraversion extra; | ||
185 | HYPERVISOR_xen_version(XENVER_extraversion, &extra); | ||
186 | |||
170 | printk(KERN_INFO "Booting paravirtualized kernel on %s\n", | 187 | printk(KERN_INFO "Booting paravirtualized kernel on %s\n", |
171 | pv_info.name); | 188 | pv_info.name); |
172 | printk(KERN_INFO "Hypervisor signature: %s%s\n", | 189 | printk(KERN_INFO "Xen version: %d.%d%s%s\n", |
173 | xen_start_info->magic, | 190 | version >> 16, version & 0xffff, extra.extraversion, |
174 | xen_feature(XENFEAT_mmu_pt_update_preserve_ad) ? " (preserve-AD)" : ""); | 191 | xen_feature(XENFEAT_mmu_pt_update_preserve_ad) ? " (preserve-AD)" : ""); |
175 | } | 192 | } |
176 | 193 | ||
@@ -363,14 +380,6 @@ static void load_TLS_descriptor(struct thread_struct *t, | |||
363 | 380 | ||
364 | static void xen_load_tls(struct thread_struct *t, unsigned int cpu) | 381 | static void xen_load_tls(struct thread_struct *t, unsigned int cpu) |
365 | { | 382 | { |
366 | xen_mc_batch(); | ||
367 | |||
368 | load_TLS_descriptor(t, cpu, 0); | ||
369 | load_TLS_descriptor(t, cpu, 1); | ||
370 | load_TLS_descriptor(t, cpu, 2); | ||
371 | |||
372 | xen_mc_issue(PARAVIRT_LAZY_CPU); | ||
373 | |||
374 | /* | 383 | /* |
375 | * XXX sleazy hack: If we're being called in a lazy-cpu zone, | 384 | * XXX sleazy hack: If we're being called in a lazy-cpu zone, |
376 | * it means we're in a context switch, and %gs has just been | 385 | * it means we're in a context switch, and %gs has just been |
@@ -379,10 +388,39 @@ static void xen_load_tls(struct thread_struct *t, unsigned int cpu) | |||
379 | * Either way, it has been saved, and the new value will get | 388 | * Either way, it has been saved, and the new value will get |
380 | * loaded properly. This will go away as soon as Xen has been | 389 | * loaded properly. This will go away as soon as Xen has been |
381 | * modified to not save/restore %gs for normal hypercalls. | 390 | * modified to not save/restore %gs for normal hypercalls. |
391 | * | ||
392 | * On x86_64, this hack is not used for %gs, because gs points | ||
393 | * to KERNEL_GS_BASE (and uses it for PDA references), so we | ||
394 | * must not zero %gs on x86_64 | ||
395 | * | ||
396 | * For x86_64, we need to zero %fs, otherwise we may get an | ||
397 | * exception between the new %fs descriptor being loaded and | ||
398 | * %fs being effectively cleared at __switch_to(). | ||
382 | */ | 399 | */ |
383 | if (paravirt_get_lazy_mode() == PARAVIRT_LAZY_CPU) | 400 | if (paravirt_get_lazy_mode() == PARAVIRT_LAZY_CPU) { |
401 | #ifdef CONFIG_X86_32 | ||
384 | loadsegment(gs, 0); | 402 | loadsegment(gs, 0); |
403 | #else | ||
404 | loadsegment(fs, 0); | ||
405 | #endif | ||
406 | } | ||
407 | |||
408 | xen_mc_batch(); | ||
409 | |||
410 | load_TLS_descriptor(t, cpu, 0); | ||
411 | load_TLS_descriptor(t, cpu, 1); | ||
412 | load_TLS_descriptor(t, cpu, 2); | ||
413 | |||
414 | xen_mc_issue(PARAVIRT_LAZY_CPU); | ||
415 | } | ||
416 | |||
417 | #ifdef CONFIG_X86_64 | ||
418 | static void xen_load_gs_index(unsigned int idx) | ||
419 | { | ||
420 | if (HYPERVISOR_set_segment_base(SEGBASE_GS_USER_SEL, idx)) | ||
421 | BUG(); | ||
385 | } | 422 | } |
423 | #endif | ||
386 | 424 | ||
387 | static void xen_write_ldt_entry(struct desc_struct *dt, int entrynum, | 425 | static void xen_write_ldt_entry(struct desc_struct *dt, int entrynum, |
388 | const void *ptr) | 426 | const void *ptr) |
@@ -400,23 +438,18 @@ static void xen_write_ldt_entry(struct desc_struct *dt, int entrynum, | |||
400 | preempt_enable(); | 438 | preempt_enable(); |
401 | } | 439 | } |
402 | 440 | ||
403 | static int cvt_gate_to_trap(int vector, u32 low, u32 high, | 441 | static int cvt_gate_to_trap(int vector, const gate_desc *val, |
404 | struct trap_info *info) | 442 | struct trap_info *info) |
405 | { | 443 | { |
406 | u8 type, dpl; | 444 | if (val->type != 0xf && val->type != 0xe) |
407 | |||
408 | type = (high >> 8) & 0x1f; | ||
409 | dpl = (high >> 13) & 3; | ||
410 | |||
411 | if (type != 0xf && type != 0xe) | ||
412 | return 0; | 445 | return 0; |
413 | 446 | ||
414 | info->vector = vector; | 447 | info->vector = vector; |
415 | info->address = (high & 0xffff0000) | (low & 0x0000ffff); | 448 | info->address = gate_offset(*val); |
416 | info->cs = low >> 16; | 449 | info->cs = gate_segment(*val); |
417 | info->flags = dpl; | 450 | info->flags = val->dpl; |
418 | /* interrupt gates clear IF */ | 451 | /* interrupt gates clear IF */ |
419 | if (type == 0xe) | 452 | if (val->type == 0xe) |
420 | info->flags |= 4; | 453 | info->flags |= 4; |
421 | 454 | ||
422 | return 1; | 455 | return 1; |
@@ -443,11 +476,10 @@ static void xen_write_idt_entry(gate_desc *dt, int entrynum, const gate_desc *g) | |||
443 | 476 | ||
444 | if (p >= start && (p + 8) <= end) { | 477 | if (p >= start && (p + 8) <= end) { |
445 | struct trap_info info[2]; | 478 | struct trap_info info[2]; |
446 | u32 *desc = (u32 *)g; | ||
447 | 479 | ||
448 | info[1].address = 0; | 480 | info[1].address = 0; |
449 | 481 | ||
450 | if (cvt_gate_to_trap(entrynum, desc[0], desc[1], &info[0])) | 482 | if (cvt_gate_to_trap(entrynum, g, &info[0])) |
451 | if (HYPERVISOR_set_trap_table(info)) | 483 | if (HYPERVISOR_set_trap_table(info)) |
452 | BUG(); | 484 | BUG(); |
453 | } | 485 | } |
@@ -460,13 +492,13 @@ static void xen_convert_trap_info(const struct desc_ptr *desc, | |||
460 | { | 492 | { |
461 | unsigned in, out, count; | 493 | unsigned in, out, count; |
462 | 494 | ||
463 | count = (desc->size+1) / 8; | 495 | count = (desc->size+1) / sizeof(gate_desc); |
464 | BUG_ON(count > 256); | 496 | BUG_ON(count > 256); |
465 | 497 | ||
466 | for (in = out = 0; in < count; in++) { | 498 | for (in = out = 0; in < count; in++) { |
467 | const u32 *entry = (u32 *)(desc->address + in * 8); | 499 | gate_desc *entry = (gate_desc*)(desc->address) + in; |
468 | 500 | ||
469 | if (cvt_gate_to_trap(in, entry[0], entry[1], &traps[out])) | 501 | if (cvt_gate_to_trap(in, entry, &traps[out])) |
470 | out++; | 502 | out++; |
471 | } | 503 | } |
472 | traps[out].address = 0; | 504 | traps[out].address = 0; |
@@ -695,33 +727,89 @@ static void set_current_cr3(void *v) | |||
695 | x86_write_percpu(xen_current_cr3, (unsigned long)v); | 727 | x86_write_percpu(xen_current_cr3, (unsigned long)v); |
696 | } | 728 | } |
697 | 729 | ||
698 | static void xen_write_cr3(unsigned long cr3) | 730 | static void __xen_write_cr3(bool kernel, unsigned long cr3) |
699 | { | 731 | { |
700 | struct mmuext_op *op; | 732 | struct mmuext_op *op; |
701 | struct multicall_space mcs; | 733 | struct multicall_space mcs; |
702 | unsigned long mfn = pfn_to_mfn(PFN_DOWN(cr3)); | 734 | unsigned long mfn; |
703 | 735 | ||
704 | BUG_ON(preemptible()); | 736 | if (cr3) |
737 | mfn = pfn_to_mfn(PFN_DOWN(cr3)); | ||
738 | else | ||
739 | mfn = 0; | ||
705 | 740 | ||
706 | mcs = xen_mc_entry(sizeof(*op)); /* disables interrupts */ | 741 | WARN_ON(mfn == 0 && kernel); |
707 | 742 | ||
708 | /* Update while interrupts are disabled, so its atomic with | 743 | mcs = __xen_mc_entry(sizeof(*op)); |
709 | respect to ipis */ | ||
710 | x86_write_percpu(xen_cr3, cr3); | ||
711 | 744 | ||
712 | op = mcs.args; | 745 | op = mcs.args; |
713 | op->cmd = MMUEXT_NEW_BASEPTR; | 746 | op->cmd = kernel ? MMUEXT_NEW_BASEPTR : MMUEXT_NEW_USER_BASEPTR; |
714 | op->arg1.mfn = mfn; | 747 | op->arg1.mfn = mfn; |
715 | 748 | ||
716 | MULTI_mmuext_op(mcs.mc, op, 1, NULL, DOMID_SELF); | 749 | MULTI_mmuext_op(mcs.mc, op, 1, NULL, DOMID_SELF); |
717 | 750 | ||
718 | /* Update xen_update_cr3 once the batch has actually | 751 | if (kernel) { |
719 | been submitted. */ | 752 | x86_write_percpu(xen_cr3, cr3); |
720 | xen_mc_callback(set_current_cr3, (void *)cr3); | 753 | |
754 | /* Update xen_current_cr3 once the batch has actually | ||
755 | been submitted. */ | ||
756 | xen_mc_callback(set_current_cr3, (void *)cr3); | ||
757 | } | ||
758 | } | ||
759 | |||
760 | static void xen_write_cr3(unsigned long cr3) | ||
761 | { | ||
762 | BUG_ON(preemptible()); | ||
763 | |||
764 | xen_mc_batch(); /* disables interrupts */ | ||
765 | |||
766 | /* Update while interrupts are disabled, so its atomic with | ||
767 | respect to ipis */ | ||
768 | x86_write_percpu(xen_cr3, cr3); | ||
769 | |||
770 | __xen_write_cr3(true, cr3); | ||
771 | |||
772 | #ifdef CONFIG_X86_64 | ||
773 | { | ||
774 | pgd_t *user_pgd = xen_get_user_pgd(__va(cr3)); | ||
775 | if (user_pgd) | ||
776 | __xen_write_cr3(false, __pa(user_pgd)); | ||
777 | else | ||
778 | __xen_write_cr3(false, 0); | ||
779 | } | ||
780 | #endif | ||
721 | 781 | ||
722 | xen_mc_issue(PARAVIRT_LAZY_CPU); /* interrupts restored */ | 782 | xen_mc_issue(PARAVIRT_LAZY_CPU); /* interrupts restored */ |
723 | } | 783 | } |
724 | 784 | ||
785 | static int xen_write_msr_safe(unsigned int msr, unsigned low, unsigned high) | ||
786 | { | ||
787 | int ret; | ||
788 | |||
789 | ret = 0; | ||
790 | |||
791 | switch(msr) { | ||
792 | #ifdef CONFIG_X86_64 | ||
793 | unsigned which; | ||
794 | u64 base; | ||
795 | |||
796 | case MSR_FS_BASE: which = SEGBASE_FS; goto set; | ||
797 | case MSR_KERNEL_GS_BASE: which = SEGBASE_GS_USER; goto set; | ||
798 | case MSR_GS_BASE: which = SEGBASE_GS_KERNEL; goto set; | ||
799 | |||
800 | set: | ||
801 | base = ((u64)high << 32) | low; | ||
802 | if (HYPERVISOR_set_segment_base(which, base) != 0) | ||
803 | ret = -EFAULT; | ||
804 | break; | ||
805 | #endif | ||
806 | default: | ||
807 | ret = native_write_msr_safe(msr, low, high); | ||
808 | } | ||
809 | |||
810 | return ret; | ||
811 | } | ||
812 | |||
725 | /* Early in boot, while setting up the initial pagetable, assume | 813 | /* Early in boot, while setting up the initial pagetable, assume |
726 | everything is pinned. */ | 814 | everything is pinned. */ |
727 | static __init void xen_alloc_pte_init(struct mm_struct *mm, u32 pfn) | 815 | static __init void xen_alloc_pte_init(struct mm_struct *mm, u32 pfn) |
@@ -778,6 +866,48 @@ static void xen_alloc_pmd(struct mm_struct *mm, u32 pfn) | |||
778 | xen_alloc_ptpage(mm, pfn, PT_PMD); | 866 | xen_alloc_ptpage(mm, pfn, PT_PMD); |
779 | } | 867 | } |
780 | 868 | ||
869 | static int xen_pgd_alloc(struct mm_struct *mm) | ||
870 | { | ||
871 | pgd_t *pgd = mm->pgd; | ||
872 | int ret = 0; | ||
873 | |||
874 | BUG_ON(PagePinned(virt_to_page(pgd))); | ||
875 | |||
876 | #ifdef CONFIG_X86_64 | ||
877 | { | ||
878 | struct page *page = virt_to_page(pgd); | ||
879 | pgd_t *user_pgd; | ||
880 | |||
881 | BUG_ON(page->private != 0); | ||
882 | |||
883 | ret = -ENOMEM; | ||
884 | |||
885 | user_pgd = (pgd_t *)__get_free_page(GFP_KERNEL | __GFP_ZERO); | ||
886 | page->private = (unsigned long)user_pgd; | ||
887 | |||
888 | if (user_pgd != NULL) { | ||
889 | user_pgd[pgd_index(VSYSCALL_START)] = | ||
890 | __pgd(__pa(level3_user_vsyscall) | _PAGE_TABLE); | ||
891 | ret = 0; | ||
892 | } | ||
893 | |||
894 | BUG_ON(PagePinned(virt_to_page(xen_get_user_pgd(pgd)))); | ||
895 | } | ||
896 | #endif | ||
897 | |||
898 | return ret; | ||
899 | } | ||
900 | |||
901 | static void xen_pgd_free(struct mm_struct *mm, pgd_t *pgd) | ||
902 | { | ||
903 | #ifdef CONFIG_X86_64 | ||
904 | pgd_t *user_pgd = xen_get_user_pgd(pgd); | ||
905 | |||
906 | if (user_pgd) | ||
907 | free_page((unsigned long)user_pgd); | ||
908 | #endif | ||
909 | } | ||
910 | |||
781 | /* This should never happen until we're OK to use struct page */ | 911 | /* This should never happen until we're OK to use struct page */ |
782 | static void xen_release_ptpage(u32 pfn, unsigned level) | 912 | static void xen_release_ptpage(u32 pfn, unsigned level) |
783 | { | 913 | { |
@@ -803,6 +933,18 @@ static void xen_release_pmd(u32 pfn) | |||
803 | xen_release_ptpage(pfn, PT_PMD); | 933 | xen_release_ptpage(pfn, PT_PMD); |
804 | } | 934 | } |
805 | 935 | ||
936 | #if PAGETABLE_LEVELS == 4 | ||
937 | static void xen_alloc_pud(struct mm_struct *mm, u32 pfn) | ||
938 | { | ||
939 | xen_alloc_ptpage(mm, pfn, PT_PUD); | ||
940 | } | ||
941 | |||
942 | static void xen_release_pud(u32 pfn) | ||
943 | { | ||
944 | xen_release_ptpage(pfn, PT_PUD); | ||
945 | } | ||
946 | #endif | ||
947 | |||
806 | #ifdef CONFIG_HIGHPTE | 948 | #ifdef CONFIG_HIGHPTE |
807 | static void *xen_kmap_atomic_pte(struct page *page, enum km_type type) | 949 | static void *xen_kmap_atomic_pte(struct page *page, enum km_type type) |
808 | { | 950 | { |
@@ -841,68 +983,16 @@ static __init void xen_set_pte_init(pte_t *ptep, pte_t pte) | |||
841 | 983 | ||
842 | static __init void xen_pagetable_setup_start(pgd_t *base) | 984 | static __init void xen_pagetable_setup_start(pgd_t *base) |
843 | { | 985 | { |
844 | pgd_t *xen_pgd = (pgd_t *)xen_start_info->pt_base; | ||
845 | int i; | ||
846 | |||
847 | /* special set_pte for pagetable initialization */ | ||
848 | pv_mmu_ops.set_pte = xen_set_pte_init; | ||
849 | |||
850 | init_mm.pgd = base; | ||
851 | /* | ||
852 | * copy top-level of Xen-supplied pagetable into place. This | ||
853 | * is a stand-in while we copy the pmd pages. | ||
854 | */ | ||
855 | memcpy(base, xen_pgd, PTRS_PER_PGD * sizeof(pgd_t)); | ||
856 | |||
857 | /* | ||
858 | * For PAE, need to allocate new pmds, rather than | ||
859 | * share Xen's, since Xen doesn't like pmd's being | ||
860 | * shared between address spaces. | ||
861 | */ | ||
862 | for (i = 0; i < PTRS_PER_PGD; i++) { | ||
863 | if (pgd_val_ma(xen_pgd[i]) & _PAGE_PRESENT) { | ||
864 | pmd_t *pmd = (pmd_t *)alloc_bootmem_low_pages(PAGE_SIZE); | ||
865 | |||
866 | memcpy(pmd, (void *)pgd_page_vaddr(xen_pgd[i]), | ||
867 | PAGE_SIZE); | ||
868 | |||
869 | make_lowmem_page_readonly(pmd); | ||
870 | |||
871 | set_pgd(&base[i], __pgd(1 + __pa(pmd))); | ||
872 | } else | ||
873 | pgd_clear(&base[i]); | ||
874 | } | ||
875 | |||
876 | /* make sure zero_page is mapped RO so we can use it in pagetables */ | ||
877 | make_lowmem_page_readonly(empty_zero_page); | ||
878 | make_lowmem_page_readonly(base); | ||
879 | /* | ||
880 | * Switch to new pagetable. This is done before | ||
881 | * pagetable_init has done anything so that the new pages | ||
882 | * added to the table can be prepared properly for Xen. | ||
883 | */ | ||
884 | xen_write_cr3(__pa(base)); | ||
885 | |||
886 | /* Unpin initial Xen pagetable */ | ||
887 | pin_pagetable_pfn(MMUEXT_UNPIN_TABLE, | ||
888 | PFN_DOWN(__pa(xen_start_info->pt_base))); | ||
889 | } | 986 | } |
890 | 987 | ||
891 | void xen_setup_shared_info(void) | 988 | void xen_setup_shared_info(void) |
892 | { | 989 | { |
893 | if (!xen_feature(XENFEAT_auto_translated_physmap)) { | 990 | if (!xen_feature(XENFEAT_auto_translated_physmap)) { |
894 | unsigned long addr = fix_to_virt(FIX_PARAVIRT_BOOTMAP); | 991 | set_fixmap(FIX_PARAVIRT_BOOTMAP, |
895 | 992 | xen_start_info->shared_info); | |
896 | /* | 993 | |
897 | * Create a mapping for the shared info page. | 994 | HYPERVISOR_shared_info = |
898 | * Should be set_fixmap(), but shared_info is a machine | 995 | (struct shared_info *)fix_to_virt(FIX_PARAVIRT_BOOTMAP); |
899 | * address with no corresponding pseudo-phys address. | ||
900 | */ | ||
901 | set_pte_mfn(addr, | ||
902 | PFN_DOWN(xen_start_info->shared_info), | ||
903 | PAGE_KERNEL); | ||
904 | |||
905 | HYPERVISOR_shared_info = (struct shared_info *)addr; | ||
906 | } else | 996 | } else |
907 | HYPERVISOR_shared_info = | 997 | HYPERVISOR_shared_info = |
908 | (struct shared_info *)__va(xen_start_info->shared_info); | 998 | (struct shared_info *)__va(xen_start_info->shared_info); |
@@ -917,26 +1007,32 @@ void xen_setup_shared_info(void) | |||
917 | 1007 | ||
918 | static __init void xen_pagetable_setup_done(pgd_t *base) | 1008 | static __init void xen_pagetable_setup_done(pgd_t *base) |
919 | { | 1009 | { |
920 | /* This will work as long as patching hasn't happened yet | ||
921 | (which it hasn't) */ | ||
922 | pv_mmu_ops.alloc_pte = xen_alloc_pte; | ||
923 | pv_mmu_ops.alloc_pmd = xen_alloc_pmd; | ||
924 | pv_mmu_ops.release_pte = xen_release_pte; | ||
925 | pv_mmu_ops.release_pmd = xen_release_pmd; | ||
926 | pv_mmu_ops.set_pte = xen_set_pte; | ||
927 | |||
928 | xen_setup_shared_info(); | 1010 | xen_setup_shared_info(); |
929 | |||
930 | /* Actually pin the pagetable down, but we can't set PG_pinned | ||
931 | yet because the page structures don't exist yet. */ | ||
932 | pin_pagetable_pfn(MMUEXT_PIN_L3_TABLE, PFN_DOWN(__pa(base))); | ||
933 | } | 1011 | } |
934 | 1012 | ||
935 | static __init void xen_post_allocator_init(void) | 1013 | static __init void xen_post_allocator_init(void) |
936 | { | 1014 | { |
1015 | pv_mmu_ops.set_pte = xen_set_pte; | ||
937 | pv_mmu_ops.set_pmd = xen_set_pmd; | 1016 | pv_mmu_ops.set_pmd = xen_set_pmd; |
938 | pv_mmu_ops.set_pud = xen_set_pud; | 1017 | pv_mmu_ops.set_pud = xen_set_pud; |
1018 | #if PAGETABLE_LEVELS == 4 | ||
1019 | pv_mmu_ops.set_pgd = xen_set_pgd; | ||
1020 | #endif | ||
1021 | |||
1022 | /* This will work as long as patching hasn't happened yet | ||
1023 | (which it hasn't) */ | ||
1024 | pv_mmu_ops.alloc_pte = xen_alloc_pte; | ||
1025 | pv_mmu_ops.alloc_pmd = xen_alloc_pmd; | ||
1026 | pv_mmu_ops.release_pte = xen_release_pte; | ||
1027 | pv_mmu_ops.release_pmd = xen_release_pmd; | ||
1028 | #if PAGETABLE_LEVELS == 4 | ||
1029 | pv_mmu_ops.alloc_pud = xen_alloc_pud; | ||
1030 | pv_mmu_ops.release_pud = xen_release_pud; | ||
1031 | #endif | ||
939 | 1032 | ||
1033 | #ifdef CONFIG_X86_64 | ||
1034 | SetPagePinned(virt_to_page(level3_user_vsyscall)); | ||
1035 | #endif | ||
940 | xen_mark_init_mm_pinned(); | 1036 | xen_mark_init_mm_pinned(); |
941 | } | 1037 | } |
942 | 1038 | ||
@@ -950,6 +1046,7 @@ void xen_setup_vcpu_info_placement(void) | |||
950 | 1046 | ||
951 | /* xen_vcpu_setup managed to place the vcpu_info within the | 1047 | /* xen_vcpu_setup managed to place the vcpu_info within the |
952 | percpu area for all cpus, so make use of it */ | 1048 | percpu area for all cpus, so make use of it */ |
1049 | #ifdef CONFIG_X86_32 | ||
953 | if (have_vcpu_info_placement) { | 1050 | if (have_vcpu_info_placement) { |
954 | printk(KERN_INFO "Xen: using vcpu_info placement\n"); | 1051 | printk(KERN_INFO "Xen: using vcpu_info placement\n"); |
955 | 1052 | ||
@@ -959,6 +1056,7 @@ void xen_setup_vcpu_info_placement(void) | |||
959 | pv_irq_ops.irq_enable = xen_irq_enable_direct; | 1056 | pv_irq_ops.irq_enable = xen_irq_enable_direct; |
960 | pv_mmu_ops.read_cr2 = xen_read_cr2_direct; | 1057 | pv_mmu_ops.read_cr2 = xen_read_cr2_direct; |
961 | } | 1058 | } |
1059 | #endif | ||
962 | } | 1060 | } |
963 | 1061 | ||
964 | static unsigned xen_patch(u8 type, u16 clobbers, void *insnbuf, | 1062 | static unsigned xen_patch(u8 type, u16 clobbers, void *insnbuf, |
@@ -979,10 +1077,12 @@ static unsigned xen_patch(u8 type, u16 clobbers, void *insnbuf, | |||
979 | goto patch_site | 1077 | goto patch_site |
980 | 1078 | ||
981 | switch (type) { | 1079 | switch (type) { |
1080 | #ifdef CONFIG_X86_32 | ||
982 | SITE(pv_irq_ops, irq_enable); | 1081 | SITE(pv_irq_ops, irq_enable); |
983 | SITE(pv_irq_ops, irq_disable); | 1082 | SITE(pv_irq_ops, irq_disable); |
984 | SITE(pv_irq_ops, save_fl); | 1083 | SITE(pv_irq_ops, save_fl); |
985 | SITE(pv_irq_ops, restore_fl); | 1084 | SITE(pv_irq_ops, restore_fl); |
1085 | #endif /* CONFIG_X86_32 */ | ||
986 | #undef SITE | 1086 | #undef SITE |
987 | 1087 | ||
988 | patch_site: | 1088 | patch_site: |
@@ -1025,8 +1125,15 @@ static void xen_set_fixmap(unsigned idx, unsigned long phys, pgprot_t prot) | |||
1025 | #ifdef CONFIG_X86_F00F_BUG | 1125 | #ifdef CONFIG_X86_F00F_BUG |
1026 | case FIX_F00F_IDT: | 1126 | case FIX_F00F_IDT: |
1027 | #endif | 1127 | #endif |
1128 | #ifdef CONFIG_X86_32 | ||
1028 | case FIX_WP_TEST: | 1129 | case FIX_WP_TEST: |
1029 | case FIX_VDSO: | 1130 | case FIX_VDSO: |
1131 | # ifdef CONFIG_HIGHMEM | ||
1132 | case FIX_KMAP_BEGIN ... FIX_KMAP_END: | ||
1133 | # endif | ||
1134 | #else | ||
1135 | case VSYSCALL_LAST_PAGE ... VSYSCALL_FIRST_PAGE: | ||
1136 | #endif | ||
1030 | #ifdef CONFIG_X86_LOCAL_APIC | 1137 | #ifdef CONFIG_X86_LOCAL_APIC |
1031 | case FIX_APIC_BASE: /* maps dummy local APIC */ | 1138 | case FIX_APIC_BASE: /* maps dummy local APIC */ |
1032 | #endif | 1139 | #endif |
@@ -1039,6 +1146,15 @@ static void xen_set_fixmap(unsigned idx, unsigned long phys, pgprot_t prot) | |||
1039 | } | 1146 | } |
1040 | 1147 | ||
1041 | __native_set_fixmap(idx, pte); | 1148 | __native_set_fixmap(idx, pte); |
1149 | |||
1150 | #ifdef CONFIG_X86_64 | ||
1151 | /* Replicate changes to map the vsyscall page into the user | ||
1152 | pagetable vsyscall mapping. */ | ||
1153 | if (idx >= VSYSCALL_LAST_PAGE && idx <= VSYSCALL_FIRST_PAGE) { | ||
1154 | unsigned long vaddr = __fix_to_virt(idx); | ||
1155 | set_pte_vaddr_pud(level3_user_vsyscall, vaddr, pte); | ||
1156 | } | ||
1157 | #endif | ||
1042 | } | 1158 | } |
1043 | 1159 | ||
1044 | static const struct pv_info xen_info __initdata = { | 1160 | static const struct pv_info xen_info __initdata = { |
@@ -1084,18 +1200,25 @@ static const struct pv_cpu_ops xen_cpu_ops __initdata = { | |||
1084 | .wbinvd = native_wbinvd, | 1200 | .wbinvd = native_wbinvd, |
1085 | 1201 | ||
1086 | .read_msr = native_read_msr_safe, | 1202 | .read_msr = native_read_msr_safe, |
1087 | .write_msr = native_write_msr_safe, | 1203 | .write_msr = xen_write_msr_safe, |
1088 | .read_tsc = native_read_tsc, | 1204 | .read_tsc = native_read_tsc, |
1089 | .read_pmc = native_read_pmc, | 1205 | .read_pmc = native_read_pmc, |
1090 | 1206 | ||
1091 | .iret = xen_iret, | 1207 | .iret = xen_iret, |
1092 | .irq_enable_sysexit = xen_sysexit, | 1208 | .irq_enable_sysexit = xen_sysexit, |
1209 | #ifdef CONFIG_X86_64 | ||
1210 | .usergs_sysret32 = xen_sysret32, | ||
1211 | .usergs_sysret64 = xen_sysret64, | ||
1212 | #endif | ||
1093 | 1213 | ||
1094 | .load_tr_desc = paravirt_nop, | 1214 | .load_tr_desc = paravirt_nop, |
1095 | .set_ldt = xen_set_ldt, | 1215 | .set_ldt = xen_set_ldt, |
1096 | .load_gdt = xen_load_gdt, | 1216 | .load_gdt = xen_load_gdt, |
1097 | .load_idt = xen_load_idt, | 1217 | .load_idt = xen_load_idt, |
1098 | .load_tls = xen_load_tls, | 1218 | .load_tls = xen_load_tls, |
1219 | #ifdef CONFIG_X86_64 | ||
1220 | .load_gs_index = xen_load_gs_index, | ||
1221 | #endif | ||
1099 | 1222 | ||
1100 | .store_gdt = native_store_gdt, | 1223 | .store_gdt = native_store_gdt, |
1101 | .store_idt = native_store_idt, | 1224 | .store_idt = native_store_idt, |
@@ -1109,14 +1232,34 @@ static const struct pv_cpu_ops xen_cpu_ops __initdata = { | |||
1109 | .set_iopl_mask = xen_set_iopl_mask, | 1232 | .set_iopl_mask = xen_set_iopl_mask, |
1110 | .io_delay = xen_io_delay, | 1233 | .io_delay = xen_io_delay, |
1111 | 1234 | ||
1235 | /* Xen takes care of %gs when switching to usermode for us */ | ||
1236 | .swapgs = paravirt_nop, | ||
1237 | |||
1112 | .lazy_mode = { | 1238 | .lazy_mode = { |
1113 | .enter = paravirt_enter_lazy_cpu, | 1239 | .enter = paravirt_enter_lazy_cpu, |
1114 | .leave = xen_leave_lazy, | 1240 | .leave = xen_leave_lazy, |
1115 | }, | 1241 | }, |
1116 | }; | 1242 | }; |
1117 | 1243 | ||
1244 | static void __init __xen_init_IRQ(void) | ||
1245 | { | ||
1246 | #ifdef CONFIG_X86_64 | ||
1247 | int i; | ||
1248 | |||
1249 | /* Create identity vector->irq map */ | ||
1250 | for(i = 0; i < NR_VECTORS; i++) { | ||
1251 | int cpu; | ||
1252 | |||
1253 | for_each_possible_cpu(cpu) | ||
1254 | per_cpu(vector_irq, cpu)[i] = i; | ||
1255 | } | ||
1256 | #endif /* CONFIG_X86_64 */ | ||
1257 | |||
1258 | xen_init_IRQ(); | ||
1259 | } | ||
1260 | |||
1118 | static const struct pv_irq_ops xen_irq_ops __initdata = { | 1261 | static const struct pv_irq_ops xen_irq_ops __initdata = { |
1119 | .init_IRQ = xen_init_IRQ, | 1262 | .init_IRQ = __xen_init_IRQ, |
1120 | .save_fl = xen_save_fl, | 1263 | .save_fl = xen_save_fl, |
1121 | .restore_fl = xen_restore_fl, | 1264 | .restore_fl = xen_restore_fl, |
1122 | .irq_disable = xen_irq_disable, | 1265 | .irq_disable = xen_irq_disable, |
@@ -1124,14 +1267,13 @@ static const struct pv_irq_ops xen_irq_ops __initdata = { | |||
1124 | .safe_halt = xen_safe_halt, | 1267 | .safe_halt = xen_safe_halt, |
1125 | .halt = xen_halt, | 1268 | .halt = xen_halt, |
1126 | #ifdef CONFIG_X86_64 | 1269 | #ifdef CONFIG_X86_64 |
1127 | .adjust_exception_frame = paravirt_nop, | 1270 | .adjust_exception_frame = xen_adjust_exception_frame, |
1128 | #endif | 1271 | #endif |
1129 | }; | 1272 | }; |
1130 | 1273 | ||
1131 | static const struct pv_apic_ops xen_apic_ops __initdata = { | 1274 | static const struct pv_apic_ops xen_apic_ops __initdata = { |
1132 | #ifdef CONFIG_X86_LOCAL_APIC | 1275 | #ifdef CONFIG_X86_LOCAL_APIC |
1133 | .apic_write = xen_apic_write, | 1276 | .apic_write = xen_apic_write, |
1134 | .apic_write_atomic = xen_apic_write, | ||
1135 | .apic_read = xen_apic_read, | 1277 | .apic_read = xen_apic_read, |
1136 | .setup_boot_clock = paravirt_nop, | 1278 | .setup_boot_clock = paravirt_nop, |
1137 | .setup_secondary_clock = paravirt_nop, | 1279 | .setup_secondary_clock = paravirt_nop, |
@@ -1157,8 +1299,8 @@ static const struct pv_mmu_ops xen_mmu_ops __initdata = { | |||
1157 | .pte_update = paravirt_nop, | 1299 | .pte_update = paravirt_nop, |
1158 | .pte_update_defer = paravirt_nop, | 1300 | .pte_update_defer = paravirt_nop, |
1159 | 1301 | ||
1160 | .pgd_alloc = __paravirt_pgd_alloc, | 1302 | .pgd_alloc = xen_pgd_alloc, |
1161 | .pgd_free = paravirt_nop, | 1303 | .pgd_free = xen_pgd_free, |
1162 | 1304 | ||
1163 | .alloc_pte = xen_alloc_pte_init, | 1305 | .alloc_pte = xen_alloc_pte_init, |
1164 | .release_pte = xen_release_pte_init, | 1306 | .release_pte = xen_release_pte_init, |
@@ -1170,7 +1312,11 @@ static const struct pv_mmu_ops xen_mmu_ops __initdata = { | |||
1170 | .kmap_atomic_pte = xen_kmap_atomic_pte, | 1312 | .kmap_atomic_pte = xen_kmap_atomic_pte, |
1171 | #endif | 1313 | #endif |
1172 | 1314 | ||
1173 | .set_pte = NULL, /* see xen_pagetable_setup_* */ | 1315 | #ifdef CONFIG_X86_64 |
1316 | .set_pte = xen_set_pte, | ||
1317 | #else | ||
1318 | .set_pte = xen_set_pte_init, | ||
1319 | #endif | ||
1174 | .set_pte_at = xen_set_pte_at, | 1320 | .set_pte_at = xen_set_pte_at, |
1175 | .set_pmd = xen_set_pmd_hyper, | 1321 | .set_pmd = xen_set_pmd_hyper, |
1176 | 1322 | ||
@@ -1184,15 +1330,26 @@ static const struct pv_mmu_ops xen_mmu_ops __initdata = { | |||
1184 | .make_pte = xen_make_pte, | 1330 | .make_pte = xen_make_pte, |
1185 | .make_pgd = xen_make_pgd, | 1331 | .make_pgd = xen_make_pgd, |
1186 | 1332 | ||
1333 | #ifdef CONFIG_X86_PAE | ||
1187 | .set_pte_atomic = xen_set_pte_atomic, | 1334 | .set_pte_atomic = xen_set_pte_atomic, |
1188 | .set_pte_present = xen_set_pte_at, | 1335 | .set_pte_present = xen_set_pte_at, |
1189 | .set_pud = xen_set_pud_hyper, | ||
1190 | .pte_clear = xen_pte_clear, | 1336 | .pte_clear = xen_pte_clear, |
1191 | .pmd_clear = xen_pmd_clear, | 1337 | .pmd_clear = xen_pmd_clear, |
1338 | #endif /* CONFIG_X86_PAE */ | ||
1339 | .set_pud = xen_set_pud_hyper, | ||
1192 | 1340 | ||
1193 | .make_pmd = xen_make_pmd, | 1341 | .make_pmd = xen_make_pmd, |
1194 | .pmd_val = xen_pmd_val, | 1342 | .pmd_val = xen_pmd_val, |
1195 | 1343 | ||
1344 | #if PAGETABLE_LEVELS == 4 | ||
1345 | .pud_val = xen_pud_val, | ||
1346 | .make_pud = xen_make_pud, | ||
1347 | .set_pgd = xen_set_pgd_hyper, | ||
1348 | |||
1349 | .alloc_pud = xen_alloc_pte_init, | ||
1350 | .release_pud = xen_release_pte_init, | ||
1351 | #endif /* PAGETABLE_LEVELS == 4 */ | ||
1352 | |||
1196 | .activate_mm = xen_activate_mm, | 1353 | .activate_mm = xen_activate_mm, |
1197 | .dup_mmap = xen_dup_mmap, | 1354 | .dup_mmap = xen_dup_mmap, |
1198 | .exit_mmap = xen_exit_mmap, | 1355 | .exit_mmap = xen_exit_mmap, |
@@ -1205,21 +1362,6 @@ static const struct pv_mmu_ops xen_mmu_ops __initdata = { | |||
1205 | .set_fixmap = xen_set_fixmap, | 1362 | .set_fixmap = xen_set_fixmap, |
1206 | }; | 1363 | }; |
1207 | 1364 | ||
1208 | #ifdef CONFIG_SMP | ||
1209 | static const struct smp_ops xen_smp_ops __initdata = { | ||
1210 | .smp_prepare_boot_cpu = xen_smp_prepare_boot_cpu, | ||
1211 | .smp_prepare_cpus = xen_smp_prepare_cpus, | ||
1212 | .cpu_up = xen_cpu_up, | ||
1213 | .smp_cpus_done = xen_smp_cpus_done, | ||
1214 | |||
1215 | .smp_send_stop = xen_smp_send_stop, | ||
1216 | .smp_send_reschedule = xen_smp_send_reschedule, | ||
1217 | |||
1218 | .send_call_func_ipi = xen_smp_send_call_function_ipi, | ||
1219 | .send_call_func_single_ipi = xen_smp_send_call_function_single_ipi, | ||
1220 | }; | ||
1221 | #endif /* CONFIG_SMP */ | ||
1222 | |||
1223 | static void xen_reboot(int reason) | 1365 | static void xen_reboot(int reason) |
1224 | { | 1366 | { |
1225 | struct sched_shutdown r = { .reason = reason }; | 1367 | struct sched_shutdown r = { .reason = reason }; |
@@ -1264,6 +1406,7 @@ static const struct machine_ops __initdata xen_machine_ops = { | |||
1264 | 1406 | ||
1265 | static void __init xen_reserve_top(void) | 1407 | static void __init xen_reserve_top(void) |
1266 | { | 1408 | { |
1409 | #ifdef CONFIG_X86_32 | ||
1267 | unsigned long top = HYPERVISOR_VIRT_START; | 1410 | unsigned long top = HYPERVISOR_VIRT_START; |
1268 | struct xen_platform_parameters pp; | 1411 | struct xen_platform_parameters pp; |
1269 | 1412 | ||
@@ -1271,8 +1414,248 @@ static void __init xen_reserve_top(void) | |||
1271 | top = pp.virt_start; | 1414 | top = pp.virt_start; |
1272 | 1415 | ||
1273 | reserve_top_address(-top + 2 * PAGE_SIZE); | 1416 | reserve_top_address(-top + 2 * PAGE_SIZE); |
1417 | #endif /* CONFIG_X86_32 */ | ||
1418 | } | ||
1419 | |||
1420 | /* | ||
1421 | * Like __va(), but returns address in the kernel mapping (which is | ||
1422 | * all we have until the physical memory mapping has been set up. | ||
1423 | */ | ||
1424 | static void *__ka(phys_addr_t paddr) | ||
1425 | { | ||
1426 | #ifdef CONFIG_X86_64 | ||
1427 | return (void *)(paddr + __START_KERNEL_map); | ||
1428 | #else | ||
1429 | return __va(paddr); | ||
1430 | #endif | ||
1274 | } | 1431 | } |
1275 | 1432 | ||
1433 | /* Convert a machine address to physical address */ | ||
1434 | static unsigned long m2p(phys_addr_t maddr) | ||
1435 | { | ||
1436 | phys_addr_t paddr; | ||
1437 | |||
1438 | maddr &= PTE_PFN_MASK; | ||
1439 | paddr = mfn_to_pfn(maddr >> PAGE_SHIFT) << PAGE_SHIFT; | ||
1440 | |||
1441 | return paddr; | ||
1442 | } | ||
1443 | |||
1444 | /* Convert a machine address to kernel virtual */ | ||
1445 | static void *m2v(phys_addr_t maddr) | ||
1446 | { | ||
1447 | return __ka(m2p(maddr)); | ||
1448 | } | ||
1449 | |||
1450 | #ifdef CONFIG_X86_64 | ||
1451 | static void walk(pgd_t *pgd, unsigned long addr) | ||
1452 | { | ||
1453 | unsigned l4idx = pgd_index(addr); | ||
1454 | unsigned l3idx = pud_index(addr); | ||
1455 | unsigned l2idx = pmd_index(addr); | ||
1456 | unsigned l1idx = pte_index(addr); | ||
1457 | pgd_t l4; | ||
1458 | pud_t l3; | ||
1459 | pmd_t l2; | ||
1460 | pte_t l1; | ||
1461 | |||
1462 | xen_raw_printk("walk %p, %lx -> %d %d %d %d\n", | ||
1463 | pgd, addr, l4idx, l3idx, l2idx, l1idx); | ||
1464 | |||
1465 | l4 = pgd[l4idx]; | ||
1466 | xen_raw_printk(" l4: %016lx\n", l4.pgd); | ||
1467 | xen_raw_printk(" %016lx\n", pgd_val(l4)); | ||
1468 | |||
1469 | l3 = ((pud_t *)(m2v(l4.pgd)))[l3idx]; | ||
1470 | xen_raw_printk(" l3: %016lx\n", l3.pud); | ||
1471 | xen_raw_printk(" %016lx\n", pud_val(l3)); | ||
1472 | |||
1473 | l2 = ((pmd_t *)(m2v(l3.pud)))[l2idx]; | ||
1474 | xen_raw_printk(" l2: %016lx\n", l2.pmd); | ||
1475 | xen_raw_printk(" %016lx\n", pmd_val(l2)); | ||
1476 | |||
1477 | l1 = ((pte_t *)(m2v(l2.pmd)))[l1idx]; | ||
1478 | xen_raw_printk(" l1: %016lx\n", l1.pte); | ||
1479 | xen_raw_printk(" %016lx\n", pte_val(l1)); | ||
1480 | } | ||
1481 | #endif | ||
1482 | |||
1483 | static void set_page_prot(void *addr, pgprot_t prot) | ||
1484 | { | ||
1485 | unsigned long pfn = __pa(addr) >> PAGE_SHIFT; | ||
1486 | pte_t pte = pfn_pte(pfn, prot); | ||
1487 | |||
1488 | xen_raw_printk("addr=%p pfn=%lx mfn=%lx prot=%016llx pte=%016llx\n", | ||
1489 | addr, pfn, get_phys_to_machine(pfn), | ||
1490 | pgprot_val(prot), pte.pte); | ||
1491 | |||
1492 | if (HYPERVISOR_update_va_mapping((unsigned long)addr, pte, 0)) | ||
1493 | BUG(); | ||
1494 | } | ||
1495 | |||
1496 | static __init void xen_map_identity_early(pmd_t *pmd, unsigned long max_pfn) | ||
1497 | { | ||
1498 | unsigned pmdidx, pteidx; | ||
1499 | unsigned ident_pte; | ||
1500 | unsigned long pfn; | ||
1501 | |||
1502 | ident_pte = 0; | ||
1503 | pfn = 0; | ||
1504 | for(pmdidx = 0; pmdidx < PTRS_PER_PMD && pfn < max_pfn; pmdidx++) { | ||
1505 | pte_t *pte_page; | ||
1506 | |||
1507 | /* Reuse or allocate a page of ptes */ | ||
1508 | if (pmd_present(pmd[pmdidx])) | ||
1509 | pte_page = m2v(pmd[pmdidx].pmd); | ||
1510 | else { | ||
1511 | /* Check for free pte pages */ | ||
1512 | if (ident_pte == ARRAY_SIZE(level1_ident_pgt)) | ||
1513 | break; | ||
1514 | |||
1515 | pte_page = &level1_ident_pgt[ident_pte]; | ||
1516 | ident_pte += PTRS_PER_PTE; | ||
1517 | |||
1518 | pmd[pmdidx] = __pmd(__pa(pte_page) | _PAGE_TABLE); | ||
1519 | } | ||
1520 | |||
1521 | /* Install mappings */ | ||
1522 | for(pteidx = 0; pteidx < PTRS_PER_PTE; pteidx++, pfn++) { | ||
1523 | pte_t pte; | ||
1524 | |||
1525 | if (pfn > max_pfn_mapped) | ||
1526 | max_pfn_mapped = pfn; | ||
1527 | |||
1528 | if (!pte_none(pte_page[pteidx])) | ||
1529 | continue; | ||
1530 | |||
1531 | pte = pfn_pte(pfn, PAGE_KERNEL_EXEC); | ||
1532 | pte_page[pteidx] = pte; | ||
1533 | } | ||
1534 | } | ||
1535 | |||
1536 | for(pteidx = 0; pteidx < ident_pte; pteidx += PTRS_PER_PTE) | ||
1537 | set_page_prot(&level1_ident_pgt[pteidx], PAGE_KERNEL_RO); | ||
1538 | |||
1539 | set_page_prot(pmd, PAGE_KERNEL_RO); | ||
1540 | } | ||
1541 | |||
1542 | #ifdef CONFIG_X86_64 | ||
1543 | static void convert_pfn_mfn(void *v) | ||
1544 | { | ||
1545 | pte_t *pte = v; | ||
1546 | int i; | ||
1547 | |||
1548 | /* All levels are converted the same way, so just treat them | ||
1549 | as ptes. */ | ||
1550 | for(i = 0; i < PTRS_PER_PTE; i++) | ||
1551 | pte[i] = xen_make_pte(pte[i].pte); | ||
1552 | } | ||
1553 | |||
1554 | /* | ||
1555 | * Set up the inital kernel pagetable. | ||
1556 | * | ||
1557 | * We can construct this by grafting the Xen provided pagetable into | ||
1558 | * head_64.S's preconstructed pagetables. We copy the Xen L2's into | ||
1559 | * level2_ident_pgt, level2_kernel_pgt and level2_fixmap_pgt. This | ||
1560 | * means that only the kernel has a physical mapping to start with - | ||
1561 | * but that's enough to get __va working. We need to fill in the rest | ||
1562 | * of the physical mapping once some sort of allocator has been set | ||
1563 | * up. | ||
1564 | */ | ||
1565 | static __init pgd_t *xen_setup_kernel_pagetable(pgd_t *pgd, unsigned long max_pfn) | ||
1566 | { | ||
1567 | pud_t *l3; | ||
1568 | pmd_t *l2; | ||
1569 | |||
1570 | /* Zap identity mapping */ | ||
1571 | init_level4_pgt[0] = __pgd(0); | ||
1572 | |||
1573 | /* Pre-constructed entries are in pfn, so convert to mfn */ | ||
1574 | convert_pfn_mfn(init_level4_pgt); | ||
1575 | convert_pfn_mfn(level3_ident_pgt); | ||
1576 | convert_pfn_mfn(level3_kernel_pgt); | ||
1577 | |||
1578 | l3 = m2v(pgd[pgd_index(__START_KERNEL_map)].pgd); | ||
1579 | l2 = m2v(l3[pud_index(__START_KERNEL_map)].pud); | ||
1580 | |||
1581 | memcpy(level2_ident_pgt, l2, sizeof(pmd_t) * PTRS_PER_PMD); | ||
1582 | memcpy(level2_kernel_pgt, l2, sizeof(pmd_t) * PTRS_PER_PMD); | ||
1583 | |||
1584 | l3 = m2v(pgd[pgd_index(__START_KERNEL_map + PMD_SIZE)].pgd); | ||
1585 | l2 = m2v(l3[pud_index(__START_KERNEL_map + PMD_SIZE)].pud); | ||
1586 | memcpy(level2_fixmap_pgt, l2, sizeof(pmd_t) * PTRS_PER_PMD); | ||
1587 | |||
1588 | /* Set up identity map */ | ||
1589 | xen_map_identity_early(level2_ident_pgt, max_pfn); | ||
1590 | |||
1591 | /* Make pagetable pieces RO */ | ||
1592 | set_page_prot(init_level4_pgt, PAGE_KERNEL_RO); | ||
1593 | set_page_prot(level3_ident_pgt, PAGE_KERNEL_RO); | ||
1594 | set_page_prot(level3_kernel_pgt, PAGE_KERNEL_RO); | ||
1595 | set_page_prot(level3_user_vsyscall, PAGE_KERNEL_RO); | ||
1596 | set_page_prot(level2_kernel_pgt, PAGE_KERNEL_RO); | ||
1597 | set_page_prot(level2_fixmap_pgt, PAGE_KERNEL_RO); | ||
1598 | |||
1599 | /* Pin down new L4 */ | ||
1600 | pin_pagetable_pfn(MMUEXT_PIN_L4_TABLE, | ||
1601 | PFN_DOWN(__pa_symbol(init_level4_pgt))); | ||
1602 | |||
1603 | /* Unpin Xen-provided one */ | ||
1604 | pin_pagetable_pfn(MMUEXT_UNPIN_TABLE, PFN_DOWN(__pa(pgd))); | ||
1605 | |||
1606 | /* Switch over */ | ||
1607 | pgd = init_level4_pgt; | ||
1608 | |||
1609 | /* | ||
1610 | * At this stage there can be no user pgd, and no page | ||
1611 | * structure to attach it to, so make sure we just set kernel | ||
1612 | * pgd. | ||
1613 | */ | ||
1614 | xen_mc_batch(); | ||
1615 | __xen_write_cr3(true, __pa(pgd)); | ||
1616 | xen_mc_issue(PARAVIRT_LAZY_CPU); | ||
1617 | |||
1618 | reserve_early(__pa(xen_start_info->pt_base), | ||
1619 | __pa(xen_start_info->pt_base + | ||
1620 | xen_start_info->nr_pt_frames * PAGE_SIZE), | ||
1621 | "XEN PAGETABLES"); | ||
1622 | |||
1623 | return pgd; | ||
1624 | } | ||
1625 | #else /* !CONFIG_X86_64 */ | ||
1626 | static pmd_t level2_kernel_pgt[PTRS_PER_PMD] __page_aligned_bss; | ||
1627 | |||
1628 | static __init pgd_t *xen_setup_kernel_pagetable(pgd_t *pgd, unsigned long max_pfn) | ||
1629 | { | ||
1630 | pmd_t *kernel_pmd; | ||
1631 | |||
1632 | init_pg_tables_start = __pa(pgd); | ||
1633 | init_pg_tables_end = __pa(pgd) + xen_start_info->nr_pt_frames*PAGE_SIZE; | ||
1634 | max_pfn_mapped = PFN_DOWN(init_pg_tables_end + 512*1024); | ||
1635 | |||
1636 | kernel_pmd = m2v(pgd[KERNEL_PGD_BOUNDARY].pgd); | ||
1637 | memcpy(level2_kernel_pgt, kernel_pmd, sizeof(pmd_t) * PTRS_PER_PMD); | ||
1638 | |||
1639 | xen_map_identity_early(level2_kernel_pgt, max_pfn); | ||
1640 | |||
1641 | memcpy(swapper_pg_dir, pgd, sizeof(pgd_t) * PTRS_PER_PGD); | ||
1642 | set_pgd(&swapper_pg_dir[KERNEL_PGD_BOUNDARY], | ||
1643 | __pgd(__pa(level2_kernel_pgt) | _PAGE_PRESENT)); | ||
1644 | |||
1645 | set_page_prot(level2_kernel_pgt, PAGE_KERNEL_RO); | ||
1646 | set_page_prot(swapper_pg_dir, PAGE_KERNEL_RO); | ||
1647 | set_page_prot(empty_zero_page, PAGE_KERNEL_RO); | ||
1648 | |||
1649 | pin_pagetable_pfn(MMUEXT_UNPIN_TABLE, PFN_DOWN(__pa(pgd))); | ||
1650 | |||
1651 | xen_write_cr3(__pa(swapper_pg_dir)); | ||
1652 | |||
1653 | pin_pagetable_pfn(MMUEXT_PIN_L3_TABLE, PFN_DOWN(__pa(swapper_pg_dir))); | ||
1654 | |||
1655 | return swapper_pg_dir; | ||
1656 | } | ||
1657 | #endif /* CONFIG_X86_64 */ | ||
1658 | |||
1276 | /* First C function to be called on Xen boot */ | 1659 | /* First C function to be called on Xen boot */ |
1277 | asmlinkage void __init xen_start_kernel(void) | 1660 | asmlinkage void __init xen_start_kernel(void) |
1278 | { | 1661 | { |
@@ -1301,53 +1684,56 @@ asmlinkage void __init xen_start_kernel(void) | |||
1301 | 1684 | ||
1302 | machine_ops = xen_machine_ops; | 1685 | machine_ops = xen_machine_ops; |
1303 | 1686 | ||
1304 | #ifdef CONFIG_SMP | 1687 | #ifdef CONFIG_X86_64 |
1305 | smp_ops = xen_smp_ops; | 1688 | /* Disable until direct per-cpu data access. */ |
1689 | have_vcpu_info_placement = 0; | ||
1690 | x86_64_init_pda(); | ||
1306 | #endif | 1691 | #endif |
1307 | 1692 | ||
1693 | xen_smp_init(); | ||
1694 | |||
1308 | /* Get mfn list */ | 1695 | /* Get mfn list */ |
1309 | if (!xen_feature(XENFEAT_auto_translated_physmap)) | 1696 | if (!xen_feature(XENFEAT_auto_translated_physmap)) |
1310 | xen_build_dynamic_phys_to_machine(); | 1697 | xen_build_dynamic_phys_to_machine(); |
1311 | 1698 | ||
1312 | pgd = (pgd_t *)xen_start_info->pt_base; | 1699 | pgd = (pgd_t *)xen_start_info->pt_base; |
1313 | 1700 | ||
1314 | init_pg_tables_start = __pa(pgd); | 1701 | /* Prevent unwanted bits from being set in PTEs. */ |
1315 | init_pg_tables_end = __pa(pgd) + xen_start_info->nr_pt_frames*PAGE_SIZE; | 1702 | __supported_pte_mask &= ~_PAGE_GLOBAL; |
1316 | max_pfn_mapped = (init_pg_tables_end + 512*1024) >> PAGE_SHIFT; | 1703 | if (!is_initial_xendomain()) |
1317 | 1704 | __supported_pte_mask &= ~(_PAGE_PWT | _PAGE_PCD); | |
1318 | init_mm.pgd = pgd; /* use the Xen pagetables to start */ | ||
1319 | |||
1320 | /* keep using Xen gdt for now; no urgent need to change it */ | ||
1321 | |||
1322 | x86_write_percpu(xen_cr3, __pa(pgd)); | ||
1323 | x86_write_percpu(xen_current_cr3, __pa(pgd)); | ||
1324 | 1705 | ||
1325 | /* Don't do the full vcpu_info placement stuff until we have a | 1706 | /* Don't do the full vcpu_info placement stuff until we have a |
1326 | possible map and a non-dummy shared_info. */ | 1707 | possible map and a non-dummy shared_info. */ |
1327 | per_cpu(xen_vcpu, 0) = &HYPERVISOR_shared_info->vcpu_info[0]; | 1708 | per_cpu(xen_vcpu, 0) = &HYPERVISOR_shared_info->vcpu_info[0]; |
1328 | 1709 | ||
1710 | xen_raw_console_write("mapping kernel into physical memory\n"); | ||
1711 | pgd = xen_setup_kernel_pagetable(pgd, xen_start_info->nr_pages); | ||
1712 | |||
1713 | init_mm.pgd = pgd; | ||
1714 | |||
1715 | /* keep using Xen gdt for now; no urgent need to change it */ | ||
1716 | |||
1329 | pv_info.kernel_rpl = 1; | 1717 | pv_info.kernel_rpl = 1; |
1330 | if (xen_feature(XENFEAT_supervisor_mode_kernel)) | 1718 | if (xen_feature(XENFEAT_supervisor_mode_kernel)) |
1331 | pv_info.kernel_rpl = 0; | 1719 | pv_info.kernel_rpl = 0; |
1332 | 1720 | ||
1333 | /* Prevent unwanted bits from being set in PTEs. */ | ||
1334 | __supported_pte_mask &= ~_PAGE_GLOBAL; | ||
1335 | if (!is_initial_xendomain()) | ||
1336 | __supported_pte_mask &= ~(_PAGE_PWT | _PAGE_PCD); | ||
1337 | |||
1338 | /* set the limit of our address space */ | 1721 | /* set the limit of our address space */ |
1339 | xen_reserve_top(); | 1722 | xen_reserve_top(); |
1340 | 1723 | ||
1724 | #ifdef CONFIG_X86_32 | ||
1341 | /* set up basic CPUID stuff */ | 1725 | /* set up basic CPUID stuff */ |
1342 | cpu_detect(&new_cpu_data); | 1726 | cpu_detect(&new_cpu_data); |
1343 | new_cpu_data.hard_math = 1; | 1727 | new_cpu_data.hard_math = 1; |
1344 | new_cpu_data.x86_capability[0] = cpuid_edx(1); | 1728 | new_cpu_data.x86_capability[0] = cpuid_edx(1); |
1729 | #endif | ||
1345 | 1730 | ||
1346 | /* Poke various useful things into boot_params */ | 1731 | /* Poke various useful things into boot_params */ |
1347 | boot_params.hdr.type_of_loader = (9 << 4) | 0; | 1732 | boot_params.hdr.type_of_loader = (9 << 4) | 0; |
1348 | boot_params.hdr.ramdisk_image = xen_start_info->mod_start | 1733 | boot_params.hdr.ramdisk_image = xen_start_info->mod_start |
1349 | ? __pa(xen_start_info->mod_start) : 0; | 1734 | ? __pa(xen_start_info->mod_start) : 0; |
1350 | boot_params.hdr.ramdisk_size = xen_start_info->mod_len; | 1735 | boot_params.hdr.ramdisk_size = xen_start_info->mod_len; |
1736 | boot_params.hdr.cmd_line_ptr = __pa(xen_start_info->cmd_line); | ||
1351 | 1737 | ||
1352 | if (!is_initial_xendomain()) { | 1738 | if (!is_initial_xendomain()) { |
1353 | add_preferred_console("xenboot", 0, NULL); | 1739 | add_preferred_console("xenboot", 0, NULL); |
@@ -1355,6 +1741,21 @@ asmlinkage void __init xen_start_kernel(void) | |||
1355 | add_preferred_console("hvc", 0, NULL); | 1741 | add_preferred_console("hvc", 0, NULL); |
1356 | } | 1742 | } |
1357 | 1743 | ||
1744 | xen_raw_console_write("about to get started...\n"); | ||
1745 | |||
1746 | #if 0 | ||
1747 | xen_raw_printk("&boot_params=%p __pa(&boot_params)=%lx __va(__pa(&boot_params))=%lx\n", | ||
1748 | &boot_params, __pa_symbol(&boot_params), | ||
1749 | __va(__pa_symbol(&boot_params))); | ||
1750 | |||
1751 | walk(pgd, &boot_params); | ||
1752 | walk(pgd, __va(__pa(&boot_params))); | ||
1753 | #endif | ||
1754 | |||
1358 | /* Start the world */ | 1755 | /* Start the world */ |
1756 | #ifdef CONFIG_X86_32 | ||
1359 | i386_start_kernel(); | 1757 | i386_start_kernel(); |
1758 | #else | ||
1759 | x86_64_start_reservations((char *)__pa_symbol(&boot_params)); | ||
1760 | #endif | ||
1360 | } | 1761 | } |
diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c index ff0aa74afaa1..aa37469da696 100644 --- a/arch/x86/xen/mmu.c +++ b/arch/x86/xen/mmu.c | |||
@@ -44,8 +44,10 @@ | |||
44 | 44 | ||
45 | #include <asm/pgtable.h> | 45 | #include <asm/pgtable.h> |
46 | #include <asm/tlbflush.h> | 46 | #include <asm/tlbflush.h> |
47 | #include <asm/fixmap.h> | ||
47 | #include <asm/mmu_context.h> | 48 | #include <asm/mmu_context.h> |
48 | #include <asm/paravirt.h> | 49 | #include <asm/paravirt.h> |
50 | #include <asm/linkage.h> | ||
49 | 51 | ||
50 | #include <asm/xen/hypercall.h> | 52 | #include <asm/xen/hypercall.h> |
51 | #include <asm/xen/hypervisor.h> | 53 | #include <asm/xen/hypervisor.h> |
@@ -56,26 +58,29 @@ | |||
56 | #include "multicalls.h" | 58 | #include "multicalls.h" |
57 | #include "mmu.h" | 59 | #include "mmu.h" |
58 | 60 | ||
61 | /* | ||
62 | * Just beyond the highest usermode address. STACK_TOP_MAX has a | ||
63 | * redzone above it, so round it up to a PGD boundary. | ||
64 | */ | ||
65 | #define USER_LIMIT ((STACK_TOP_MAX + PGDIR_SIZE - 1) & PGDIR_MASK) | ||
66 | |||
67 | |||
59 | #define P2M_ENTRIES_PER_PAGE (PAGE_SIZE / sizeof(unsigned long)) | 68 | #define P2M_ENTRIES_PER_PAGE (PAGE_SIZE / sizeof(unsigned long)) |
60 | #define TOP_ENTRIES (MAX_DOMAIN_PAGES / P2M_ENTRIES_PER_PAGE) | 69 | #define TOP_ENTRIES (MAX_DOMAIN_PAGES / P2M_ENTRIES_PER_PAGE) |
61 | 70 | ||
62 | /* Placeholder for holes in the address space */ | 71 | /* Placeholder for holes in the address space */ |
63 | static unsigned long p2m_missing[P2M_ENTRIES_PER_PAGE] | 72 | static unsigned long p2m_missing[P2M_ENTRIES_PER_PAGE] __page_aligned_data = |
64 | __attribute__((section(".data.page_aligned"))) = | ||
65 | { [ 0 ... P2M_ENTRIES_PER_PAGE-1 ] = ~0UL }; | 73 | { [ 0 ... P2M_ENTRIES_PER_PAGE-1 ] = ~0UL }; |
66 | 74 | ||
67 | /* Array of pointers to pages containing p2m entries */ | 75 | /* Array of pointers to pages containing p2m entries */ |
68 | static unsigned long *p2m_top[TOP_ENTRIES] | 76 | static unsigned long *p2m_top[TOP_ENTRIES] __page_aligned_data = |
69 | __attribute__((section(".data.page_aligned"))) = | ||
70 | { [ 0 ... TOP_ENTRIES - 1] = &p2m_missing[0] }; | 77 | { [ 0 ... TOP_ENTRIES - 1] = &p2m_missing[0] }; |
71 | 78 | ||
72 | /* Arrays of p2m arrays expressed in mfns used for save/restore */ | 79 | /* Arrays of p2m arrays expressed in mfns used for save/restore */ |
73 | static unsigned long p2m_top_mfn[TOP_ENTRIES] | 80 | static unsigned long p2m_top_mfn[TOP_ENTRIES] __page_aligned_bss; |
74 | __attribute__((section(".bss.page_aligned"))); | ||
75 | 81 | ||
76 | static unsigned long p2m_top_mfn_list[ | 82 | static unsigned long p2m_top_mfn_list[TOP_ENTRIES / P2M_ENTRIES_PER_PAGE] |
77 | PAGE_ALIGN(TOP_ENTRIES / P2M_ENTRIES_PER_PAGE)] | 83 | __page_aligned_bss; |
78 | __attribute__((section(".bss.page_aligned"))); | ||
79 | 84 | ||
80 | static inline unsigned p2m_top_index(unsigned long pfn) | 85 | static inline unsigned p2m_top_index(unsigned long pfn) |
81 | { | 86 | { |
@@ -181,15 +186,16 @@ void set_phys_to_machine(unsigned long pfn, unsigned long mfn) | |||
181 | p2m_top[topidx][idx] = mfn; | 186 | p2m_top[topidx][idx] = mfn; |
182 | } | 187 | } |
183 | 188 | ||
184 | xmaddr_t arbitrary_virt_to_machine(unsigned long address) | 189 | xmaddr_t arbitrary_virt_to_machine(void *vaddr) |
185 | { | 190 | { |
191 | unsigned long address = (unsigned long)vaddr; | ||
186 | unsigned int level; | 192 | unsigned int level; |
187 | pte_t *pte = lookup_address(address, &level); | 193 | pte_t *pte = lookup_address(address, &level); |
188 | unsigned offset = address & ~PAGE_MASK; | 194 | unsigned offset = address & ~PAGE_MASK; |
189 | 195 | ||
190 | BUG_ON(pte == NULL); | 196 | BUG_ON(pte == NULL); |
191 | 197 | ||
192 | return XMADDR((pte_mfn(*pte) << PAGE_SHIFT) + offset); | 198 | return XMADDR(((phys_addr_t)pte_mfn(*pte) << PAGE_SHIFT) + offset); |
193 | } | 199 | } |
194 | 200 | ||
195 | void make_lowmem_page_readonly(void *vaddr) | 201 | void make_lowmem_page_readonly(void *vaddr) |
@@ -256,7 +262,8 @@ void xen_set_pmd_hyper(pmd_t *ptr, pmd_t val) | |||
256 | 262 | ||
257 | xen_mc_batch(); | 263 | xen_mc_batch(); |
258 | 264 | ||
259 | u.ptr = virt_to_machine(ptr).maddr; | 265 | /* ptr may be ioremapped for 64-bit pagetable setup */ |
266 | u.ptr = arbitrary_virt_to_machine(ptr).maddr; | ||
260 | u.val = pmd_val_ma(val); | 267 | u.val = pmd_val_ma(val); |
261 | extend_mmu_update(&u); | 268 | extend_mmu_update(&u); |
262 | 269 | ||
@@ -283,35 +290,7 @@ void xen_set_pmd(pmd_t *ptr, pmd_t val) | |||
283 | */ | 290 | */ |
284 | void set_pte_mfn(unsigned long vaddr, unsigned long mfn, pgprot_t flags) | 291 | void set_pte_mfn(unsigned long vaddr, unsigned long mfn, pgprot_t flags) |
285 | { | 292 | { |
286 | pgd_t *pgd; | 293 | set_pte_vaddr(vaddr, mfn_pte(mfn, flags)); |
287 | pud_t *pud; | ||
288 | pmd_t *pmd; | ||
289 | pte_t *pte; | ||
290 | |||
291 | pgd = swapper_pg_dir + pgd_index(vaddr); | ||
292 | if (pgd_none(*pgd)) { | ||
293 | BUG(); | ||
294 | return; | ||
295 | } | ||
296 | pud = pud_offset(pgd, vaddr); | ||
297 | if (pud_none(*pud)) { | ||
298 | BUG(); | ||
299 | return; | ||
300 | } | ||
301 | pmd = pmd_offset(pud, vaddr); | ||
302 | if (pmd_none(*pmd)) { | ||
303 | BUG(); | ||
304 | return; | ||
305 | } | ||
306 | pte = pte_offset_kernel(pmd, vaddr); | ||
307 | /* <mfn,flags> stored as-is, to permit clearing entries */ | ||
308 | xen_set_pte(pte, mfn_pte(mfn, flags)); | ||
309 | |||
310 | /* | ||
311 | * It's enough to flush this one mapping. | ||
312 | * (PGE mappings get flushed as well) | ||
313 | */ | ||
314 | __flush_tlb_one(vaddr); | ||
315 | } | 294 | } |
316 | 295 | ||
317 | void xen_set_pte_at(struct mm_struct *mm, unsigned long addr, | 296 | void xen_set_pte_at(struct mm_struct *mm, unsigned long addr, |
@@ -364,8 +343,8 @@ void xen_ptep_modify_prot_commit(struct mm_struct *mm, unsigned long addr, | |||
364 | static pteval_t pte_mfn_to_pfn(pteval_t val) | 343 | static pteval_t pte_mfn_to_pfn(pteval_t val) |
365 | { | 344 | { |
366 | if (val & _PAGE_PRESENT) { | 345 | if (val & _PAGE_PRESENT) { |
367 | unsigned long mfn = (val & PTE_MASK) >> PAGE_SHIFT; | 346 | unsigned long mfn = (val & PTE_PFN_MASK) >> PAGE_SHIFT; |
368 | pteval_t flags = val & ~PTE_MASK; | 347 | pteval_t flags = val & PTE_FLAGS_MASK; |
369 | val = ((pteval_t)mfn_to_pfn(mfn) << PAGE_SHIFT) | flags; | 348 | val = ((pteval_t)mfn_to_pfn(mfn) << PAGE_SHIFT) | flags; |
370 | } | 349 | } |
371 | 350 | ||
@@ -375,8 +354,8 @@ static pteval_t pte_mfn_to_pfn(pteval_t val) | |||
375 | static pteval_t pte_pfn_to_mfn(pteval_t val) | 354 | static pteval_t pte_pfn_to_mfn(pteval_t val) |
376 | { | 355 | { |
377 | if (val & _PAGE_PRESENT) { | 356 | if (val & _PAGE_PRESENT) { |
378 | unsigned long pfn = (val & PTE_MASK) >> PAGE_SHIFT; | 357 | unsigned long pfn = (val & PTE_PFN_MASK) >> PAGE_SHIFT; |
379 | pteval_t flags = val & ~PTE_MASK; | 358 | pteval_t flags = val & PTE_FLAGS_MASK; |
380 | val = ((pteval_t)pfn_to_mfn(pfn) << PAGE_SHIFT) | flags; | 359 | val = ((pteval_t)pfn_to_mfn(pfn) << PAGE_SHIFT) | flags; |
381 | } | 360 | } |
382 | 361 | ||
@@ -418,7 +397,8 @@ void xen_set_pud_hyper(pud_t *ptr, pud_t val) | |||
418 | 397 | ||
419 | xen_mc_batch(); | 398 | xen_mc_batch(); |
420 | 399 | ||
421 | u.ptr = virt_to_machine(ptr).maddr; | 400 | /* ptr may be ioremapped for 64-bit pagetable setup */ |
401 | u.ptr = arbitrary_virt_to_machine(ptr).maddr; | ||
422 | u.val = pud_val_ma(val); | 402 | u.val = pud_val_ma(val); |
423 | extend_mmu_update(&u); | 403 | extend_mmu_update(&u); |
424 | 404 | ||
@@ -441,14 +421,19 @@ void xen_set_pud(pud_t *ptr, pud_t val) | |||
441 | 421 | ||
442 | void xen_set_pte(pte_t *ptep, pte_t pte) | 422 | void xen_set_pte(pte_t *ptep, pte_t pte) |
443 | { | 423 | { |
424 | #ifdef CONFIG_X86_PAE | ||
444 | ptep->pte_high = pte.pte_high; | 425 | ptep->pte_high = pte.pte_high; |
445 | smp_wmb(); | 426 | smp_wmb(); |
446 | ptep->pte_low = pte.pte_low; | 427 | ptep->pte_low = pte.pte_low; |
428 | #else | ||
429 | *ptep = pte; | ||
430 | #endif | ||
447 | } | 431 | } |
448 | 432 | ||
433 | #ifdef CONFIG_X86_PAE | ||
449 | void xen_set_pte_atomic(pte_t *ptep, pte_t pte) | 434 | void xen_set_pte_atomic(pte_t *ptep, pte_t pte) |
450 | { | 435 | { |
451 | set_64bit((u64 *)ptep, pte_val_ma(pte)); | 436 | set_64bit((u64 *)ptep, native_pte_val(pte)); |
452 | } | 437 | } |
453 | 438 | ||
454 | void xen_pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep) | 439 | void xen_pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep) |
@@ -462,6 +447,7 @@ void xen_pmd_clear(pmd_t *pmdp) | |||
462 | { | 447 | { |
463 | set_pmd(pmdp, __pmd(0)); | 448 | set_pmd(pmdp, __pmd(0)); |
464 | } | 449 | } |
450 | #endif /* CONFIG_X86_PAE */ | ||
465 | 451 | ||
466 | pmd_t xen_make_pmd(pmdval_t pmd) | 452 | pmd_t xen_make_pmd(pmdval_t pmd) |
467 | { | 453 | { |
@@ -469,78 +455,189 @@ pmd_t xen_make_pmd(pmdval_t pmd) | |||
469 | return native_make_pmd(pmd); | 455 | return native_make_pmd(pmd); |
470 | } | 456 | } |
471 | 457 | ||
458 | #if PAGETABLE_LEVELS == 4 | ||
459 | pudval_t xen_pud_val(pud_t pud) | ||
460 | { | ||
461 | return pte_mfn_to_pfn(pud.pud); | ||
462 | } | ||
463 | |||
464 | pud_t xen_make_pud(pudval_t pud) | ||
465 | { | ||
466 | pud = pte_pfn_to_mfn(pud); | ||
467 | |||
468 | return native_make_pud(pud); | ||
469 | } | ||
470 | |||
471 | pgd_t *xen_get_user_pgd(pgd_t *pgd) | ||
472 | { | ||
473 | pgd_t *pgd_page = (pgd_t *)(((unsigned long)pgd) & PAGE_MASK); | ||
474 | unsigned offset = pgd - pgd_page; | ||
475 | pgd_t *user_ptr = NULL; | ||
476 | |||
477 | if (offset < pgd_index(USER_LIMIT)) { | ||
478 | struct page *page = virt_to_page(pgd_page); | ||
479 | user_ptr = (pgd_t *)page->private; | ||
480 | if (user_ptr) | ||
481 | user_ptr += offset; | ||
482 | } | ||
483 | |||
484 | return user_ptr; | ||
485 | } | ||
486 | |||
487 | static void __xen_set_pgd_hyper(pgd_t *ptr, pgd_t val) | ||
488 | { | ||
489 | struct mmu_update u; | ||
490 | |||
491 | u.ptr = virt_to_machine(ptr).maddr; | ||
492 | u.val = pgd_val_ma(val); | ||
493 | extend_mmu_update(&u); | ||
494 | } | ||
495 | |||
496 | /* | ||
497 | * Raw hypercall-based set_pgd, intended for in early boot before | ||
498 | * there's a page structure. This implies: | ||
499 | * 1. The only existing pagetable is the kernel's | ||
500 | * 2. It is always pinned | ||
501 | * 3. It has no user pagetable attached to it | ||
502 | */ | ||
503 | void __init xen_set_pgd_hyper(pgd_t *ptr, pgd_t val) | ||
504 | { | ||
505 | preempt_disable(); | ||
506 | |||
507 | xen_mc_batch(); | ||
508 | |||
509 | __xen_set_pgd_hyper(ptr, val); | ||
510 | |||
511 | xen_mc_issue(PARAVIRT_LAZY_MMU); | ||
512 | |||
513 | preempt_enable(); | ||
514 | } | ||
515 | |||
516 | void xen_set_pgd(pgd_t *ptr, pgd_t val) | ||
517 | { | ||
518 | pgd_t *user_ptr = xen_get_user_pgd(ptr); | ||
519 | |||
520 | /* If page is not pinned, we can just update the entry | ||
521 | directly */ | ||
522 | if (!page_pinned(ptr)) { | ||
523 | *ptr = val; | ||
524 | if (user_ptr) { | ||
525 | WARN_ON(page_pinned(user_ptr)); | ||
526 | *user_ptr = val; | ||
527 | } | ||
528 | return; | ||
529 | } | ||
530 | |||
531 | /* If it's pinned, then we can at least batch the kernel and | ||
532 | user updates together. */ | ||
533 | xen_mc_batch(); | ||
534 | |||
535 | __xen_set_pgd_hyper(ptr, val); | ||
536 | if (user_ptr) | ||
537 | __xen_set_pgd_hyper(user_ptr, val); | ||
538 | |||
539 | xen_mc_issue(PARAVIRT_LAZY_MMU); | ||
540 | } | ||
541 | #endif /* PAGETABLE_LEVELS == 4 */ | ||
542 | |||
472 | /* | 543 | /* |
473 | (Yet another) pagetable walker. This one is intended for pinning a | 544 | * (Yet another) pagetable walker. This one is intended for pinning a |
474 | pagetable. This means that it walks a pagetable and calls the | 545 | * pagetable. This means that it walks a pagetable and calls the |
475 | callback function on each page it finds making up the page table, | 546 | * callback function on each page it finds making up the page table, |
476 | at every level. It walks the entire pagetable, but it only bothers | 547 | * at every level. It walks the entire pagetable, but it only bothers |
477 | pinning pte pages which are below pte_limit. In the normal case | 548 | * pinning pte pages which are below limit. In the normal case this |
478 | this will be TASK_SIZE, but at boot we need to pin up to | 549 | * will be STACK_TOP_MAX, but at boot we need to pin up to |
479 | FIXADDR_TOP. But the important bit is that we don't pin beyond | 550 | * FIXADDR_TOP. |
480 | there, because then we start getting into Xen's ptes. | 551 | * |
481 | */ | 552 | * For 32-bit the important bit is that we don't pin beyond there, |
482 | static int pgd_walk(pgd_t *pgd_base, int (*func)(struct page *, enum pt_level), | 553 | * because then we start getting into Xen's ptes. |
554 | * | ||
555 | * For 64-bit, we must skip the Xen hole in the middle of the address | ||
556 | * space, just after the big x86-64 virtual hole. | ||
557 | */ | ||
558 | static int pgd_walk(pgd_t *pgd, int (*func)(struct page *, enum pt_level), | ||
483 | unsigned long limit) | 559 | unsigned long limit) |
484 | { | 560 | { |
485 | pgd_t *pgd = pgd_base; | ||
486 | int flush = 0; | 561 | int flush = 0; |
487 | unsigned long addr = 0; | 562 | unsigned hole_low, hole_high; |
488 | unsigned long pgd_next; | 563 | unsigned pgdidx_limit, pudidx_limit, pmdidx_limit; |
564 | unsigned pgdidx, pudidx, pmdidx; | ||
489 | 565 | ||
490 | BUG_ON(limit > FIXADDR_TOP); | 566 | /* The limit is the last byte to be touched */ |
567 | limit--; | ||
568 | BUG_ON(limit >= FIXADDR_TOP); | ||
491 | 569 | ||
492 | if (xen_feature(XENFEAT_auto_translated_physmap)) | 570 | if (xen_feature(XENFEAT_auto_translated_physmap)) |
493 | return 0; | 571 | return 0; |
494 | 572 | ||
495 | for (; addr != FIXADDR_TOP; pgd++, addr = pgd_next) { | 573 | /* |
574 | * 64-bit has a great big hole in the middle of the address | ||
575 | * space, which contains the Xen mappings. On 32-bit these | ||
576 | * will end up making a zero-sized hole and so is a no-op. | ||
577 | */ | ||
578 | hole_low = pgd_index(USER_LIMIT); | ||
579 | hole_high = pgd_index(PAGE_OFFSET); | ||
580 | |||
581 | pgdidx_limit = pgd_index(limit); | ||
582 | #if PTRS_PER_PUD > 1 | ||
583 | pudidx_limit = pud_index(limit); | ||
584 | #else | ||
585 | pudidx_limit = 0; | ||
586 | #endif | ||
587 | #if PTRS_PER_PMD > 1 | ||
588 | pmdidx_limit = pmd_index(limit); | ||
589 | #else | ||
590 | pmdidx_limit = 0; | ||
591 | #endif | ||
592 | |||
593 | flush |= (*func)(virt_to_page(pgd), PT_PGD); | ||
594 | |||
595 | for (pgdidx = 0; pgdidx <= pgdidx_limit; pgdidx++) { | ||
496 | pud_t *pud; | 596 | pud_t *pud; |
497 | unsigned long pud_limit, pud_next; | ||
498 | 597 | ||
499 | pgd_next = pud_limit = pgd_addr_end(addr, FIXADDR_TOP); | 598 | if (pgdidx >= hole_low && pgdidx < hole_high) |
599 | continue; | ||
500 | 600 | ||
501 | if (!pgd_val(*pgd)) | 601 | if (!pgd_val(pgd[pgdidx])) |
502 | continue; | 602 | continue; |
503 | 603 | ||
504 | pud = pud_offset(pgd, 0); | 604 | pud = pud_offset(&pgd[pgdidx], 0); |
505 | 605 | ||
506 | if (PTRS_PER_PUD > 1) /* not folded */ | 606 | if (PTRS_PER_PUD > 1) /* not folded */ |
507 | flush |= (*func)(virt_to_page(pud), PT_PUD); | 607 | flush |= (*func)(virt_to_page(pud), PT_PUD); |
508 | 608 | ||
509 | for (; addr != pud_limit; pud++, addr = pud_next) { | 609 | for (pudidx = 0; pudidx < PTRS_PER_PUD; pudidx++) { |
510 | pmd_t *pmd; | 610 | pmd_t *pmd; |
511 | unsigned long pmd_limit; | ||
512 | 611 | ||
513 | pud_next = pud_addr_end(addr, pud_limit); | 612 | if (pgdidx == pgdidx_limit && |
514 | 613 | pudidx > pudidx_limit) | |
515 | if (pud_next < limit) | 614 | goto out; |
516 | pmd_limit = pud_next; | ||
517 | else | ||
518 | pmd_limit = limit; | ||
519 | 615 | ||
520 | if (pud_none(*pud)) | 616 | if (pud_none(pud[pudidx])) |
521 | continue; | 617 | continue; |
522 | 618 | ||
523 | pmd = pmd_offset(pud, 0); | 619 | pmd = pmd_offset(&pud[pudidx], 0); |
524 | 620 | ||
525 | if (PTRS_PER_PMD > 1) /* not folded */ | 621 | if (PTRS_PER_PMD > 1) /* not folded */ |
526 | flush |= (*func)(virt_to_page(pmd), PT_PMD); | 622 | flush |= (*func)(virt_to_page(pmd), PT_PMD); |
527 | 623 | ||
528 | for (; addr != pmd_limit; pmd++) { | 624 | for (pmdidx = 0; pmdidx < PTRS_PER_PMD; pmdidx++) { |
529 | addr += (PAGE_SIZE * PTRS_PER_PTE); | 625 | struct page *pte; |
530 | if ((pmd_limit-1) < (addr-1)) { | 626 | |
531 | addr = pmd_limit; | 627 | if (pgdidx == pgdidx_limit && |
532 | break; | 628 | pudidx == pudidx_limit && |
533 | } | 629 | pmdidx > pmdidx_limit) |
630 | goto out; | ||
534 | 631 | ||
535 | if (pmd_none(*pmd)) | 632 | if (pmd_none(pmd[pmdidx])) |
536 | continue; | 633 | continue; |
537 | 634 | ||
538 | flush |= (*func)(pmd_page(*pmd), PT_PTE); | 635 | pte = pmd_page(pmd[pmdidx]); |
636 | flush |= (*func)(pte, PT_PTE); | ||
539 | } | 637 | } |
540 | } | 638 | } |
541 | } | 639 | } |
542 | 640 | out: | |
543 | flush |= (*func)(virt_to_page(pgd_base), PT_PGD); | ||
544 | 641 | ||
545 | return flush; | 642 | return flush; |
546 | } | 643 | } |
@@ -622,14 +719,31 @@ void xen_pgd_pin(pgd_t *pgd) | |||
622 | { | 719 | { |
623 | xen_mc_batch(); | 720 | xen_mc_batch(); |
624 | 721 | ||
625 | if (pgd_walk(pgd, pin_page, TASK_SIZE)) { | 722 | if (pgd_walk(pgd, pin_page, USER_LIMIT)) { |
626 | /* re-enable interrupts for kmap_flush_unused */ | 723 | /* re-enable interrupts for kmap_flush_unused */ |
627 | xen_mc_issue(0); | 724 | xen_mc_issue(0); |
628 | kmap_flush_unused(); | 725 | kmap_flush_unused(); |
629 | xen_mc_batch(); | 726 | xen_mc_batch(); |
630 | } | 727 | } |
631 | 728 | ||
729 | #ifdef CONFIG_X86_64 | ||
730 | { | ||
731 | pgd_t *user_pgd = xen_get_user_pgd(pgd); | ||
732 | |||
733 | xen_do_pin(MMUEXT_PIN_L4_TABLE, PFN_DOWN(__pa(pgd))); | ||
734 | |||
735 | if (user_pgd) { | ||
736 | pin_page(virt_to_page(user_pgd), PT_PGD); | ||
737 | xen_do_pin(MMUEXT_PIN_L4_TABLE, PFN_DOWN(__pa(user_pgd))); | ||
738 | } | ||
739 | } | ||
740 | #else /* CONFIG_X86_32 */ | ||
741 | #ifdef CONFIG_X86_PAE | ||
742 | /* Need to make sure unshared kernel PMD is pinnable */ | ||
743 | pin_page(virt_to_page(pgd_page(pgd[pgd_index(TASK_SIZE)])), PT_PMD); | ||
744 | #endif | ||
632 | xen_do_pin(MMUEXT_PIN_L3_TABLE, PFN_DOWN(__pa(pgd))); | 745 | xen_do_pin(MMUEXT_PIN_L3_TABLE, PFN_DOWN(__pa(pgd))); |
746 | #endif /* CONFIG_X86_64 */ | ||
633 | xen_mc_issue(0); | 747 | xen_mc_issue(0); |
634 | } | 748 | } |
635 | 749 | ||
@@ -656,9 +770,11 @@ void xen_mm_pin_all(void) | |||
656 | spin_unlock_irqrestore(&pgd_lock, flags); | 770 | spin_unlock_irqrestore(&pgd_lock, flags); |
657 | } | 771 | } |
658 | 772 | ||
659 | /* The init_mm pagetable is really pinned as soon as its created, but | 773 | /* |
660 | that's before we have page structures to store the bits. So do all | 774 | * The init_mm pagetable is really pinned as soon as its created, but |
661 | the book-keeping now. */ | 775 | * that's before we have page structures to store the bits. So do all |
776 | * the book-keeping now. | ||
777 | */ | ||
662 | static __init int mark_pinned(struct page *page, enum pt_level level) | 778 | static __init int mark_pinned(struct page *page, enum pt_level level) |
663 | { | 779 | { |
664 | SetPagePinned(page); | 780 | SetPagePinned(page); |
@@ -708,7 +824,23 @@ static void xen_pgd_unpin(pgd_t *pgd) | |||
708 | 824 | ||
709 | xen_do_pin(MMUEXT_UNPIN_TABLE, PFN_DOWN(__pa(pgd))); | 825 | xen_do_pin(MMUEXT_UNPIN_TABLE, PFN_DOWN(__pa(pgd))); |
710 | 826 | ||
711 | pgd_walk(pgd, unpin_page, TASK_SIZE); | 827 | #ifdef CONFIG_X86_64 |
828 | { | ||
829 | pgd_t *user_pgd = xen_get_user_pgd(pgd); | ||
830 | |||
831 | if (user_pgd) { | ||
832 | xen_do_pin(MMUEXT_UNPIN_TABLE, PFN_DOWN(__pa(user_pgd))); | ||
833 | unpin_page(virt_to_page(user_pgd), PT_PGD); | ||
834 | } | ||
835 | } | ||
836 | #endif | ||
837 | |||
838 | #ifdef CONFIG_X86_PAE | ||
839 | /* Need to make sure unshared kernel PMD is unpinned */ | ||
840 | pin_page(virt_to_page(pgd_page(pgd[pgd_index(TASK_SIZE)])), PT_PMD); | ||
841 | #endif | ||
842 | |||
843 | pgd_walk(pgd, unpin_page, USER_LIMIT); | ||
712 | 844 | ||
713 | xen_mc_issue(0); | 845 | xen_mc_issue(0); |
714 | } | 846 | } |
@@ -727,7 +859,6 @@ void xen_mm_unpin_all(void) | |||
727 | list_for_each_entry(page, &pgd_list, lru) { | 859 | list_for_each_entry(page, &pgd_list, lru) { |
728 | if (PageSavePinned(page)) { | 860 | if (PageSavePinned(page)) { |
729 | BUG_ON(!PagePinned(page)); | 861 | BUG_ON(!PagePinned(page)); |
730 | printk("unpinning pinned %p\n", page_address(page)); | ||
731 | xen_pgd_unpin((pgd_t *)page_address(page)); | 862 | xen_pgd_unpin((pgd_t *)page_address(page)); |
732 | ClearPageSavePinned(page); | 863 | ClearPageSavePinned(page); |
733 | } | 864 | } |
@@ -757,8 +888,15 @@ void xen_dup_mmap(struct mm_struct *oldmm, struct mm_struct *mm) | |||
757 | static void drop_other_mm_ref(void *info) | 888 | static void drop_other_mm_ref(void *info) |
758 | { | 889 | { |
759 | struct mm_struct *mm = info; | 890 | struct mm_struct *mm = info; |
891 | struct mm_struct *active_mm; | ||
892 | |||
893 | #ifdef CONFIG_X86_64 | ||
894 | active_mm = read_pda(active_mm); | ||
895 | #else | ||
896 | active_mm = __get_cpu_var(cpu_tlbstate).active_mm; | ||
897 | #endif | ||
760 | 898 | ||
761 | if (__get_cpu_var(cpu_tlbstate).active_mm == mm) | 899 | if (active_mm == mm) |
762 | leave_mm(smp_processor_id()); | 900 | leave_mm(smp_processor_id()); |
763 | 901 | ||
764 | /* If this cpu still has a stale cr3 reference, then make sure | 902 | /* If this cpu still has a stale cr3 reference, then make sure |
diff --git a/arch/x86/xen/mmu.h b/arch/x86/xen/mmu.h index 297bf9f5b8bc..0f59bd03f9e3 100644 --- a/arch/x86/xen/mmu.h +++ b/arch/x86/xen/mmu.h | |||
@@ -10,18 +10,6 @@ enum pt_level { | |||
10 | PT_PTE | 10 | PT_PTE |
11 | }; | 11 | }; |
12 | 12 | ||
13 | /* | ||
14 | * Page-directory addresses above 4GB do not fit into architectural %cr3. | ||
15 | * When accessing %cr3, or equivalent field in vcpu_guest_context, guests | ||
16 | * must use the following accessor macros to pack/unpack valid MFNs. | ||
17 | * | ||
18 | * Note that Xen is using the fact that the pagetable base is always | ||
19 | * page-aligned, and putting the 12 MSB of the address into the 12 LSB | ||
20 | * of cr3. | ||
21 | */ | ||
22 | #define xen_pfn_to_cr3(pfn) (((unsigned)(pfn) << 12) | ((unsigned)(pfn) >> 20)) | ||
23 | #define xen_cr3_to_pfn(cr3) (((unsigned)(cr3) >> 12) | ((unsigned)(cr3) << 20)) | ||
24 | |||
25 | 13 | ||
26 | void set_pte_mfn(unsigned long vaddr, unsigned long pfn, pgprot_t flags); | 14 | void set_pte_mfn(unsigned long vaddr, unsigned long pfn, pgprot_t flags); |
27 | 15 | ||
@@ -44,13 +32,26 @@ pgd_t xen_make_pgd(pgdval_t); | |||
44 | void xen_set_pte(pte_t *ptep, pte_t pteval); | 32 | void xen_set_pte(pte_t *ptep, pte_t pteval); |
45 | void xen_set_pte_at(struct mm_struct *mm, unsigned long addr, | 33 | void xen_set_pte_at(struct mm_struct *mm, unsigned long addr, |
46 | pte_t *ptep, pte_t pteval); | 34 | pte_t *ptep, pte_t pteval); |
35 | |||
36 | #ifdef CONFIG_X86_PAE | ||
47 | void xen_set_pte_atomic(pte_t *ptep, pte_t pte); | 37 | void xen_set_pte_atomic(pte_t *ptep, pte_t pte); |
38 | void xen_pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep); | ||
39 | void xen_pmd_clear(pmd_t *pmdp); | ||
40 | #endif /* CONFIG_X86_PAE */ | ||
41 | |||
48 | void xen_set_pmd(pmd_t *pmdp, pmd_t pmdval); | 42 | void xen_set_pmd(pmd_t *pmdp, pmd_t pmdval); |
49 | void xen_set_pud(pud_t *ptr, pud_t val); | 43 | void xen_set_pud(pud_t *ptr, pud_t val); |
50 | void xen_set_pmd_hyper(pmd_t *pmdp, pmd_t pmdval); | 44 | void xen_set_pmd_hyper(pmd_t *pmdp, pmd_t pmdval); |
51 | void xen_set_pud_hyper(pud_t *ptr, pud_t val); | 45 | void xen_set_pud_hyper(pud_t *ptr, pud_t val); |
52 | void xen_pte_clear(struct mm_struct *mm, unsigned long addr, pte_t *ptep); | 46 | |
53 | void xen_pmd_clear(pmd_t *pmdp); | 47 | #if PAGETABLE_LEVELS == 4 |
48 | pudval_t xen_pud_val(pud_t pud); | ||
49 | pud_t xen_make_pud(pudval_t pudval); | ||
50 | void xen_set_pgd(pgd_t *pgdp, pgd_t pgd); | ||
51 | void xen_set_pgd_hyper(pgd_t *pgdp, pgd_t pgd); | ||
52 | #endif | ||
53 | |||
54 | pgd_t *xen_get_user_pgd(pgd_t *pgd); | ||
54 | 55 | ||
55 | pte_t xen_ptep_modify_prot_start(struct mm_struct *mm, unsigned long addr, pte_t *ptep); | 56 | pte_t xen_ptep_modify_prot_start(struct mm_struct *mm, unsigned long addr, pte_t *ptep); |
56 | void xen_ptep_modify_prot_commit(struct mm_struct *mm, unsigned long addr, | 57 | void xen_ptep_modify_prot_commit(struct mm_struct *mm, unsigned long addr, |
diff --git a/arch/x86/xen/multicalls.c b/arch/x86/xen/multicalls.c index 3c63c4da7ed1..9efd1c6c9776 100644 --- a/arch/x86/xen/multicalls.c +++ b/arch/x86/xen/multicalls.c | |||
@@ -76,6 +76,7 @@ void xen_mc_flush(void) | |||
76 | if (ret) { | 76 | if (ret) { |
77 | printk(KERN_ERR "%d multicall(s) failed: cpu %d\n", | 77 | printk(KERN_ERR "%d multicall(s) failed: cpu %d\n", |
78 | ret, smp_processor_id()); | 78 | ret, smp_processor_id()); |
79 | dump_stack(); | ||
79 | for (i = 0; i < b->mcidx; i++) { | 80 | for (i = 0; i < b->mcidx; i++) { |
80 | printk(" call %2d/%d: op=%lu arg=[%lx] result=%ld\n", | 81 | printk(" call %2d/%d: op=%lu arg=[%lx] result=%ld\n", |
81 | i+1, b->mcidx, | 82 | i+1, b->mcidx, |
diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c index e0a39595bde3..b6acc3a0af46 100644 --- a/arch/x86/xen/setup.c +++ b/arch/x86/xen/setup.c | |||
@@ -83,30 +83,72 @@ static void xen_idle(void) | |||
83 | 83 | ||
84 | /* | 84 | /* |
85 | * Set the bit indicating "nosegneg" library variants should be used. | 85 | * Set the bit indicating "nosegneg" library variants should be used. |
86 | * We only need to bother in pure 32-bit mode; compat 32-bit processes | ||
87 | * can have un-truncated segments, so wrapping around is allowed. | ||
86 | */ | 88 | */ |
87 | static void __init fiddle_vdso(void) | 89 | static void __init fiddle_vdso(void) |
88 | { | 90 | { |
89 | extern const char vdso32_default_start; | 91 | #ifdef CONFIG_X86_32 |
90 | u32 *mask = VDSO32_SYMBOL(&vdso32_default_start, NOTE_MASK); | 92 | u32 *mask; |
93 | mask = VDSO32_SYMBOL(&vdso32_int80_start, NOTE_MASK); | ||
91 | *mask |= 1 << VDSO_NOTE_NONEGSEG_BIT; | 94 | *mask |= 1 << VDSO_NOTE_NONEGSEG_BIT; |
95 | mask = VDSO32_SYMBOL(&vdso32_sysenter_start, NOTE_MASK); | ||
96 | *mask |= 1 << VDSO_NOTE_NONEGSEG_BIT; | ||
97 | #endif | ||
92 | } | 98 | } |
93 | 99 | ||
94 | void xen_enable_sysenter(void) | 100 | static __cpuinit int register_callback(unsigned type, const void *func) |
95 | { | 101 | { |
96 | int cpu = smp_processor_id(); | 102 | struct callback_register callback = { |
97 | extern void xen_sysenter_target(void); | 103 | .type = type, |
98 | /* Mask events on entry, even though they get enabled immediately */ | 104 | .address = XEN_CALLBACK(__KERNEL_CS, func), |
99 | static struct callback_register sysenter = { | ||
100 | .type = CALLBACKTYPE_sysenter, | ||
101 | .address = { __KERNEL_CS, (unsigned long)xen_sysenter_target }, | ||
102 | .flags = CALLBACKF_mask_events, | 105 | .flags = CALLBACKF_mask_events, |
103 | }; | 106 | }; |
104 | 107 | ||
105 | if (!boot_cpu_has(X86_FEATURE_SEP) || | 108 | return HYPERVISOR_callback_op(CALLBACKOP_register, &callback); |
106 | HYPERVISOR_callback_op(CALLBACKOP_register, &sysenter) != 0) { | 109 | } |
107 | clear_cpu_cap(&cpu_data(cpu), X86_FEATURE_SEP); | 110 | |
108 | clear_cpu_cap(&boot_cpu_data, X86_FEATURE_SEP); | 111 | void __cpuinit xen_enable_sysenter(void) |
112 | { | ||
113 | extern void xen_sysenter_target(void); | ||
114 | int ret; | ||
115 | unsigned sysenter_feature; | ||
116 | |||
117 | #ifdef CONFIG_X86_32 | ||
118 | sysenter_feature = X86_FEATURE_SEP; | ||
119 | #else | ||
120 | sysenter_feature = X86_FEATURE_SYSENTER32; | ||
121 | #endif | ||
122 | |||
123 | if (!boot_cpu_has(sysenter_feature)) | ||
124 | return; | ||
125 | |||
126 | ret = register_callback(CALLBACKTYPE_sysenter, xen_sysenter_target); | ||
127 | if(ret != 0) | ||
128 | setup_clear_cpu_cap(sysenter_feature); | ||
129 | } | ||
130 | |||
131 | void __cpuinit xen_enable_syscall(void) | ||
132 | { | ||
133 | #ifdef CONFIG_X86_64 | ||
134 | int ret; | ||
135 | extern void xen_syscall_target(void); | ||
136 | extern void xen_syscall32_target(void); | ||
137 | |||
138 | ret = register_callback(CALLBACKTYPE_syscall, xen_syscall_target); | ||
139 | if (ret != 0) { | ||
140 | printk(KERN_ERR "Failed to set syscall callback: %d\n", ret); | ||
141 | /* Pretty fatal; 64-bit userspace has no other | ||
142 | mechanism for syscalls. */ | ||
109 | } | 143 | } |
144 | |||
145 | if (boot_cpu_has(X86_FEATURE_SYSCALL32)) { | ||
146 | ret = register_callback(CALLBACKTYPE_syscall32, | ||
147 | xen_syscall32_target); | ||
148 | if (ret != 0) | ||
149 | setup_clear_cpu_cap(X86_FEATURE_SYSCALL32); | ||
150 | } | ||
151 | #endif /* CONFIG_X86_64 */ | ||
110 | } | 152 | } |
111 | 153 | ||
112 | void __init xen_arch_setup(void) | 154 | void __init xen_arch_setup(void) |
@@ -120,10 +162,12 @@ void __init xen_arch_setup(void) | |||
120 | if (!xen_feature(XENFEAT_auto_translated_physmap)) | 162 | if (!xen_feature(XENFEAT_auto_translated_physmap)) |
121 | HYPERVISOR_vm_assist(VMASST_CMD_enable, VMASST_TYPE_pae_extended_cr3); | 163 | HYPERVISOR_vm_assist(VMASST_CMD_enable, VMASST_TYPE_pae_extended_cr3); |
122 | 164 | ||
123 | HYPERVISOR_set_callbacks(__KERNEL_CS, (unsigned long)xen_hypervisor_callback, | 165 | if (register_callback(CALLBACKTYPE_event, xen_hypervisor_callback) || |
124 | __KERNEL_CS, (unsigned long)xen_failsafe_callback); | 166 | register_callback(CALLBACKTYPE_failsafe, xen_failsafe_callback)) |
167 | BUG(); | ||
125 | 168 | ||
126 | xen_enable_sysenter(); | 169 | xen_enable_sysenter(); |
170 | xen_enable_syscall(); | ||
127 | 171 | ||
128 | set_iopl.iopl = 1; | 172 | set_iopl.iopl = 1; |
129 | rc = HYPERVISOR_physdev_op(PHYSDEVOP_set_iopl, &set_iopl); | 173 | rc = HYPERVISOR_physdev_op(PHYSDEVOP_set_iopl, &set_iopl); |
@@ -143,11 +187,6 @@ void __init xen_arch_setup(void) | |||
143 | 187 | ||
144 | pm_idle = xen_idle; | 188 | pm_idle = xen_idle; |
145 | 189 | ||
146 | #ifdef CONFIG_SMP | ||
147 | /* fill cpus_possible with all available cpus */ | ||
148 | xen_fill_possible_map(); | ||
149 | #endif | ||
150 | |||
151 | paravirt_disable_iospace(); | 190 | paravirt_disable_iospace(); |
152 | 191 | ||
153 | fiddle_vdso(); | 192 | fiddle_vdso(); |
diff --git a/arch/x86/xen/smp.c b/arch/x86/xen/smp.c index 233156f39b7f..e693812ac59a 100644 --- a/arch/x86/xen/smp.c +++ b/arch/x86/xen/smp.c | |||
@@ -15,6 +15,7 @@ | |||
15 | * This does not handle HOTPLUG_CPU yet. | 15 | * This does not handle HOTPLUG_CPU yet. |
16 | */ | 16 | */ |
17 | #include <linux/sched.h> | 17 | #include <linux/sched.h> |
18 | #include <linux/kernel_stat.h> | ||
18 | #include <linux/err.h> | 19 | #include <linux/err.h> |
19 | #include <linux/smp.h> | 20 | #include <linux/smp.h> |
20 | 21 | ||
@@ -35,6 +36,8 @@ | |||
35 | #include "xen-ops.h" | 36 | #include "xen-ops.h" |
36 | #include "mmu.h" | 37 | #include "mmu.h" |
37 | 38 | ||
39 | static void __cpuinit xen_init_lock_cpu(int cpu); | ||
40 | |||
38 | cpumask_t xen_cpu_initialized_map; | 41 | cpumask_t xen_cpu_initialized_map; |
39 | 42 | ||
40 | static DEFINE_PER_CPU(int, resched_irq); | 43 | static DEFINE_PER_CPU(int, resched_irq); |
@@ -66,13 +69,22 @@ static __cpuinit void cpu_bringup_and_idle(void) | |||
66 | int cpu = smp_processor_id(); | 69 | int cpu = smp_processor_id(); |
67 | 70 | ||
68 | cpu_init(); | 71 | cpu_init(); |
72 | preempt_disable(); | ||
73 | |||
69 | xen_enable_sysenter(); | 74 | xen_enable_sysenter(); |
75 | xen_enable_syscall(); | ||
70 | 76 | ||
71 | preempt_disable(); | 77 | cpu = smp_processor_id(); |
72 | per_cpu(cpu_state, cpu) = CPU_ONLINE; | 78 | smp_store_cpu_info(cpu); |
79 | cpu_data(cpu).x86_max_cores = 1; | ||
80 | set_cpu_sibling_map(cpu); | ||
73 | 81 | ||
74 | xen_setup_cpu_clockevents(); | 82 | xen_setup_cpu_clockevents(); |
75 | 83 | ||
84 | cpu_set(cpu, cpu_online_map); | ||
85 | x86_write_percpu(cpu_state, CPU_ONLINE); | ||
86 | wmb(); | ||
87 | |||
76 | /* We can take interrupts now: we're officially "up". */ | 88 | /* We can take interrupts now: we're officially "up". */ |
77 | local_irq_enable(); | 89 | local_irq_enable(); |
78 | 90 | ||
@@ -141,56 +153,39 @@ static int xen_smp_intr_init(unsigned int cpu) | |||
141 | return rc; | 153 | return rc; |
142 | } | 154 | } |
143 | 155 | ||
144 | void __init xen_fill_possible_map(void) | 156 | static void __init xen_fill_possible_map(void) |
145 | { | 157 | { |
146 | int i, rc; | 158 | int i, rc; |
147 | 159 | ||
148 | for (i = 0; i < NR_CPUS; i++) { | 160 | for (i = 0; i < NR_CPUS; i++) { |
149 | rc = HYPERVISOR_vcpu_op(VCPUOP_is_up, i, NULL); | 161 | rc = HYPERVISOR_vcpu_op(VCPUOP_is_up, i, NULL); |
150 | if (rc >= 0) | 162 | if (rc >= 0) { |
163 | num_processors++; | ||
151 | cpu_set(i, cpu_possible_map); | 164 | cpu_set(i, cpu_possible_map); |
165 | } | ||
152 | } | 166 | } |
153 | } | 167 | } |
154 | 168 | ||
155 | void __init xen_smp_prepare_boot_cpu(void) | 169 | static void __init xen_smp_prepare_boot_cpu(void) |
156 | { | 170 | { |
157 | int cpu; | ||
158 | |||
159 | BUG_ON(smp_processor_id() != 0); | 171 | BUG_ON(smp_processor_id() != 0); |
160 | native_smp_prepare_boot_cpu(); | 172 | native_smp_prepare_boot_cpu(); |
161 | 173 | ||
162 | /* We've switched to the "real" per-cpu gdt, so make sure the | 174 | /* We've switched to the "real" per-cpu gdt, so make sure the |
163 | old memory can be recycled */ | 175 | old memory can be recycled */ |
164 | make_lowmem_page_readwrite(&per_cpu__gdt_page); | 176 | make_lowmem_page_readwrite(&per_cpu_var(gdt_page)); |
165 | |||
166 | for_each_possible_cpu(cpu) { | ||
167 | cpus_clear(per_cpu(cpu_sibling_map, cpu)); | ||
168 | /* | ||
169 | * cpu_core_map lives in a per cpu area that is cleared | ||
170 | * when the per cpu array is allocated. | ||
171 | * | ||
172 | * cpus_clear(per_cpu(cpu_core_map, cpu)); | ||
173 | */ | ||
174 | } | ||
175 | 177 | ||
176 | xen_setup_vcpu_info_placement(); | 178 | xen_setup_vcpu_info_placement(); |
177 | } | 179 | } |
178 | 180 | ||
179 | void __init xen_smp_prepare_cpus(unsigned int max_cpus) | 181 | static void __init xen_smp_prepare_cpus(unsigned int max_cpus) |
180 | { | 182 | { |
181 | unsigned cpu; | 183 | unsigned cpu; |
182 | 184 | ||
183 | for_each_possible_cpu(cpu) { | 185 | xen_init_lock_cpu(0); |
184 | cpus_clear(per_cpu(cpu_sibling_map, cpu)); | ||
185 | /* | ||
186 | * cpu_core_ map will be zeroed when the per | ||
187 | * cpu area is allocated. | ||
188 | * | ||
189 | * cpus_clear(per_cpu(cpu_core_map, cpu)); | ||
190 | */ | ||
191 | } | ||
192 | 186 | ||
193 | smp_store_cpu_info(0); | 187 | smp_store_cpu_info(0); |
188 | cpu_data(0).x86_max_cores = 1; | ||
194 | set_cpu_sibling_map(0); | 189 | set_cpu_sibling_map(0); |
195 | 190 | ||
196 | if (xen_smp_intr_init(0)) | 191 | if (xen_smp_intr_init(0)) |
@@ -225,7 +220,7 @@ static __cpuinit int | |||
225 | cpu_initialize_context(unsigned int cpu, struct task_struct *idle) | 220 | cpu_initialize_context(unsigned int cpu, struct task_struct *idle) |
226 | { | 221 | { |
227 | struct vcpu_guest_context *ctxt; | 222 | struct vcpu_guest_context *ctxt; |
228 | struct gdt_page *gdt = &per_cpu(gdt_page, cpu); | 223 | struct desc_struct *gdt; |
229 | 224 | ||
230 | if (cpu_test_and_set(cpu, xen_cpu_initialized_map)) | 225 | if (cpu_test_and_set(cpu, xen_cpu_initialized_map)) |
231 | return 0; | 226 | return 0; |
@@ -234,12 +229,15 @@ cpu_initialize_context(unsigned int cpu, struct task_struct *idle) | |||
234 | if (ctxt == NULL) | 229 | if (ctxt == NULL) |
235 | return -ENOMEM; | 230 | return -ENOMEM; |
236 | 231 | ||
232 | gdt = get_cpu_gdt_table(cpu); | ||
233 | |||
237 | ctxt->flags = VGCF_IN_KERNEL; | 234 | ctxt->flags = VGCF_IN_KERNEL; |
238 | ctxt->user_regs.ds = __USER_DS; | 235 | ctxt->user_regs.ds = __USER_DS; |
239 | ctxt->user_regs.es = __USER_DS; | 236 | ctxt->user_regs.es = __USER_DS; |
240 | ctxt->user_regs.fs = __KERNEL_PERCPU; | ||
241 | ctxt->user_regs.gs = 0; | ||
242 | ctxt->user_regs.ss = __KERNEL_DS; | 237 | ctxt->user_regs.ss = __KERNEL_DS; |
238 | #ifdef CONFIG_X86_32 | ||
239 | ctxt->user_regs.fs = __KERNEL_PERCPU; | ||
240 | #endif | ||
243 | ctxt->user_regs.eip = (unsigned long)cpu_bringup_and_idle; | 241 | ctxt->user_regs.eip = (unsigned long)cpu_bringup_and_idle; |
244 | ctxt->user_regs.eflags = 0x1000; /* IOPL_RING1 */ | 242 | ctxt->user_regs.eflags = 0x1000; /* IOPL_RING1 */ |
245 | 243 | ||
@@ -249,11 +247,11 @@ cpu_initialize_context(unsigned int cpu, struct task_struct *idle) | |||
249 | 247 | ||
250 | ctxt->ldt_ents = 0; | 248 | ctxt->ldt_ents = 0; |
251 | 249 | ||
252 | BUG_ON((unsigned long)gdt->gdt & ~PAGE_MASK); | 250 | BUG_ON((unsigned long)gdt & ~PAGE_MASK); |
253 | make_lowmem_page_readonly(gdt->gdt); | 251 | make_lowmem_page_readonly(gdt); |
254 | 252 | ||
255 | ctxt->gdt_frames[0] = virt_to_mfn(gdt->gdt); | 253 | ctxt->gdt_frames[0] = virt_to_mfn(gdt); |
256 | ctxt->gdt_ents = ARRAY_SIZE(gdt->gdt); | 254 | ctxt->gdt_ents = GDT_ENTRIES; |
257 | 255 | ||
258 | ctxt->user_regs.cs = __KERNEL_CS; | 256 | ctxt->user_regs.cs = __KERNEL_CS; |
259 | ctxt->user_regs.esp = idle->thread.sp0 - sizeof(struct pt_regs); | 257 | ctxt->user_regs.esp = idle->thread.sp0 - sizeof(struct pt_regs); |
@@ -261,9 +259,11 @@ cpu_initialize_context(unsigned int cpu, struct task_struct *idle) | |||
261 | ctxt->kernel_ss = __KERNEL_DS; | 259 | ctxt->kernel_ss = __KERNEL_DS; |
262 | ctxt->kernel_sp = idle->thread.sp0; | 260 | ctxt->kernel_sp = idle->thread.sp0; |
263 | 261 | ||
262 | #ifdef CONFIG_X86_32 | ||
264 | ctxt->event_callback_cs = __KERNEL_CS; | 263 | ctxt->event_callback_cs = __KERNEL_CS; |
265 | ctxt->event_callback_eip = (unsigned long)xen_hypervisor_callback; | ||
266 | ctxt->failsafe_callback_cs = __KERNEL_CS; | 264 | ctxt->failsafe_callback_cs = __KERNEL_CS; |
265 | #endif | ||
266 | ctxt->event_callback_eip = (unsigned long)xen_hypervisor_callback; | ||
267 | ctxt->failsafe_callback_eip = (unsigned long)xen_failsafe_callback; | 267 | ctxt->failsafe_callback_eip = (unsigned long)xen_failsafe_callback; |
268 | 268 | ||
269 | per_cpu(xen_cr3, cpu) = __pa(swapper_pg_dir); | 269 | per_cpu(xen_cr3, cpu) = __pa(swapper_pg_dir); |
@@ -276,7 +276,7 @@ cpu_initialize_context(unsigned int cpu, struct task_struct *idle) | |||
276 | return 0; | 276 | return 0; |
277 | } | 277 | } |
278 | 278 | ||
279 | int __cpuinit xen_cpu_up(unsigned int cpu) | 279 | static int __cpuinit xen_cpu_up(unsigned int cpu) |
280 | { | 280 | { |
281 | struct task_struct *idle = idle_task(cpu); | 281 | struct task_struct *idle = idle_task(cpu); |
282 | int rc; | 282 | int rc; |
@@ -287,10 +287,28 @@ int __cpuinit xen_cpu_up(unsigned int cpu) | |||
287 | return rc; | 287 | return rc; |
288 | #endif | 288 | #endif |
289 | 289 | ||
290 | #ifdef CONFIG_X86_64 | ||
291 | /* Allocate node local memory for AP pdas */ | ||
292 | WARN_ON(cpu == 0); | ||
293 | if (cpu > 0) { | ||
294 | rc = get_local_pda(cpu); | ||
295 | if (rc) | ||
296 | return rc; | ||
297 | } | ||
298 | #endif | ||
299 | |||
300 | #ifdef CONFIG_X86_32 | ||
290 | init_gdt(cpu); | 301 | init_gdt(cpu); |
291 | per_cpu(current_task, cpu) = idle; | 302 | per_cpu(current_task, cpu) = idle; |
292 | irq_ctx_init(cpu); | 303 | irq_ctx_init(cpu); |
304 | #else | ||
305 | cpu_pda(cpu)->pcurrent = idle; | ||
306 | clear_tsk_thread_flag(idle, TIF_FORK); | ||
307 | #endif | ||
293 | xen_setup_timer(cpu); | 308 | xen_setup_timer(cpu); |
309 | xen_init_lock_cpu(cpu); | ||
310 | |||
311 | per_cpu(cpu_state, cpu) = CPU_UP_PREPARE; | ||
294 | 312 | ||
295 | /* make sure interrupts start blocked */ | 313 | /* make sure interrupts start blocked */ |
296 | per_cpu(xen_vcpu, cpu)->evtchn_upcall_mask = 1; | 314 | per_cpu(xen_vcpu, cpu)->evtchn_upcall_mask = 1; |
@@ -306,20 +324,18 @@ int __cpuinit xen_cpu_up(unsigned int cpu) | |||
306 | if (rc) | 324 | if (rc) |
307 | return rc; | 325 | return rc; |
308 | 326 | ||
309 | smp_store_cpu_info(cpu); | ||
310 | set_cpu_sibling_map(cpu); | ||
311 | /* This must be done before setting cpu_online_map */ | ||
312 | wmb(); | ||
313 | |||
314 | cpu_set(cpu, cpu_online_map); | ||
315 | |||
316 | rc = HYPERVISOR_vcpu_op(VCPUOP_up, cpu, NULL); | 327 | rc = HYPERVISOR_vcpu_op(VCPUOP_up, cpu, NULL); |
317 | BUG_ON(rc); | 328 | BUG_ON(rc); |
318 | 329 | ||
330 | while(per_cpu(cpu_state, cpu) != CPU_ONLINE) { | ||
331 | HYPERVISOR_sched_op(SCHEDOP_yield, 0); | ||
332 | barrier(); | ||
333 | } | ||
334 | |||
319 | return 0; | 335 | return 0; |
320 | } | 336 | } |
321 | 337 | ||
322 | void xen_smp_cpus_done(unsigned int max_cpus) | 338 | static void xen_smp_cpus_done(unsigned int max_cpus) |
323 | { | 339 | { |
324 | } | 340 | } |
325 | 341 | ||
@@ -335,12 +351,12 @@ static void stop_self(void *v) | |||
335 | BUG(); | 351 | BUG(); |
336 | } | 352 | } |
337 | 353 | ||
338 | void xen_smp_send_stop(void) | 354 | static void xen_smp_send_stop(void) |
339 | { | 355 | { |
340 | smp_call_function(stop_self, NULL, 0); | 356 | smp_call_function(stop_self, NULL, 0); |
341 | } | 357 | } |
342 | 358 | ||
343 | void xen_smp_send_reschedule(int cpu) | 359 | static void xen_smp_send_reschedule(int cpu) |
344 | { | 360 | { |
345 | xen_send_IPI_one(cpu, XEN_RESCHEDULE_VECTOR); | 361 | xen_send_IPI_one(cpu, XEN_RESCHEDULE_VECTOR); |
346 | } | 362 | } |
@@ -355,7 +371,7 @@ static void xen_send_IPI_mask(cpumask_t mask, enum ipi_vector vector) | |||
355 | xen_send_IPI_one(cpu, vector); | 371 | xen_send_IPI_one(cpu, vector); |
356 | } | 372 | } |
357 | 373 | ||
358 | void xen_smp_send_call_function_ipi(cpumask_t mask) | 374 | static void xen_smp_send_call_function_ipi(cpumask_t mask) |
359 | { | 375 | { |
360 | int cpu; | 376 | int cpu; |
361 | 377 | ||
@@ -370,7 +386,7 @@ void xen_smp_send_call_function_ipi(cpumask_t mask) | |||
370 | } | 386 | } |
371 | } | 387 | } |
372 | 388 | ||
373 | void xen_smp_send_call_function_single_ipi(int cpu) | 389 | static void xen_smp_send_call_function_single_ipi(int cpu) |
374 | { | 390 | { |
375 | xen_send_IPI_mask(cpumask_of_cpu(cpu), XEN_CALL_FUNCTION_SINGLE_VECTOR); | 391 | xen_send_IPI_mask(cpumask_of_cpu(cpu), XEN_CALL_FUNCTION_SINGLE_VECTOR); |
376 | } | 392 | } |
@@ -379,7 +395,11 @@ static irqreturn_t xen_call_function_interrupt(int irq, void *dev_id) | |||
379 | { | 395 | { |
380 | irq_enter(); | 396 | irq_enter(); |
381 | generic_smp_call_function_interrupt(); | 397 | generic_smp_call_function_interrupt(); |
398 | #ifdef CONFIG_X86_32 | ||
382 | __get_cpu_var(irq_stat).irq_call_count++; | 399 | __get_cpu_var(irq_stat).irq_call_count++; |
400 | #else | ||
401 | add_pda(irq_call_count, 1); | ||
402 | #endif | ||
383 | irq_exit(); | 403 | irq_exit(); |
384 | 404 | ||
385 | return IRQ_HANDLED; | 405 | return IRQ_HANDLED; |
@@ -389,8 +409,196 @@ static irqreturn_t xen_call_function_single_interrupt(int irq, void *dev_id) | |||
389 | { | 409 | { |
390 | irq_enter(); | 410 | irq_enter(); |
391 | generic_smp_call_function_single_interrupt(); | 411 | generic_smp_call_function_single_interrupt(); |
412 | #ifdef CONFIG_X86_32 | ||
392 | __get_cpu_var(irq_stat).irq_call_count++; | 413 | __get_cpu_var(irq_stat).irq_call_count++; |
414 | #else | ||
415 | add_pda(irq_call_count, 1); | ||
416 | #endif | ||
393 | irq_exit(); | 417 | irq_exit(); |
394 | 418 | ||
395 | return IRQ_HANDLED; | 419 | return IRQ_HANDLED; |
396 | } | 420 | } |
421 | |||
422 | struct xen_spinlock { | ||
423 | unsigned char lock; /* 0 -> free; 1 -> locked */ | ||
424 | unsigned short spinners; /* count of waiting cpus */ | ||
425 | }; | ||
426 | |||
427 | static int xen_spin_is_locked(struct raw_spinlock *lock) | ||
428 | { | ||
429 | struct xen_spinlock *xl = (struct xen_spinlock *)lock; | ||
430 | |||
431 | return xl->lock != 0; | ||
432 | } | ||
433 | |||
434 | static int xen_spin_is_contended(struct raw_spinlock *lock) | ||
435 | { | ||
436 | struct xen_spinlock *xl = (struct xen_spinlock *)lock; | ||
437 | |||
438 | /* Not strictly true; this is only the count of contended | ||
439 | lock-takers entering the slow path. */ | ||
440 | return xl->spinners != 0; | ||
441 | } | ||
442 | |||
443 | static int xen_spin_trylock(struct raw_spinlock *lock) | ||
444 | { | ||
445 | struct xen_spinlock *xl = (struct xen_spinlock *)lock; | ||
446 | u8 old = 1; | ||
447 | |||
448 | asm("xchgb %b0,%1" | ||
449 | : "+q" (old), "+m" (xl->lock) : : "memory"); | ||
450 | |||
451 | return old == 0; | ||
452 | } | ||
453 | |||
454 | static DEFINE_PER_CPU(int, lock_kicker_irq) = -1; | ||
455 | static DEFINE_PER_CPU(struct xen_spinlock *, lock_spinners); | ||
456 | |||
457 | static inline void spinning_lock(struct xen_spinlock *xl) | ||
458 | { | ||
459 | __get_cpu_var(lock_spinners) = xl; | ||
460 | wmb(); /* set lock of interest before count */ | ||
461 | asm(LOCK_PREFIX " incw %0" | ||
462 | : "+m" (xl->spinners) : : "memory"); | ||
463 | } | ||
464 | |||
465 | static inline void unspinning_lock(struct xen_spinlock *xl) | ||
466 | { | ||
467 | asm(LOCK_PREFIX " decw %0" | ||
468 | : "+m" (xl->spinners) : : "memory"); | ||
469 | wmb(); /* decrement count before clearing lock */ | ||
470 | __get_cpu_var(lock_spinners) = NULL; | ||
471 | } | ||
472 | |||
473 | static noinline int xen_spin_lock_slow(struct raw_spinlock *lock) | ||
474 | { | ||
475 | struct xen_spinlock *xl = (struct xen_spinlock *)lock; | ||
476 | int irq = __get_cpu_var(lock_kicker_irq); | ||
477 | int ret; | ||
478 | |||
479 | /* If kicker interrupts not initialized yet, just spin */ | ||
480 | if (irq == -1) | ||
481 | return 0; | ||
482 | |||
483 | /* announce we're spinning */ | ||
484 | spinning_lock(xl); | ||
485 | |||
486 | /* clear pending */ | ||
487 | xen_clear_irq_pending(irq); | ||
488 | |||
489 | /* check again make sure it didn't become free while | ||
490 | we weren't looking */ | ||
491 | ret = xen_spin_trylock(lock); | ||
492 | if (ret) | ||
493 | goto out; | ||
494 | |||
495 | /* block until irq becomes pending */ | ||
496 | xen_poll_irq(irq); | ||
497 | kstat_this_cpu.irqs[irq]++; | ||
498 | |||
499 | out: | ||
500 | unspinning_lock(xl); | ||
501 | return ret; | ||
502 | } | ||
503 | |||
504 | static void xen_spin_lock(struct raw_spinlock *lock) | ||
505 | { | ||
506 | struct xen_spinlock *xl = (struct xen_spinlock *)lock; | ||
507 | int timeout; | ||
508 | u8 oldval; | ||
509 | |||
510 | do { | ||
511 | timeout = 1 << 10; | ||
512 | |||
513 | asm("1: xchgb %1,%0\n" | ||
514 | " testb %1,%1\n" | ||
515 | " jz 3f\n" | ||
516 | "2: rep;nop\n" | ||
517 | " cmpb $0,%0\n" | ||
518 | " je 1b\n" | ||
519 | " dec %2\n" | ||
520 | " jnz 2b\n" | ||
521 | "3:\n" | ||
522 | : "+m" (xl->lock), "=q" (oldval), "+r" (timeout) | ||
523 | : "1" (1) | ||
524 | : "memory"); | ||
525 | |||
526 | } while (unlikely(oldval != 0 && !xen_spin_lock_slow(lock))); | ||
527 | } | ||
528 | |||
529 | static noinline void xen_spin_unlock_slow(struct xen_spinlock *xl) | ||
530 | { | ||
531 | int cpu; | ||
532 | |||
533 | for_each_online_cpu(cpu) { | ||
534 | /* XXX should mix up next cpu selection */ | ||
535 | if (per_cpu(lock_spinners, cpu) == xl) { | ||
536 | xen_send_IPI_one(cpu, XEN_SPIN_UNLOCK_VECTOR); | ||
537 | break; | ||
538 | } | ||
539 | } | ||
540 | } | ||
541 | |||
542 | static void xen_spin_unlock(struct raw_spinlock *lock) | ||
543 | { | ||
544 | struct xen_spinlock *xl = (struct xen_spinlock *)lock; | ||
545 | |||
546 | smp_wmb(); /* make sure no writes get moved after unlock */ | ||
547 | xl->lock = 0; /* release lock */ | ||
548 | |||
549 | /* make sure unlock happens before kick */ | ||
550 | barrier(); | ||
551 | |||
552 | if (unlikely(xl->spinners)) | ||
553 | xen_spin_unlock_slow(xl); | ||
554 | } | ||
555 | |||
556 | static __cpuinit void xen_init_lock_cpu(int cpu) | ||
557 | { | ||
558 | int irq; | ||
559 | const char *name; | ||
560 | |||
561 | name = kasprintf(GFP_KERNEL, "spinlock%d", cpu); | ||
562 | irq = bind_ipi_to_irqhandler(XEN_SPIN_UNLOCK_VECTOR, | ||
563 | cpu, | ||
564 | xen_reschedule_interrupt, | ||
565 | IRQF_DISABLED|IRQF_PERCPU|IRQF_NOBALANCING, | ||
566 | name, | ||
567 | NULL); | ||
568 | |||
569 | if (irq >= 0) { | ||
570 | disable_irq(irq); /* make sure it's never delivered */ | ||
571 | per_cpu(lock_kicker_irq, cpu) = irq; | ||
572 | } | ||
573 | |||
574 | printk("cpu %d spinlock event irq %d\n", cpu, irq); | ||
575 | } | ||
576 | |||
577 | static void __init xen_init_spinlocks(void) | ||
578 | { | ||
579 | pv_lock_ops.spin_is_locked = xen_spin_is_locked; | ||
580 | pv_lock_ops.spin_is_contended = xen_spin_is_contended; | ||
581 | pv_lock_ops.spin_lock = xen_spin_lock; | ||
582 | pv_lock_ops.spin_trylock = xen_spin_trylock; | ||
583 | pv_lock_ops.spin_unlock = xen_spin_unlock; | ||
584 | } | ||
585 | |||
586 | static const struct smp_ops xen_smp_ops __initdata = { | ||
587 | .smp_prepare_boot_cpu = xen_smp_prepare_boot_cpu, | ||
588 | .smp_prepare_cpus = xen_smp_prepare_cpus, | ||
589 | .cpu_up = xen_cpu_up, | ||
590 | .smp_cpus_done = xen_smp_cpus_done, | ||
591 | |||
592 | .smp_send_stop = xen_smp_send_stop, | ||
593 | .smp_send_reschedule = xen_smp_send_reschedule, | ||
594 | |||
595 | .send_call_func_ipi = xen_smp_send_call_function_ipi, | ||
596 | .send_call_func_single_ipi = xen_smp_send_call_function_single_ipi, | ||
597 | }; | ||
598 | |||
599 | void __init xen_smp_init(void) | ||
600 | { | ||
601 | smp_ops = xen_smp_ops; | ||
602 | xen_fill_possible_map(); | ||
603 | xen_init_spinlocks(); | ||
604 | } | ||
diff --git a/arch/x86/xen/suspend.c b/arch/x86/xen/suspend.c index 251669a932d4..2a234db5949b 100644 --- a/arch/x86/xen/suspend.c +++ b/arch/x86/xen/suspend.c | |||
@@ -38,8 +38,11 @@ void xen_post_suspend(int suspend_cancelled) | |||
38 | xen_cpu_initialized_map = cpu_online_map; | 38 | xen_cpu_initialized_map = cpu_online_map; |
39 | #endif | 39 | #endif |
40 | xen_vcpu_restore(); | 40 | xen_vcpu_restore(); |
41 | xen_timer_resume(); | ||
42 | } | 41 | } |
43 | 42 | ||
44 | } | 43 | } |
45 | 44 | ||
45 | void xen_arch_resume(void) | ||
46 | { | ||
47 | /* nothing */ | ||
48 | } | ||
diff --git a/arch/x86/xen/xen-asm.S b/arch/x86/xen/xen-asm_32.S index 2497a30f41de..2497a30f41de 100644 --- a/arch/x86/xen/xen-asm.S +++ b/arch/x86/xen/xen-asm_32.S | |||
diff --git a/arch/x86/xen/xen-asm_64.S b/arch/x86/xen/xen-asm_64.S new file mode 100644 index 000000000000..4038cbfe3331 --- /dev/null +++ b/arch/x86/xen/xen-asm_64.S | |||
@@ -0,0 +1,271 @@ | |||
1 | /* | ||
2 | Asm versions of Xen pv-ops, suitable for either direct use or inlining. | ||
3 | The inline versions are the same as the direct-use versions, with the | ||
4 | pre- and post-amble chopped off. | ||
5 | |||
6 | This code is encoded for size rather than absolute efficiency, | ||
7 | with a view to being able to inline as much as possible. | ||
8 | |||
9 | We only bother with direct forms (ie, vcpu in pda) of the operations | ||
10 | here; the indirect forms are better handled in C, since they're | ||
11 | generally too large to inline anyway. | ||
12 | */ | ||
13 | |||
14 | #include <linux/linkage.h> | ||
15 | |||
16 | #include <asm/asm-offsets.h> | ||
17 | #include <asm/processor-flags.h> | ||
18 | #include <asm/errno.h> | ||
19 | #include <asm/segment.h> | ||
20 | |||
21 | #include <xen/interface/xen.h> | ||
22 | |||
23 | #define RELOC(x, v) .globl x##_reloc; x##_reloc=v | ||
24 | #define ENDPATCH(x) .globl x##_end; x##_end=. | ||
25 | |||
26 | /* Pseudo-flag used for virtual NMI, which we don't implement yet */ | ||
27 | #define XEN_EFLAGS_NMI 0x80000000 | ||
28 | |||
29 | #if 0 | ||
30 | #include <asm/percpu.h> | ||
31 | |||
32 | /* | ||
33 | Enable events. This clears the event mask and tests the pending | ||
34 | event status with one and operation. If there are pending | ||
35 | events, then enter the hypervisor to get them handled. | ||
36 | */ | ||
37 | ENTRY(xen_irq_enable_direct) | ||
38 | /* Unmask events */ | ||
39 | movb $0, PER_CPU_VAR(xen_vcpu_info, XEN_vcpu_info_mask) | ||
40 | |||
41 | /* Preempt here doesn't matter because that will deal with | ||
42 | any pending interrupts. The pending check may end up being | ||
43 | run on the wrong CPU, but that doesn't hurt. */ | ||
44 | |||
45 | /* Test for pending */ | ||
46 | testb $0xff, PER_CPU_VAR(xen_vcpu_info, XEN_vcpu_info_pending) | ||
47 | jz 1f | ||
48 | |||
49 | 2: call check_events | ||
50 | 1: | ||
51 | ENDPATCH(xen_irq_enable_direct) | ||
52 | ret | ||
53 | ENDPROC(xen_irq_enable_direct) | ||
54 | RELOC(xen_irq_enable_direct, 2b+1) | ||
55 | |||
56 | /* | ||
57 | Disabling events is simply a matter of making the event mask | ||
58 | non-zero. | ||
59 | */ | ||
60 | ENTRY(xen_irq_disable_direct) | ||
61 | movb $1, PER_CPU_VAR(xen_vcpu_info, XEN_vcpu_info_mask) | ||
62 | ENDPATCH(xen_irq_disable_direct) | ||
63 | ret | ||
64 | ENDPROC(xen_irq_disable_direct) | ||
65 | RELOC(xen_irq_disable_direct, 0) | ||
66 | |||
67 | /* | ||
68 | (xen_)save_fl is used to get the current interrupt enable status. | ||
69 | Callers expect the status to be in X86_EFLAGS_IF, and other bits | ||
70 | may be set in the return value. We take advantage of this by | ||
71 | making sure that X86_EFLAGS_IF has the right value (and other bits | ||
72 | in that byte are 0), but other bits in the return value are | ||
73 | undefined. We need to toggle the state of the bit, because | ||
74 | Xen and x86 use opposite senses (mask vs enable). | ||
75 | */ | ||
76 | ENTRY(xen_save_fl_direct) | ||
77 | testb $0xff, PER_CPU_VAR(xen_vcpu_info, XEN_vcpu_info_mask) | ||
78 | setz %ah | ||
79 | addb %ah,%ah | ||
80 | ENDPATCH(xen_save_fl_direct) | ||
81 | ret | ||
82 | ENDPROC(xen_save_fl_direct) | ||
83 | RELOC(xen_save_fl_direct, 0) | ||
84 | |||
85 | /* | ||
86 | In principle the caller should be passing us a value return | ||
87 | from xen_save_fl_direct, but for robustness sake we test only | ||
88 | the X86_EFLAGS_IF flag rather than the whole byte. After | ||
89 | setting the interrupt mask state, it checks for unmasked | ||
90 | pending events and enters the hypervisor to get them delivered | ||
91 | if so. | ||
92 | */ | ||
93 | ENTRY(xen_restore_fl_direct) | ||
94 | testb $X86_EFLAGS_IF>>8, %ah | ||
95 | setz PER_CPU_VAR(xen_vcpu_info, XEN_vcpu_info_mask) | ||
96 | /* Preempt here doesn't matter because that will deal with | ||
97 | any pending interrupts. The pending check may end up being | ||
98 | run on the wrong CPU, but that doesn't hurt. */ | ||
99 | |||
100 | /* check for unmasked and pending */ | ||
101 | cmpw $0x0001, PER_CPU_VAR(xen_vcpu_info, XEN_vcpu_info_pending) | ||
102 | jz 1f | ||
103 | 2: call check_events | ||
104 | 1: | ||
105 | ENDPATCH(xen_restore_fl_direct) | ||
106 | ret | ||
107 | ENDPROC(xen_restore_fl_direct) | ||
108 | RELOC(xen_restore_fl_direct, 2b+1) | ||
109 | |||
110 | |||
111 | /* | ||
112 | Force an event check by making a hypercall, | ||
113 | but preserve regs before making the call. | ||
114 | */ | ||
115 | check_events: | ||
116 | push %rax | ||
117 | push %rcx | ||
118 | push %rdx | ||
119 | push %rsi | ||
120 | push %rdi | ||
121 | push %r8 | ||
122 | push %r9 | ||
123 | push %r10 | ||
124 | push %r11 | ||
125 | call force_evtchn_callback | ||
126 | pop %r11 | ||
127 | pop %r10 | ||
128 | pop %r9 | ||
129 | pop %r8 | ||
130 | pop %rdi | ||
131 | pop %rsi | ||
132 | pop %rdx | ||
133 | pop %rcx | ||
134 | pop %rax | ||
135 | ret | ||
136 | #endif | ||
137 | |||
138 | ENTRY(xen_adjust_exception_frame) | ||
139 | mov 8+0(%rsp),%rcx | ||
140 | mov 8+8(%rsp),%r11 | ||
141 | ret $16 | ||
142 | |||
143 | hypercall_iret = hypercall_page + __HYPERVISOR_iret * 32 | ||
144 | /* | ||
145 | Xen64 iret frame: | ||
146 | |||
147 | ss | ||
148 | rsp | ||
149 | rflags | ||
150 | cs | ||
151 | rip <-- standard iret frame | ||
152 | |||
153 | flags | ||
154 | |||
155 | rcx } | ||
156 | r11 }<-- pushed by hypercall page | ||
157 | rsp -> rax } | ||
158 | */ | ||
159 | ENTRY(xen_iret) | ||
160 | pushq $0 | ||
161 | 1: jmp hypercall_iret | ||
162 | ENDPATCH(xen_iret) | ||
163 | RELOC(xen_iret, 1b+1) | ||
164 | |||
165 | /* | ||
166 | sysexit is not used for 64-bit processes, so it's | ||
167 | only ever used to return to 32-bit compat userspace. | ||
168 | */ | ||
169 | ENTRY(xen_sysexit) | ||
170 | pushq $__USER32_DS | ||
171 | pushq %rcx | ||
172 | pushq $X86_EFLAGS_IF | ||
173 | pushq $__USER32_CS | ||
174 | pushq %rdx | ||
175 | |||
176 | pushq $VGCF_in_syscall | ||
177 | 1: jmp hypercall_iret | ||
178 | ENDPATCH(xen_sysexit) | ||
179 | RELOC(xen_sysexit, 1b+1) | ||
180 | |||
181 | ENTRY(xen_sysret64) | ||
182 | /* We're already on the usermode stack at this point, but still | ||
183 | with the kernel gs, so we can easily switch back */ | ||
184 | movq %rsp, %gs:pda_oldrsp | ||
185 | movq %gs:pda_kernelstack,%rsp | ||
186 | |||
187 | pushq $__USER_DS | ||
188 | pushq %gs:pda_oldrsp | ||
189 | pushq %r11 | ||
190 | pushq $__USER_CS | ||
191 | pushq %rcx | ||
192 | |||
193 | pushq $VGCF_in_syscall | ||
194 | 1: jmp hypercall_iret | ||
195 | ENDPATCH(xen_sysret64) | ||
196 | RELOC(xen_sysret64, 1b+1) | ||
197 | |||
198 | ENTRY(xen_sysret32) | ||
199 | /* We're already on the usermode stack at this point, but still | ||
200 | with the kernel gs, so we can easily switch back */ | ||
201 | movq %rsp, %gs:pda_oldrsp | ||
202 | movq %gs:pda_kernelstack, %rsp | ||
203 | |||
204 | pushq $__USER32_DS | ||
205 | pushq %gs:pda_oldrsp | ||
206 | pushq %r11 | ||
207 | pushq $__USER32_CS | ||
208 | pushq %rcx | ||
209 | |||
210 | pushq $VGCF_in_syscall | ||
211 | 1: jmp hypercall_iret | ||
212 | ENDPATCH(xen_sysret32) | ||
213 | RELOC(xen_sysret32, 1b+1) | ||
214 | |||
215 | /* | ||
216 | Xen handles syscall callbacks much like ordinary exceptions, | ||
217 | which means we have: | ||
218 | - kernel gs | ||
219 | - kernel rsp | ||
220 | - an iret-like stack frame on the stack (including rcx and r11): | ||
221 | ss | ||
222 | rsp | ||
223 | rflags | ||
224 | cs | ||
225 | rip | ||
226 | r11 | ||
227 | rsp-> rcx | ||
228 | |||
229 | In all the entrypoints, we undo all that to make it look | ||
230 | like a CPU-generated syscall/sysenter and jump to the normal | ||
231 | entrypoint. | ||
232 | */ | ||
233 | |||
234 | .macro undo_xen_syscall | ||
235 | mov 0*8(%rsp),%rcx | ||
236 | mov 1*8(%rsp),%r11 | ||
237 | mov 5*8(%rsp),%rsp | ||
238 | .endm | ||
239 | |||
240 | /* Normal 64-bit system call target */ | ||
241 | ENTRY(xen_syscall_target) | ||
242 | undo_xen_syscall | ||
243 | jmp system_call_after_swapgs | ||
244 | ENDPROC(xen_syscall_target) | ||
245 | |||
246 | #ifdef CONFIG_IA32_EMULATION | ||
247 | |||
248 | /* 32-bit compat syscall target */ | ||
249 | ENTRY(xen_syscall32_target) | ||
250 | undo_xen_syscall | ||
251 | jmp ia32_cstar_target | ||
252 | ENDPROC(xen_syscall32_target) | ||
253 | |||
254 | /* 32-bit compat sysenter target */ | ||
255 | ENTRY(xen_sysenter_target) | ||
256 | undo_xen_syscall | ||
257 | jmp ia32_sysenter_target | ||
258 | ENDPROC(xen_sysenter_target) | ||
259 | |||
260 | #else /* !CONFIG_IA32_EMULATION */ | ||
261 | |||
262 | ENTRY(xen_syscall32_target) | ||
263 | ENTRY(xen_sysenter_target) | ||
264 | lea 16(%rsp), %rsp /* strip %rcx,%r11 */ | ||
265 | mov $-ENOSYS, %rax | ||
266 | pushq $VGCF_in_syscall | ||
267 | jmp hypercall_iret | ||
268 | ENDPROC(xen_syscall32_target) | ||
269 | ENDPROC(xen_sysenter_target) | ||
270 | |||
271 | #endif /* CONFIG_IA32_EMULATION */ | ||
diff --git a/arch/x86/xen/xen-head.S b/arch/x86/xen/xen-head.S index 7c0cf6320a0a..63d49a523ed3 100644 --- a/arch/x86/xen/xen-head.S +++ b/arch/x86/xen/xen-head.S | |||
@@ -5,15 +5,24 @@ | |||
5 | 5 | ||
6 | #include <linux/elfnote.h> | 6 | #include <linux/elfnote.h> |
7 | #include <linux/init.h> | 7 | #include <linux/init.h> |
8 | |||
8 | #include <asm/boot.h> | 9 | #include <asm/boot.h> |
10 | #include <asm/asm.h> | ||
11 | #include <asm/page.h> | ||
12 | |||
9 | #include <xen/interface/elfnote.h> | 13 | #include <xen/interface/elfnote.h> |
10 | #include <asm/xen/interface.h> | 14 | #include <asm/xen/interface.h> |
11 | 15 | ||
12 | __INIT | 16 | __INIT |
13 | ENTRY(startup_xen) | 17 | ENTRY(startup_xen) |
14 | movl %esi,xen_start_info | ||
15 | cld | 18 | cld |
16 | movl $(init_thread_union+THREAD_SIZE),%esp | 19 | #ifdef CONFIG_X86_32 |
20 | mov %esi,xen_start_info | ||
21 | mov $init_thread_union+THREAD_SIZE,%esp | ||
22 | #else | ||
23 | mov %rsi,xen_start_info | ||
24 | mov $init_thread_union+THREAD_SIZE,%rsp | ||
25 | #endif | ||
17 | jmp xen_start_kernel | 26 | jmp xen_start_kernel |
18 | 27 | ||
19 | __FINIT | 28 | __FINIT |
@@ -21,21 +30,26 @@ ENTRY(startup_xen) | |||
21 | .pushsection .text | 30 | .pushsection .text |
22 | .align PAGE_SIZE_asm | 31 | .align PAGE_SIZE_asm |
23 | ENTRY(hypercall_page) | 32 | ENTRY(hypercall_page) |
24 | .skip 0x1000 | 33 | .skip PAGE_SIZE_asm |
25 | .popsection | 34 | .popsection |
26 | 35 | ||
27 | ELFNOTE(Xen, XEN_ELFNOTE_GUEST_OS, .asciz "linux") | 36 | ELFNOTE(Xen, XEN_ELFNOTE_GUEST_OS, .asciz "linux") |
28 | ELFNOTE(Xen, XEN_ELFNOTE_GUEST_VERSION, .asciz "2.6") | 37 | ELFNOTE(Xen, XEN_ELFNOTE_GUEST_VERSION, .asciz "2.6") |
29 | ELFNOTE(Xen, XEN_ELFNOTE_XEN_VERSION, .asciz "xen-3.0") | 38 | ELFNOTE(Xen, XEN_ELFNOTE_XEN_VERSION, .asciz "xen-3.0") |
30 | ELFNOTE(Xen, XEN_ELFNOTE_VIRT_BASE, .long __PAGE_OFFSET) | 39 | #ifdef CONFIG_X86_32 |
31 | ELFNOTE(Xen, XEN_ELFNOTE_ENTRY, .long startup_xen) | 40 | ELFNOTE(Xen, XEN_ELFNOTE_VIRT_BASE, _ASM_PTR __PAGE_OFFSET) |
32 | ELFNOTE(Xen, XEN_ELFNOTE_HYPERCALL_PAGE, .long hypercall_page) | 41 | #else |
42 | ELFNOTE(Xen, XEN_ELFNOTE_VIRT_BASE, _ASM_PTR __START_KERNEL_map) | ||
43 | #endif | ||
44 | ELFNOTE(Xen, XEN_ELFNOTE_ENTRY, _ASM_PTR startup_xen) | ||
45 | ELFNOTE(Xen, XEN_ELFNOTE_HYPERCALL_PAGE, _ASM_PTR hypercall_page) | ||
33 | ELFNOTE(Xen, XEN_ELFNOTE_FEATURES, .asciz "!writable_page_tables|pae_pgdir_above_4gb") | 46 | ELFNOTE(Xen, XEN_ELFNOTE_FEATURES, .asciz "!writable_page_tables|pae_pgdir_above_4gb") |
34 | ELFNOTE(Xen, XEN_ELFNOTE_PAE_MODE, .asciz "yes") | 47 | ELFNOTE(Xen, XEN_ELFNOTE_PAE_MODE, .asciz "yes") |
35 | ELFNOTE(Xen, XEN_ELFNOTE_LOADER, .asciz "generic") | 48 | ELFNOTE(Xen, XEN_ELFNOTE_LOADER, .asciz "generic") |
36 | ELFNOTE(Xen, XEN_ELFNOTE_L1_MFN_VALID, | 49 | ELFNOTE(Xen, XEN_ELFNOTE_L1_MFN_VALID, |
37 | .quad _PAGE_PRESENT; .quad _PAGE_PRESENT) | 50 | .quad _PAGE_PRESENT; .quad _PAGE_PRESENT) |
38 | ELFNOTE(Xen, XEN_ELFNOTE_SUSPEND_CANCEL, .long 1) | 51 | ELFNOTE(Xen, XEN_ELFNOTE_SUSPEND_CANCEL, .long 1) |
39 | ELFNOTE(Xen, XEN_ELFNOTE_HV_START_LOW, .long __HYPERVISOR_VIRT_START) | 52 | ELFNOTE(Xen, XEN_ELFNOTE_HV_START_LOW, _ASM_PTR __HYPERVISOR_VIRT_START) |
53 | ELFNOTE(Xen, XEN_ELFNOTE_PADDR_OFFSET, _ASM_PTR 0) | ||
40 | 54 | ||
41 | #endif /*CONFIG_XEN */ | 55 | #endif /*CONFIG_XEN */ |
diff --git a/arch/x86/xen/xen-ops.h b/arch/x86/xen/xen-ops.h index 6f4b1045c1c2..dd3c23152a2e 100644 --- a/arch/x86/xen/xen-ops.h +++ b/arch/x86/xen/xen-ops.h | |||
@@ -26,6 +26,7 @@ char * __init xen_memory_setup(void); | |||
26 | void __init xen_arch_setup(void); | 26 | void __init xen_arch_setup(void); |
27 | void __init xen_init_IRQ(void); | 27 | void __init xen_init_IRQ(void); |
28 | void xen_enable_sysenter(void); | 28 | void xen_enable_sysenter(void); |
29 | void xen_enable_syscall(void); | ||
29 | void xen_vcpu_restore(void); | 30 | void xen_vcpu_restore(void); |
30 | 31 | ||
31 | void __init xen_build_dynamic_phys_to_machine(void); | 32 | void __init xen_build_dynamic_phys_to_machine(void); |
@@ -37,7 +38,6 @@ void __init xen_time_init(void); | |||
37 | unsigned long xen_get_wallclock(void); | 38 | unsigned long xen_get_wallclock(void); |
38 | int xen_set_wallclock(unsigned long time); | 39 | int xen_set_wallclock(unsigned long time); |
39 | unsigned long long xen_sched_clock(void); | 40 | unsigned long long xen_sched_clock(void); |
40 | void xen_timer_resume(void); | ||
41 | 41 | ||
42 | irqreturn_t xen_debug_interrupt(int irq, void *dev_id); | 42 | irqreturn_t xen_debug_interrupt(int irq, void *dev_id); |
43 | 43 | ||
@@ -45,20 +45,15 @@ bool xen_vcpu_stolen(int vcpu); | |||
45 | 45 | ||
46 | void xen_mark_init_mm_pinned(void); | 46 | void xen_mark_init_mm_pinned(void); |
47 | 47 | ||
48 | void __init xen_fill_possible_map(void); | ||
49 | |||
50 | void __init xen_setup_vcpu_info_placement(void); | 48 | void __init xen_setup_vcpu_info_placement(void); |
51 | void xen_smp_prepare_boot_cpu(void); | ||
52 | void xen_smp_prepare_cpus(unsigned int max_cpus); | ||
53 | int xen_cpu_up(unsigned int cpu); | ||
54 | void xen_smp_cpus_done(unsigned int max_cpus); | ||
55 | 49 | ||
56 | void xen_smp_send_stop(void); | 50 | #ifdef CONFIG_SMP |
57 | void xen_smp_send_reschedule(int cpu); | 51 | void xen_smp_init(void); |
58 | void xen_smp_send_call_function_ipi(cpumask_t mask); | ||
59 | void xen_smp_send_call_function_single_ipi(int cpu); | ||
60 | 52 | ||
61 | extern cpumask_t xen_cpu_initialized_map; | 53 | extern cpumask_t xen_cpu_initialized_map; |
54 | #else | ||
55 | static inline void xen_smp_init(void) {} | ||
56 | #endif | ||
62 | 57 | ||
63 | 58 | ||
64 | /* Declare an asm function, along with symbols needed to make it | 59 | /* Declare an asm function, along with symbols needed to make it |
@@ -73,7 +68,11 @@ DECL_ASM(void, xen_irq_disable_direct, void); | |||
73 | DECL_ASM(unsigned long, xen_save_fl_direct, void); | 68 | DECL_ASM(unsigned long, xen_save_fl_direct, void); |
74 | DECL_ASM(void, xen_restore_fl_direct, unsigned long); | 69 | DECL_ASM(void, xen_restore_fl_direct, unsigned long); |
75 | 70 | ||
71 | /* These are not functions, and cannot be called normally */ | ||
76 | void xen_iret(void); | 72 | void xen_iret(void); |
77 | void xen_sysexit(void); | 73 | void xen_sysexit(void); |
74 | void xen_sysret32(void); | ||
75 | void xen_sysret64(void); | ||
76 | void xen_adjust_exception_frame(void); | ||
78 | 77 | ||
79 | #endif /* XEN_OPS_H */ | 78 | #endif /* XEN_OPS_H */ |
diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig index 9fc8551a1cf6..02e417d3d8e9 100644 --- a/arch/xtensa/Kconfig +++ b/arch/xtensa/Kconfig | |||
@@ -194,8 +194,8 @@ config HOTPLUG | |||
194 | plugged into slots found on all modern laptop computers. Another | 194 | plugged into slots found on all modern laptop computers. Another |
195 | example, used on modern desktops as well as laptops, is USB. | 195 | example, used on modern desktops as well as laptops, is USB. |
196 | 196 | ||
197 | Enable HOTPLUG and KMOD, and build a modular kernel. Get agent | 197 | Enable HOTPLUG and build a modular kernel. Get agent software |
198 | software (at <http://linux-hotplug.sourceforge.net/>) and install it. | 198 | (from <http://linux-hotplug.sourceforge.net/>) and install it. |
199 | Then your kernel will automatically call out to a user mode "policy | 199 | Then your kernel will automatically call out to a user mode "policy |
200 | agent" (/sbin/hotplug) to load modules and set up software needed | 200 | agent" (/sbin/hotplug) to load modules and set up software needed |
201 | to use devices as you hotplug them. | 201 | to use devices as you hotplug them. |