diff options
Diffstat (limited to 'arch/sparc')
-rw-r--r-- | arch/sparc/Kconfig | 1 | ||||
-rw-r--r-- | arch/sparc/Makefile | 2 | ||||
-rw-r--r-- | arch/sparc/include/asm/highmem.h | 2 | ||||
-rw-r--r-- | arch/sparc/include/asm/irq_64.h | 1 | ||||
-rw-r--r-- | arch/sparc/include/asm/jump_label.h | 2 | ||||
-rw-r--r-- | arch/sparc/include/asm/pci_32.h | 8 | ||||
-rw-r--r-- | arch/sparc/include/asm/pci_64.h | 8 | ||||
-rw-r--r-- | arch/sparc/include/asm/prom.h | 10 | ||||
-rw-r--r-- | arch/sparc/include/asm/socket.h | 5 | ||||
-rw-r--r-- | arch/sparc/include/asm/vga.h | 1 | ||||
-rw-r--r-- | arch/sparc/kernel/leon_pci.c | 47 | ||||
-rw-r--r-- | arch/sparc/kernel/pci.c | 106 | ||||
-rw-r--r-- | arch/sparc/kernel/perf_event.c | 4 | ||||
-rw-r--r-- | arch/sparc/kernel/process_32.c | 8 | ||||
-rw-r--r-- | arch/sparc/kernel/process_64.c | 10 | ||||
-rw-r--r-- | arch/sparc/kernel/signal32.c | 7 | ||||
-rw-r--r-- | arch/sparc/kernel/signal_32.c | 7 | ||||
-rw-r--r-- | arch/sparc/kernel/signal_64.c | 6 | ||||
-rw-r--r-- | arch/sparc/mm/highmem.c | 4 |
19 files changed, 62 insertions, 177 deletions
diff --git a/arch/sparc/Kconfig b/arch/sparc/Kconfig index ca5580e4d813..1666de84d477 100644 --- a/arch/sparc/Kconfig +++ b/arch/sparc/Kconfig | |||
@@ -29,6 +29,7 @@ config SPARC | |||
29 | select GENERIC_IRQ_SHOW | 29 | select GENERIC_IRQ_SHOW |
30 | select USE_GENERIC_SMP_HELPERS if SMP | 30 | select USE_GENERIC_SMP_HELPERS if SMP |
31 | select GENERIC_PCI_IOMAP | 31 | select GENERIC_PCI_IOMAP |
32 | select HAVE_NMI_WATCHDOG if SPARC64 | ||
32 | 33 | ||
33 | config SPARC32 | 34 | config SPARC32 |
34 | def_bool !64BIT | 35 | def_bool !64BIT |
diff --git a/arch/sparc/Makefile b/arch/sparc/Makefile index ad1fb5d969f3..eddcfb36aafb 100644 --- a/arch/sparc/Makefile +++ b/arch/sparc/Makefile | |||
@@ -31,7 +31,7 @@ UTS_MACHINE := sparc | |||
31 | 31 | ||
32 | #KBUILD_CFLAGS += -g -pipe -fcall-used-g5 -fcall-used-g7 | 32 | #KBUILD_CFLAGS += -g -pipe -fcall-used-g5 -fcall-used-g7 |
33 | KBUILD_CFLAGS += -m32 -pipe -mno-fpu -fcall-used-g5 -fcall-used-g7 | 33 | KBUILD_CFLAGS += -m32 -pipe -mno-fpu -fcall-used-g5 -fcall-used-g7 |
34 | KBUILD_AFLAGS += -m32 | 34 | KBUILD_AFLAGS += -m32 -Wa,-Av8 |
35 | 35 | ||
36 | #LDFLAGS_vmlinux = -N -Ttext 0xf0004000 | 36 | #LDFLAGS_vmlinux = -N -Ttext 0xf0004000 |
37 | # Since 2.5.40, the first stage is left not btfix-ed. | 37 | # Since 2.5.40, the first stage is left not btfix-ed. |
diff --git a/arch/sparc/include/asm/highmem.h b/arch/sparc/include/asm/highmem.h index 3d7afbb7f4bb..3b6e00dd96e5 100644 --- a/arch/sparc/include/asm/highmem.h +++ b/arch/sparc/include/asm/highmem.h | |||
@@ -70,7 +70,7 @@ static inline void kunmap(struct page *page) | |||
70 | kunmap_high(page); | 70 | kunmap_high(page); |
71 | } | 71 | } |
72 | 72 | ||
73 | extern void *__kmap_atomic(struct page *page); | 73 | extern void *kmap_atomic(struct page *page); |
74 | extern void __kunmap_atomic(void *kvaddr); | 74 | extern void __kunmap_atomic(void *kvaddr); |
75 | extern struct page *kmap_atomic_to_page(void *vaddr); | 75 | extern struct page *kmap_atomic_to_page(void *vaddr); |
76 | 76 | ||
diff --git a/arch/sparc/include/asm/irq_64.h b/arch/sparc/include/asm/irq_64.h index 16dcae6d56e7..abf6afe82ca8 100644 --- a/arch/sparc/include/asm/irq_64.h +++ b/arch/sparc/include/asm/irq_64.h | |||
@@ -95,7 +95,6 @@ void arch_trigger_all_cpu_backtrace(void); | |||
95 | extern void *hardirq_stack[NR_CPUS]; | 95 | extern void *hardirq_stack[NR_CPUS]; |
96 | extern void *softirq_stack[NR_CPUS]; | 96 | extern void *softirq_stack[NR_CPUS]; |
97 | #define __ARCH_HAS_DO_SOFTIRQ | 97 | #define __ARCH_HAS_DO_SOFTIRQ |
98 | #define ARCH_HAS_NMI_WATCHDOG | ||
99 | 98 | ||
100 | #define NO_IRQ 0xffffffff | 99 | #define NO_IRQ 0xffffffff |
101 | 100 | ||
diff --git a/arch/sparc/include/asm/jump_label.h b/arch/sparc/include/asm/jump_label.h index fc73a82366f8..5080d16a832f 100644 --- a/arch/sparc/include/asm/jump_label.h +++ b/arch/sparc/include/asm/jump_label.h | |||
@@ -7,7 +7,7 @@ | |||
7 | 7 | ||
8 | #define JUMP_LABEL_NOP_SIZE 4 | 8 | #define JUMP_LABEL_NOP_SIZE 4 |
9 | 9 | ||
10 | static __always_inline bool arch_static_branch(struct jump_label_key *key) | 10 | static __always_inline bool arch_static_branch(struct static_key *key) |
11 | { | 11 | { |
12 | asm goto("1:\n\t" | 12 | asm goto("1:\n\t" |
13 | "nop\n\t" | 13 | "nop\n\t" |
diff --git a/arch/sparc/include/asm/pci_32.h b/arch/sparc/include/asm/pci_32.h index 6de7f7bf956a..dc503297481f 100644 --- a/arch/sparc/include/asm/pci_32.h +++ b/arch/sparc/include/asm/pci_32.h | |||
@@ -52,14 +52,6 @@ static inline void pci_dma_burst_advice(struct pci_dev *pdev, | |||
52 | * 64Kbytes by the Host controller. | 52 | * 64Kbytes by the Host controller. |
53 | */ | 53 | */ |
54 | 54 | ||
55 | extern void | ||
56 | pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region, | ||
57 | struct resource *res); | ||
58 | |||
59 | extern void | ||
60 | pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res, | ||
61 | struct pci_bus_region *region); | ||
62 | |||
63 | static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel) | 55 | static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel) |
64 | { | 56 | { |
65 | return PCI_IRQ_NONE; | 57 | return PCI_IRQ_NONE; |
diff --git a/arch/sparc/include/asm/pci_64.h b/arch/sparc/include/asm/pci_64.h index 755a4bb6bcd3..1633b718d3bc 100644 --- a/arch/sparc/include/asm/pci_64.h +++ b/arch/sparc/include/asm/pci_64.h | |||
@@ -73,14 +73,6 @@ extern int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, | |||
73 | enum pci_mmap_state mmap_state, | 73 | enum pci_mmap_state mmap_state, |
74 | int write_combine); | 74 | int write_combine); |
75 | 75 | ||
76 | extern void | ||
77 | pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region, | ||
78 | struct resource *res); | ||
79 | |||
80 | extern void | ||
81 | pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res, | ||
82 | struct pci_bus_region *region); | ||
83 | |||
84 | static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel) | 76 | static inline int pci_get_legacy_ide_irq(struct pci_dev *dev, int channel) |
85 | { | 77 | { |
86 | return PCI_IRQ_NONE; | 78 | return PCI_IRQ_NONE; |
diff --git a/arch/sparc/include/asm/prom.h b/arch/sparc/include/asm/prom.h index edd3d3cde460..c28765110706 100644 --- a/arch/sparc/include/asm/prom.h +++ b/arch/sparc/include/asm/prom.h | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/proc_fs.h> | 22 | #include <linux/proc_fs.h> |
23 | #include <linux/mutex.h> | 23 | #include <linux/mutex.h> |
24 | #include <linux/atomic.h> | 24 | #include <linux/atomic.h> |
25 | #include <linux/irqdomain.h> | ||
25 | 26 | ||
26 | #define OF_ROOT_NODE_ADDR_CELLS_DEFAULT 2 | 27 | #define OF_ROOT_NODE_ADDR_CELLS_DEFAULT 2 |
27 | #define OF_ROOT_NODE_SIZE_CELLS_DEFAULT 1 | 28 | #define OF_ROOT_NODE_SIZE_CELLS_DEFAULT 1 |
@@ -55,15 +56,6 @@ struct resource; | |||
55 | extern void __iomem *of_ioremap(struct resource *res, unsigned long offset, unsigned long size, char *name); | 56 | extern void __iomem *of_ioremap(struct resource *res, unsigned long offset, unsigned long size, char *name); |
56 | extern void of_iounmap(struct resource *res, void __iomem *base, unsigned long size); | 57 | extern void of_iounmap(struct resource *res, void __iomem *base, unsigned long size); |
57 | 58 | ||
58 | /* These routines are here to provide compatibility with how powerpc | ||
59 | * handles IRQ mapping for OF device nodes. We precompute and permanently | ||
60 | * register them in the platform_device objects, whereas powerpc computes them | ||
61 | * on request. | ||
62 | */ | ||
63 | static inline void irq_dispose_mapping(unsigned int virq) | ||
64 | { | ||
65 | } | ||
66 | |||
67 | extern struct device_node *of_console_device; | 59 | extern struct device_node *of_console_device; |
68 | extern char *of_console_path; | 60 | extern char *of_console_path; |
69 | extern char *of_console_options; | 61 | extern char *of_console_options; |
diff --git a/arch/sparc/include/asm/socket.h b/arch/sparc/include/asm/socket.h index 8af1b64168b3..bea1568ae4af 100644 --- a/arch/sparc/include/asm/socket.h +++ b/arch/sparc/include/asm/socket.h | |||
@@ -60,6 +60,11 @@ | |||
60 | 60 | ||
61 | #define SO_WIFI_STATUS 0x0025 | 61 | #define SO_WIFI_STATUS 0x0025 |
62 | #define SCM_WIFI_STATUS SO_WIFI_STATUS | 62 | #define SCM_WIFI_STATUS SO_WIFI_STATUS |
63 | #define SO_PEEK_OFF 0x0026 | ||
64 | |||
65 | /* Instruct lower device to use last 4-bytes of skb data as FCS */ | ||
66 | #define SO_NOFCS 0x0027 | ||
67 | |||
63 | 68 | ||
64 | /* Security levels - as per NRL IPv6 - don't actually do anything */ | 69 | /* Security levels - as per NRL IPv6 - don't actually do anything */ |
65 | #define SO_SECURITY_AUTHENTICATION 0x5001 | 70 | #define SO_SECURITY_AUTHENTICATION 0x5001 |
diff --git a/arch/sparc/include/asm/vga.h b/arch/sparc/include/asm/vga.h index c69d5b2ba19a..ec0e9967d93d 100644 --- a/arch/sparc/include/asm/vga.h +++ b/arch/sparc/include/asm/vga.h | |||
@@ -7,6 +7,7 @@ | |||
7 | #ifndef _LINUX_ASM_VGA_H_ | 7 | #ifndef _LINUX_ASM_VGA_H_ |
8 | #define _LINUX_ASM_VGA_H_ | 8 | #define _LINUX_ASM_VGA_H_ |
9 | 9 | ||
10 | #include <linux/bug.h> | ||
10 | #include <asm/types.h> | 11 | #include <asm/types.h> |
11 | 12 | ||
12 | #define VT_BUF_HAVE_RW | 13 | #define VT_BUF_HAVE_RW |
diff --git a/arch/sparc/kernel/leon_pci.c b/arch/sparc/kernel/leon_pci.c index c7bec25fdb1c..aba6b958b2a5 100644 --- a/arch/sparc/kernel/leon_pci.c +++ b/arch/sparc/kernel/leon_pci.c | |||
@@ -15,14 +15,19 @@ | |||
15 | 15 | ||
16 | /* The LEON architecture does not rely on a BIOS or bootloader to setup | 16 | /* The LEON architecture does not rely on a BIOS or bootloader to setup |
17 | * PCI for us. The Linux generic routines are used to setup resources, | 17 | * PCI for us. The Linux generic routines are used to setup resources, |
18 | * reset values of confuration-space registers settings ae preseved. | 18 | * reset values of configuration-space register settings are preserved. |
19 | * | ||
20 | * PCI Memory and Prefetchable Memory is direct-mapped. However I/O Space is | ||
21 | * accessed through a Window which is translated to low 64KB in PCI space, the | ||
22 | * first 4KB is not used so 60KB is available. | ||
19 | */ | 23 | */ |
20 | void leon_pci_init(struct platform_device *ofdev, struct leon_pci_info *info) | 24 | void leon_pci_init(struct platform_device *ofdev, struct leon_pci_info *info) |
21 | { | 25 | { |
22 | LIST_HEAD(resources); | 26 | LIST_HEAD(resources); |
23 | struct pci_bus *root_bus; | 27 | struct pci_bus *root_bus; |
24 | 28 | ||
25 | pci_add_resource(&resources, &info->io_space); | 29 | pci_add_resource_offset(&resources, &info->io_space, |
30 | info->io_space.start - 0x1000); | ||
26 | pci_add_resource(&resources, &info->mem_space); | 31 | pci_add_resource(&resources, &info->mem_space); |
27 | 32 | ||
28 | root_bus = pci_scan_root_bus(&ofdev->dev, 0, info->ops, info, | 33 | root_bus = pci_scan_root_bus(&ofdev->dev, 0, info->ops, info, |
@@ -38,44 +43,6 @@ void leon_pci_init(struct platform_device *ofdev, struct leon_pci_info *info) | |||
38 | } | 43 | } |
39 | } | 44 | } |
40 | 45 | ||
41 | /* PCI Memory and Prefetchable Memory is direct-mapped. However I/O Space is | ||
42 | * accessed through a Window which is translated to low 64KB in PCI space, the | ||
43 | * first 4KB is not used so 60KB is available. | ||
44 | * | ||
45 | * This function is used by generic code to translate resource addresses into | ||
46 | * PCI addresses. | ||
47 | */ | ||
48 | void pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region, | ||
49 | struct resource *res) | ||
50 | { | ||
51 | struct leon_pci_info *info = dev->bus->sysdata; | ||
52 | |||
53 | region->start = res->start; | ||
54 | region->end = res->end; | ||
55 | |||
56 | if (res->flags & IORESOURCE_IO) { | ||
57 | region->start -= (info->io_space.start - 0x1000); | ||
58 | region->end -= (info->io_space.start - 0x1000); | ||
59 | } | ||
60 | } | ||
61 | EXPORT_SYMBOL(pcibios_resource_to_bus); | ||
62 | |||
63 | /* see pcibios_resource_to_bus() comment */ | ||
64 | void pcibios_bus_to_resource(struct pci_dev *dev, struct resource *res, | ||
65 | struct pci_bus_region *region) | ||
66 | { | ||
67 | struct leon_pci_info *info = dev->bus->sysdata; | ||
68 | |||
69 | res->start = region->start; | ||
70 | res->end = region->end; | ||
71 | |||
72 | if (res->flags & IORESOURCE_IO) { | ||
73 | res->start += (info->io_space.start - 0x1000); | ||
74 | res->end += (info->io_space.start - 0x1000); | ||
75 | } | ||
76 | } | ||
77 | EXPORT_SYMBOL(pcibios_bus_to_resource); | ||
78 | |||
79 | void __devinit pcibios_fixup_bus(struct pci_bus *pbus) | 46 | void __devinit pcibios_fixup_bus(struct pci_bus *pbus) |
80 | { | 47 | { |
81 | struct leon_pci_info *info = pbus->sysdata; | 48 | struct leon_pci_info *info = pbus->sysdata; |
diff --git a/arch/sparc/kernel/pci.c b/arch/sparc/kernel/pci.c index bb8bc2e519ac..fdaf21811670 100644 --- a/arch/sparc/kernel/pci.c +++ b/arch/sparc/kernel/pci.c | |||
@@ -375,13 +375,6 @@ static void __devinit apb_calc_first_last(u8 map, u32 *first_p, u32 *last_p) | |||
375 | *last_p = last; | 375 | *last_p = last; |
376 | } | 376 | } |
377 | 377 | ||
378 | static void pci_resource_adjust(struct resource *res, | ||
379 | struct resource *root) | ||
380 | { | ||
381 | res->start += root->start; | ||
382 | res->end += root->start; | ||
383 | } | ||
384 | |||
385 | /* For PCI bus devices which lack a 'ranges' property we interrogate | 378 | /* For PCI bus devices which lack a 'ranges' property we interrogate |
386 | * the config space values to set the resources, just like the generic | 379 | * the config space values to set the resources, just like the generic |
387 | * Linux PCI probing code does. | 380 | * Linux PCI probing code does. |
@@ -390,7 +383,8 @@ static void __devinit pci_cfg_fake_ranges(struct pci_dev *dev, | |||
390 | struct pci_bus *bus, | 383 | struct pci_bus *bus, |
391 | struct pci_pbm_info *pbm) | 384 | struct pci_pbm_info *pbm) |
392 | { | 385 | { |
393 | struct resource *res; | 386 | struct pci_bus_region region; |
387 | struct resource *res, res2; | ||
394 | u8 io_base_lo, io_limit_lo; | 388 | u8 io_base_lo, io_limit_lo; |
395 | u16 mem_base_lo, mem_limit_lo; | 389 | u16 mem_base_lo, mem_limit_lo; |
396 | unsigned long base, limit; | 390 | unsigned long base, limit; |
@@ -412,11 +406,14 @@ static void __devinit pci_cfg_fake_ranges(struct pci_dev *dev, | |||
412 | res = bus->resource[0]; | 406 | res = bus->resource[0]; |
413 | if (base <= limit) { | 407 | if (base <= limit) { |
414 | res->flags = (io_base_lo & PCI_IO_RANGE_TYPE_MASK) | IORESOURCE_IO; | 408 | res->flags = (io_base_lo & PCI_IO_RANGE_TYPE_MASK) | IORESOURCE_IO; |
409 | res2.flags = res->flags; | ||
410 | region.start = base; | ||
411 | region.end = limit + 0xfff; | ||
412 | pcibios_bus_to_resource(dev, &res2, ®ion); | ||
415 | if (!res->start) | 413 | if (!res->start) |
416 | res->start = base; | 414 | res->start = res2.start; |
417 | if (!res->end) | 415 | if (!res->end) |
418 | res->end = limit + 0xfff; | 416 | res->end = res2.end; |
419 | pci_resource_adjust(res, &pbm->io_space); | ||
420 | } | 417 | } |
421 | 418 | ||
422 | pci_read_config_word(dev, PCI_MEMORY_BASE, &mem_base_lo); | 419 | pci_read_config_word(dev, PCI_MEMORY_BASE, &mem_base_lo); |
@@ -428,9 +425,9 @@ static void __devinit pci_cfg_fake_ranges(struct pci_dev *dev, | |||
428 | if (base <= limit) { | 425 | if (base <= limit) { |
429 | res->flags = ((mem_base_lo & PCI_MEMORY_RANGE_TYPE_MASK) | | 426 | res->flags = ((mem_base_lo & PCI_MEMORY_RANGE_TYPE_MASK) | |
430 | IORESOURCE_MEM); | 427 | IORESOURCE_MEM); |
431 | res->start = base; | 428 | region.start = base; |
432 | res->end = limit + 0xfffff; | 429 | region.end = limit + 0xfffff; |
433 | pci_resource_adjust(res, &pbm->mem_space); | 430 | pcibios_bus_to_resource(dev, res, ®ion); |
434 | } | 431 | } |
435 | 432 | ||
436 | pci_read_config_word(dev, PCI_PREF_MEMORY_BASE, &mem_base_lo); | 433 | pci_read_config_word(dev, PCI_PREF_MEMORY_BASE, &mem_base_lo); |
@@ -459,9 +456,9 @@ static void __devinit pci_cfg_fake_ranges(struct pci_dev *dev, | |||
459 | if (base <= limit) { | 456 | if (base <= limit) { |
460 | res->flags = ((mem_base_lo & PCI_MEMORY_RANGE_TYPE_MASK) | | 457 | res->flags = ((mem_base_lo & PCI_MEMORY_RANGE_TYPE_MASK) | |
461 | IORESOURCE_MEM | IORESOURCE_PREFETCH); | 458 | IORESOURCE_MEM | IORESOURCE_PREFETCH); |
462 | res->start = base; | 459 | region.start = base; |
463 | res->end = limit + 0xfffff; | 460 | region.end = limit + 0xfffff; |
464 | pci_resource_adjust(res, &pbm->mem_space); | 461 | pcibios_bus_to_resource(dev, res, ®ion); |
465 | } | 462 | } |
466 | } | 463 | } |
467 | 464 | ||
@@ -472,6 +469,7 @@ static void __devinit apb_fake_ranges(struct pci_dev *dev, | |||
472 | struct pci_bus *bus, | 469 | struct pci_bus *bus, |
473 | struct pci_pbm_info *pbm) | 470 | struct pci_pbm_info *pbm) |
474 | { | 471 | { |
472 | struct pci_bus_region region; | ||
475 | struct resource *res; | 473 | struct resource *res; |
476 | u32 first, last; | 474 | u32 first, last; |
477 | u8 map; | 475 | u8 map; |
@@ -479,18 +477,18 @@ static void __devinit apb_fake_ranges(struct pci_dev *dev, | |||
479 | pci_read_config_byte(dev, APB_IO_ADDRESS_MAP, &map); | 477 | pci_read_config_byte(dev, APB_IO_ADDRESS_MAP, &map); |
480 | apb_calc_first_last(map, &first, &last); | 478 | apb_calc_first_last(map, &first, &last); |
481 | res = bus->resource[0]; | 479 | res = bus->resource[0]; |
482 | res->start = (first << 21); | ||
483 | res->end = (last << 21) + ((1 << 21) - 1); | ||
484 | res->flags = IORESOURCE_IO; | 480 | res->flags = IORESOURCE_IO; |
485 | pci_resource_adjust(res, &pbm->io_space); | 481 | region.start = (first << 21); |
482 | region.end = (last << 21) + ((1 << 21) - 1); | ||
483 | pcibios_bus_to_resource(dev, res, ®ion); | ||
486 | 484 | ||
487 | pci_read_config_byte(dev, APB_MEM_ADDRESS_MAP, &map); | 485 | pci_read_config_byte(dev, APB_MEM_ADDRESS_MAP, &map); |
488 | apb_calc_first_last(map, &first, &last); | 486 | apb_calc_first_last(map, &first, &last); |
489 | res = bus->resource[1]; | 487 | res = bus->resource[1]; |
490 | res->start = (first << 21); | ||
491 | res->end = (last << 21) + ((1 << 21) - 1); | ||
492 | res->flags = IORESOURCE_MEM; | 488 | res->flags = IORESOURCE_MEM; |
493 | pci_resource_adjust(res, &pbm->mem_space); | 489 | region.start = (first << 21); |
490 | region.end = (last << 21) + ((1 << 21) - 1); | ||
491 | pcibios_bus_to_resource(dev, res, ®ion); | ||
494 | } | 492 | } |
495 | 493 | ||
496 | static void __devinit pci_of_scan_bus(struct pci_pbm_info *pbm, | 494 | static void __devinit pci_of_scan_bus(struct pci_pbm_info *pbm, |
@@ -506,6 +504,7 @@ static void __devinit of_scan_pci_bridge(struct pci_pbm_info *pbm, | |||
506 | struct pci_bus *bus; | 504 | struct pci_bus *bus; |
507 | const u32 *busrange, *ranges; | 505 | const u32 *busrange, *ranges; |
508 | int len, i, simba; | 506 | int len, i, simba; |
507 | struct pci_bus_region region; | ||
509 | struct resource *res; | 508 | struct resource *res; |
510 | unsigned int flags; | 509 | unsigned int flags; |
511 | u64 size; | 510 | u64 size; |
@@ -556,8 +555,6 @@ static void __devinit of_scan_pci_bridge(struct pci_pbm_info *pbm, | |||
556 | } | 555 | } |
557 | i = 1; | 556 | i = 1; |
558 | for (; len >= 32; len -= 32, ranges += 8) { | 557 | for (; len >= 32; len -= 32, ranges += 8) { |
559 | struct resource *root; | ||
560 | |||
561 | flags = pci_parse_of_flags(ranges[0]); | 558 | flags = pci_parse_of_flags(ranges[0]); |
562 | size = GET_64BIT(ranges, 6); | 559 | size = GET_64BIT(ranges, 6); |
563 | if (flags == 0 || size == 0) | 560 | if (flags == 0 || size == 0) |
@@ -569,7 +566,6 @@ static void __devinit of_scan_pci_bridge(struct pci_pbm_info *pbm, | |||
569 | " for bridge %s\n", node->full_name); | 566 | " for bridge %s\n", node->full_name); |
570 | continue; | 567 | continue; |
571 | } | 568 | } |
572 | root = &pbm->io_space; | ||
573 | } else { | 569 | } else { |
574 | if (i >= PCI_NUM_RESOURCES - PCI_BRIDGE_RESOURCES) { | 570 | if (i >= PCI_NUM_RESOURCES - PCI_BRIDGE_RESOURCES) { |
575 | printk(KERN_ERR "PCI: too many memory ranges" | 571 | printk(KERN_ERR "PCI: too many memory ranges" |
@@ -578,18 +574,12 @@ static void __devinit of_scan_pci_bridge(struct pci_pbm_info *pbm, | |||
578 | } | 574 | } |
579 | res = bus->resource[i]; | 575 | res = bus->resource[i]; |
580 | ++i; | 576 | ++i; |
581 | root = &pbm->mem_space; | ||
582 | } | 577 | } |
583 | 578 | ||
584 | res->start = GET_64BIT(ranges, 1); | ||
585 | res->end = res->start + size - 1; | ||
586 | res->flags = flags; | 579 | res->flags = flags; |
587 | 580 | region.start = GET_64BIT(ranges, 1); | |
588 | /* Another way to implement this would be to add an of_device | 581 | region.end = region.start + size - 1; |
589 | * layer routine that can calculate a resource for a given | 582 | pcibios_bus_to_resource(dev, res, ®ion); |
590 | * range property value in a PCI device. | ||
591 | */ | ||
592 | pci_resource_adjust(res, root); | ||
593 | } | 583 | } |
594 | after_ranges: | 584 | after_ranges: |
595 | sprintf(bus->name, "PCI Bus %04x:%02x", pci_domain_nr(bus), | 585 | sprintf(bus->name, "PCI Bus %04x:%02x", pci_domain_nr(bus), |
@@ -691,8 +681,10 @@ struct pci_bus * __devinit pci_scan_one_pbm(struct pci_pbm_info *pbm, | |||
691 | 681 | ||
692 | printk("PCI: Scanning PBM %s\n", node->full_name); | 682 | printk("PCI: Scanning PBM %s\n", node->full_name); |
693 | 683 | ||
694 | pci_add_resource(&resources, &pbm->io_space); | 684 | pci_add_resource_offset(&resources, &pbm->io_space, |
695 | pci_add_resource(&resources, &pbm->mem_space); | 685 | pbm->io_space.start); |
686 | pci_add_resource_offset(&resources, &pbm->mem_space, | ||
687 | pbm->mem_space.start); | ||
696 | bus = pci_create_root_bus(parent, pbm->pci_first_busno, pbm->pci_ops, | 688 | bus = pci_create_root_bus(parent, pbm->pci_first_busno, pbm->pci_ops, |
697 | pbm, &resources); | 689 | pbm, &resources); |
698 | if (!bus) { | 690 | if (!bus) { |
@@ -755,46 +747,6 @@ int pcibios_enable_device(struct pci_dev *dev, int mask) | |||
755 | return 0; | 747 | return 0; |
756 | } | 748 | } |
757 | 749 | ||
758 | void pcibios_resource_to_bus(struct pci_dev *pdev, struct pci_bus_region *region, | ||
759 | struct resource *res) | ||
760 | { | ||
761 | struct pci_pbm_info *pbm = pdev->bus->sysdata; | ||
762 | struct resource zero_res, *root; | ||
763 | |||
764 | zero_res.start = 0; | ||
765 | zero_res.end = 0; | ||
766 | zero_res.flags = res->flags; | ||
767 | |||
768 | if (res->flags & IORESOURCE_IO) | ||
769 | root = &pbm->io_space; | ||
770 | else | ||
771 | root = &pbm->mem_space; | ||
772 | |||
773 | pci_resource_adjust(&zero_res, root); | ||
774 | |||
775 | region->start = res->start - zero_res.start; | ||
776 | region->end = res->end - zero_res.start; | ||
777 | } | ||
778 | EXPORT_SYMBOL(pcibios_resource_to_bus); | ||
779 | |||
780 | void pcibios_bus_to_resource(struct pci_dev *pdev, struct resource *res, | ||
781 | struct pci_bus_region *region) | ||
782 | { | ||
783 | struct pci_pbm_info *pbm = pdev->bus->sysdata; | ||
784 | struct resource *root; | ||
785 | |||
786 | res->start = region->start; | ||
787 | res->end = region->end; | ||
788 | |||
789 | if (res->flags & IORESOURCE_IO) | ||
790 | root = &pbm->io_space; | ||
791 | else | ||
792 | root = &pbm->mem_space; | ||
793 | |||
794 | pci_resource_adjust(res, root); | ||
795 | } | ||
796 | EXPORT_SYMBOL(pcibios_bus_to_resource); | ||
797 | |||
798 | char * __devinit pcibios_setup(char *str) | 750 | char * __devinit pcibios_setup(char *str) |
799 | { | 751 | { |
800 | return str; | 752 | return str; |
diff --git a/arch/sparc/kernel/perf_event.c b/arch/sparc/kernel/perf_event.c index 614da624330c..8e16a4a21582 100644 --- a/arch/sparc/kernel/perf_event.c +++ b/arch/sparc/kernel/perf_event.c | |||
@@ -1105,6 +1105,10 @@ static int sparc_pmu_event_init(struct perf_event *event) | |||
1105 | if (atomic_read(&nmi_active) < 0) | 1105 | if (atomic_read(&nmi_active) < 0) |
1106 | return -ENODEV; | 1106 | return -ENODEV; |
1107 | 1107 | ||
1108 | /* does not support taken branch sampling */ | ||
1109 | if (has_branch_stack(event)) | ||
1110 | return -EOPNOTSUPP; | ||
1111 | |||
1108 | switch (attr->type) { | 1112 | switch (attr->type) { |
1109 | case PERF_TYPE_HARDWARE: | 1113 | case PERF_TYPE_HARDWARE: |
1110 | if (attr->config >= sparc_pmu->max_events) | 1114 | if (attr->config >= sparc_pmu->max_events) |
diff --git a/arch/sparc/kernel/process_32.c b/arch/sparc/kernel/process_32.c index f793742eec2b..935fdbcd88c2 100644 --- a/arch/sparc/kernel/process_32.c +++ b/arch/sparc/kernel/process_32.c | |||
@@ -113,9 +113,7 @@ void cpu_idle(void) | |||
113 | while (!need_resched()) | 113 | while (!need_resched()) |
114 | cpu_relax(); | 114 | cpu_relax(); |
115 | } | 115 | } |
116 | preempt_enable_no_resched(); | 116 | schedule_preempt_disabled(); |
117 | schedule(); | ||
118 | preempt_disable(); | ||
119 | check_pgt_cache(); | 117 | check_pgt_cache(); |
120 | } | 118 | } |
121 | } | 119 | } |
@@ -138,9 +136,7 @@ void cpu_idle(void) | |||
138 | while (!need_resched()) | 136 | while (!need_resched()) |
139 | cpu_relax(); | 137 | cpu_relax(); |
140 | } | 138 | } |
141 | preempt_enable_no_resched(); | 139 | schedule_preempt_disabled(); |
142 | schedule(); | ||
143 | preempt_disable(); | ||
144 | check_pgt_cache(); | 140 | check_pgt_cache(); |
145 | } | 141 | } |
146 | } | 142 | } |
diff --git a/arch/sparc/kernel/process_64.c b/arch/sparc/kernel/process_64.c index 39d8b05201a2..06b5b5fc20c7 100644 --- a/arch/sparc/kernel/process_64.c +++ b/arch/sparc/kernel/process_64.c | |||
@@ -104,15 +104,13 @@ void cpu_idle(void) | |||
104 | rcu_idle_exit(); | 104 | rcu_idle_exit(); |
105 | tick_nohz_idle_exit(); | 105 | tick_nohz_idle_exit(); |
106 | 106 | ||
107 | preempt_enable_no_resched(); | ||
108 | |||
109 | #ifdef CONFIG_HOTPLUG_CPU | 107 | #ifdef CONFIG_HOTPLUG_CPU |
110 | if (cpu_is_offline(cpu)) | 108 | if (cpu_is_offline(cpu)) { |
109 | sched_preempt_enable_no_resched(); | ||
111 | cpu_play_dead(); | 110 | cpu_play_dead(); |
111 | } | ||
112 | #endif | 112 | #endif |
113 | 113 | schedule_preempt_disabled(); | |
114 | schedule(); | ||
115 | preempt_disable(); | ||
116 | } | 114 | } |
117 | } | 115 | } |
118 | 116 | ||
diff --git a/arch/sparc/kernel/signal32.c b/arch/sparc/kernel/signal32.c index 023b8860dc97..c8f5b50db89c 100644 --- a/arch/sparc/kernel/signal32.c +++ b/arch/sparc/kernel/signal32.c | |||
@@ -776,7 +776,6 @@ static inline int handle_signal32(unsigned long signr, struct k_sigaction *ka, | |||
776 | siginfo_t *info, | 776 | siginfo_t *info, |
777 | sigset_t *oldset, struct pt_regs *regs) | 777 | sigset_t *oldset, struct pt_regs *regs) |
778 | { | 778 | { |
779 | sigset_t blocked; | ||
780 | int err; | 779 | int err; |
781 | 780 | ||
782 | if (ka->sa.sa_flags & SA_SIGINFO) | 781 | if (ka->sa.sa_flags & SA_SIGINFO) |
@@ -787,11 +786,7 @@ static inline int handle_signal32(unsigned long signr, struct k_sigaction *ka, | |||
787 | if (err) | 786 | if (err) |
788 | return err; | 787 | return err; |
789 | 788 | ||
790 | sigorsets(&blocked, ¤t->blocked, &ka->sa.sa_mask); | 789 | block_sigmask(ka, signr); |
791 | if (!(ka->sa.sa_flags & SA_NOMASK)) | ||
792 | sigaddset(&blocked, signr); | ||
793 | set_current_blocked(&blocked); | ||
794 | |||
795 | tracehook_signal_handler(signr, info, ka, regs, 0); | 790 | tracehook_signal_handler(signr, info, ka, regs, 0); |
796 | 791 | ||
797 | return 0; | 792 | return 0; |
diff --git a/arch/sparc/kernel/signal_32.c b/arch/sparc/kernel/signal_32.c index d54c6e53aba0..7bb71b6fbd20 100644 --- a/arch/sparc/kernel/signal_32.c +++ b/arch/sparc/kernel/signal_32.c | |||
@@ -465,7 +465,6 @@ static inline int | |||
465 | handle_signal(unsigned long signr, struct k_sigaction *ka, | 465 | handle_signal(unsigned long signr, struct k_sigaction *ka, |
466 | siginfo_t *info, sigset_t *oldset, struct pt_regs *regs) | 466 | siginfo_t *info, sigset_t *oldset, struct pt_regs *regs) |
467 | { | 467 | { |
468 | sigset_t blocked; | ||
469 | int err; | 468 | int err; |
470 | 469 | ||
471 | if (ka->sa.sa_flags & SA_SIGINFO) | 470 | if (ka->sa.sa_flags & SA_SIGINFO) |
@@ -476,11 +475,7 @@ handle_signal(unsigned long signr, struct k_sigaction *ka, | |||
476 | if (err) | 475 | if (err) |
477 | return err; | 476 | return err; |
478 | 477 | ||
479 | sigorsets(&blocked, ¤t->blocked, &ka->sa.sa_mask); | 478 | block_sigmask(ka, signr); |
480 | if (!(ka->sa.sa_flags & SA_NOMASK)) | ||
481 | sigaddset(&blocked, signr); | ||
482 | set_current_blocked(&blocked); | ||
483 | |||
484 | tracehook_signal_handler(signr, info, ka, regs, 0); | 479 | tracehook_signal_handler(signr, info, ka, regs, 0); |
485 | 480 | ||
486 | return 0; | 481 | return 0; |
diff --git a/arch/sparc/kernel/signal_64.c b/arch/sparc/kernel/signal_64.c index f0836cd0e2f2..d8a67e60be80 100644 --- a/arch/sparc/kernel/signal_64.c +++ b/arch/sparc/kernel/signal_64.c | |||
@@ -479,18 +479,14 @@ static inline int handle_signal(unsigned long signr, struct k_sigaction *ka, | |||
479 | siginfo_t *info, | 479 | siginfo_t *info, |
480 | sigset_t *oldset, struct pt_regs *regs) | 480 | sigset_t *oldset, struct pt_regs *regs) |
481 | { | 481 | { |
482 | sigset_t blocked; | ||
483 | int err; | 482 | int err; |
484 | 483 | ||
485 | err = setup_rt_frame(ka, regs, signr, oldset, | 484 | err = setup_rt_frame(ka, regs, signr, oldset, |
486 | (ka->sa.sa_flags & SA_SIGINFO) ? info : NULL); | 485 | (ka->sa.sa_flags & SA_SIGINFO) ? info : NULL); |
487 | if (err) | 486 | if (err) |
488 | return err; | 487 | return err; |
489 | sigorsets(&blocked, ¤t->blocked, &ka->sa.sa_mask); | ||
490 | if (!(ka->sa.sa_flags & SA_NOMASK)) | ||
491 | sigaddset(&blocked, signr); | ||
492 | set_current_blocked(&blocked); | ||
493 | 488 | ||
489 | block_sigmask(ka, signr); | ||
494 | tracehook_signal_handler(signr, info, ka, regs, 0); | 490 | tracehook_signal_handler(signr, info, ka, regs, 0); |
495 | 491 | ||
496 | return 0; | 492 | return 0; |
diff --git a/arch/sparc/mm/highmem.c b/arch/sparc/mm/highmem.c index 77140a02c86a..055c66cf1bf4 100644 --- a/arch/sparc/mm/highmem.c +++ b/arch/sparc/mm/highmem.c | |||
@@ -30,7 +30,7 @@ | |||
30 | #include <asm/tlbflush.h> | 30 | #include <asm/tlbflush.h> |
31 | #include <asm/fixmap.h> | 31 | #include <asm/fixmap.h> |
32 | 32 | ||
33 | void *__kmap_atomic(struct page *page) | 33 | void *kmap_atomic(struct page *page) |
34 | { | 34 | { |
35 | unsigned long vaddr; | 35 | unsigned long vaddr; |
36 | long idx, type; | 36 | long idx, type; |
@@ -64,7 +64,7 @@ void *__kmap_atomic(struct page *page) | |||
64 | 64 | ||
65 | return (void*) vaddr; | 65 | return (void*) vaddr; |
66 | } | 66 | } |
67 | EXPORT_SYMBOL(__kmap_atomic); | 67 | EXPORT_SYMBOL(kmap_atomic); |
68 | 68 | ||
69 | void __kunmap_atomic(void *kvaddr) | 69 | void __kunmap_atomic(void *kvaddr) |
70 | { | 70 | { |