diff options
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r-- | arch/powerpc/kernel/irq.c | 6 | ||||
-rw-r--r-- | arch/powerpc/kernel/pci_32.c | 4 | ||||
-rw-r--r-- | arch/powerpc/kernel/pci_64.c | 6 | ||||
-rw-r--r-- | arch/powerpc/kernel/signal_64.c | 10 | ||||
-rw-r--r-- | arch/powerpc/kernel/sys_ppc32.c | 9 | ||||
-rw-r--r-- | arch/powerpc/kernel/vdso32/gettimeofday.S | 4 | ||||
-rw-r--r-- | arch/powerpc/kernel/vdso64/gettimeofday.S | 7 |
7 files changed, 35 insertions, 11 deletions
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c index 42c8ed6ed528..c2b84c64db20 100644 --- a/arch/powerpc/kernel/irq.c +++ b/arch/powerpc/kernel/irq.c | |||
@@ -412,6 +412,12 @@ struct irq_map_entry irq_map[NR_IRQS]; | |||
412 | static unsigned int irq_virq_count = NR_IRQS; | 412 | static unsigned int irq_virq_count = NR_IRQS; |
413 | static struct irq_host *irq_default_host; | 413 | static struct irq_host *irq_default_host; |
414 | 414 | ||
415 | irq_hw_number_t virq_to_hw(unsigned int virq) | ||
416 | { | ||
417 | return irq_map[virq].hwirq; | ||
418 | } | ||
419 | EXPORT_SYMBOL_GPL(virq_to_hw); | ||
420 | |||
415 | struct irq_host *irq_alloc_host(unsigned int revmap_type, | 421 | struct irq_host *irq_alloc_host(unsigned int revmap_type, |
416 | unsigned int revmap_arg, | 422 | unsigned int revmap_arg, |
417 | struct irq_host_ops *ops, | 423 | struct irq_host_ops *ops, |
diff --git a/arch/powerpc/kernel/pci_32.c b/arch/powerpc/kernel/pci_32.c index e66064b5093a..86982112b0dd 100644 --- a/arch/powerpc/kernel/pci_32.c +++ b/arch/powerpc/kernel/pci_32.c | |||
@@ -1047,10 +1047,10 @@ void pcibios_make_OF_bus_map(void) | |||
1047 | #endif /* CONFIG_PPC_OF */ | 1047 | #endif /* CONFIG_PPC_OF */ |
1048 | 1048 | ||
1049 | /* Add sysfs properties */ | 1049 | /* Add sysfs properties */ |
1050 | void pcibios_add_platform_entries(struct pci_dev *pdev) | 1050 | int pcibios_add_platform_entries(struct pci_dev *pdev) |
1051 | { | 1051 | { |
1052 | #ifdef CONFIG_PPC_OF | 1052 | #ifdef CONFIG_PPC_OF |
1053 | device_create_file(&pdev->dev, &dev_attr_devspec); | 1053 | return device_create_file(&pdev->dev, &dev_attr_devspec); |
1054 | #endif /* CONFIG_PPC_OF */ | 1054 | #endif /* CONFIG_PPC_OF */ |
1055 | } | 1055 | } |
1056 | 1056 | ||
diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c index 249cca27a9b8..e3009a43ac56 100644 --- a/arch/powerpc/kernel/pci_64.c +++ b/arch/powerpc/kernel/pci_64.c | |||
@@ -367,8 +367,10 @@ struct pci_dev *of_create_pci_dev(struct device_node *node, | |||
367 | sprintf(pci_name(dev), "%04x:%02x:%02x.%d", pci_domain_nr(bus), | 367 | sprintf(pci_name(dev), "%04x:%02x:%02x.%d", pci_domain_nr(bus), |
368 | dev->bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn)); | 368 | dev->bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn)); |
369 | dev->class = get_int_prop(node, "class-code", 0); | 369 | dev->class = get_int_prop(node, "class-code", 0); |
370 | dev->revision = get_int_prop(node, "revision-id", 0); | ||
370 | 371 | ||
371 | DBG(" class: 0x%x\n", dev->class); | 372 | DBG(" class: 0x%x\n", dev->class); |
373 | DBG(" revision: 0x%x\n", dev->revision); | ||
372 | 374 | ||
373 | dev->current_state = 4; /* unknown power state */ | 375 | dev->current_state = 4; /* unknown power state */ |
374 | dev->error_state = pci_channel_io_normal; | 376 | dev->error_state = pci_channel_io_normal; |
@@ -876,9 +878,9 @@ static ssize_t pci_show_devspec(struct device *dev, | |||
876 | } | 878 | } |
877 | static DEVICE_ATTR(devspec, S_IRUGO, pci_show_devspec, NULL); | 879 | static DEVICE_ATTR(devspec, S_IRUGO, pci_show_devspec, NULL); |
878 | 880 | ||
879 | void pcibios_add_platform_entries(struct pci_dev *pdev) | 881 | int pcibios_add_platform_entries(struct pci_dev *pdev) |
880 | { | 882 | { |
881 | device_create_file(&pdev->dev, &dev_attr_devspec); | 883 | return device_create_file(&pdev->dev, &dev_attr_devspec); |
882 | } | 884 | } |
883 | 885 | ||
884 | #define ISA_SPACE_MASK 0x1 | 886 | #define ISA_SPACE_MASK 0x1 |
diff --git a/arch/powerpc/kernel/signal_64.c b/arch/powerpc/kernel/signal_64.c index 1ce0ae3f6ffc..b27e26852fdb 100644 --- a/arch/powerpc/kernel/signal_64.c +++ b/arch/powerpc/kernel/signal_64.c | |||
@@ -176,6 +176,13 @@ static long restore_sigcontext(struct pt_regs *regs, sigset_t *set, int sig, | |||
176 | */ | 176 | */ |
177 | discard_lazy_cpu_state(); | 177 | discard_lazy_cpu_state(); |
178 | 178 | ||
179 | /* | ||
180 | * Force reload of FP/VEC. | ||
181 | * This has to be done before copying stuff into current->thread.fpr/vr | ||
182 | * for the reasons explained in the previous comment. | ||
183 | */ | ||
184 | regs->msr &= ~(MSR_FP | MSR_FE0 | MSR_FE1 | MSR_VEC); | ||
185 | |||
179 | err |= __copy_from_user(¤t->thread.fpr, &sc->fp_regs, FP_REGS_SIZE); | 186 | err |= __copy_from_user(¤t->thread.fpr, &sc->fp_regs, FP_REGS_SIZE); |
180 | 187 | ||
181 | #ifdef CONFIG_ALTIVEC | 188 | #ifdef CONFIG_ALTIVEC |
@@ -197,9 +204,6 @@ static long restore_sigcontext(struct pt_regs *regs, sigset_t *set, int sig, | |||
197 | current->thread.vrsave = 0; | 204 | current->thread.vrsave = 0; |
198 | #endif /* CONFIG_ALTIVEC */ | 205 | #endif /* CONFIG_ALTIVEC */ |
199 | 206 | ||
200 | /* Force reload of FP/VEC */ | ||
201 | regs->msr &= ~(MSR_FP | MSR_FE0 | MSR_FE1 | MSR_VEC); | ||
202 | |||
203 | return err; | 207 | return err; |
204 | } | 208 | } |
205 | 209 | ||
diff --git a/arch/powerpc/kernel/sys_ppc32.c b/arch/powerpc/kernel/sys_ppc32.c index 047246ad4f65..b42cbf1e2d7d 100644 --- a/arch/powerpc/kernel/sys_ppc32.c +++ b/arch/powerpc/kernel/sys_ppc32.c | |||
@@ -810,3 +810,12 @@ asmlinkage long compat_sys_request_key(const char __user *_type, | |||
810 | return sys_request_key(_type, _description, _callout_info, destringid); | 810 | return sys_request_key(_type, _description, _callout_info, destringid); |
811 | } | 811 | } |
812 | 812 | ||
813 | asmlinkage long compat_sys_sync_file_range2(int fd, unsigned int flags, | ||
814 | unsigned offset_hi, unsigned offset_lo, | ||
815 | unsigned nbytes_hi, unsigned nbytes_lo) | ||
816 | { | ||
817 | loff_t offset = ((loff_t)offset_hi << 32) | offset_lo; | ||
818 | loff_t nbytes = ((loff_t)nbytes_hi << 32) | nbytes_lo; | ||
819 | |||
820 | return sys_sync_file_range(fd, offset, nbytes, flags); | ||
821 | } | ||
diff --git a/arch/powerpc/kernel/vdso32/gettimeofday.S b/arch/powerpc/kernel/vdso32/gettimeofday.S index 05909f754307..72ca26df457e 100644 --- a/arch/powerpc/kernel/vdso32/gettimeofday.S +++ b/arch/powerpc/kernel/vdso32/gettimeofday.S | |||
@@ -32,6 +32,8 @@ V_FUNCTION_BEGIN(__kernel_gettimeofday) | |||
32 | mr r11,r4 /* r11 saves tz */ | 32 | mr r11,r4 /* r11 saves tz */ |
33 | bl __get_datapage@local /* get data page */ | 33 | bl __get_datapage@local /* get data page */ |
34 | mr r9, r3 /* datapage ptr in r9 */ | 34 | mr r9, r3 /* datapage ptr in r9 */ |
35 | cmplwi r10,0 /* check if tv is NULL */ | ||
36 | beq 3f | ||
35 | bl __do_get_xsec@local /* get xsec from tb & kernel */ | 37 | bl __do_get_xsec@local /* get xsec from tb & kernel */ |
36 | bne- 2f /* out of line -> do syscall */ | 38 | bne- 2f /* out of line -> do syscall */ |
37 | 39 | ||
@@ -50,7 +52,7 @@ V_FUNCTION_BEGIN(__kernel_gettimeofday) | |||
50 | mulhwu r5,r5,r6 | 52 | mulhwu r5,r5,r6 |
51 | stw r5,TVAL32_TV_USEC(r10) | 53 | stw r5,TVAL32_TV_USEC(r10) |
52 | 54 | ||
53 | cmpli cr0,r11,0 /* check if tz is NULL */ | 55 | 3: cmplwi r11,0 /* check if tz is NULL */ |
54 | beq 1f | 56 | beq 1f |
55 | lwz r4,CFG_TZ_MINUTEWEST(r9)/* fill tz */ | 57 | lwz r4,CFG_TZ_MINUTEWEST(r9)/* fill tz */ |
56 | lwz r5,CFG_TZ_DSTTIME(r9) | 58 | lwz r5,CFG_TZ_DSTTIME(r9) |
diff --git a/arch/powerpc/kernel/vdso64/gettimeofday.S b/arch/powerpc/kernel/vdso64/gettimeofday.S index 40ffd9b6cef7..c6401f9e37f1 100644 --- a/arch/powerpc/kernel/vdso64/gettimeofday.S +++ b/arch/powerpc/kernel/vdso64/gettimeofday.S | |||
@@ -1,5 +1,4 @@ | |||
1 | 1 | /* | |
2 | /* | ||
3 | * Userland implementation of gettimeofday() for 64 bits processes in a | 2 | * Userland implementation of gettimeofday() for 64 bits processes in a |
4 | * ppc64 kernel for use in the vDSO | 3 | * ppc64 kernel for use in the vDSO |
5 | * | 4 | * |
@@ -32,6 +31,8 @@ V_FUNCTION_BEGIN(__kernel_gettimeofday) | |||
32 | mr r11,r3 /* r11 holds tv */ | 31 | mr r11,r3 /* r11 holds tv */ |
33 | mr r10,r4 /* r10 holds tz */ | 32 | mr r10,r4 /* r10 holds tz */ |
34 | bl V_LOCAL_FUNC(__get_datapage) /* get data page */ | 33 | bl V_LOCAL_FUNC(__get_datapage) /* get data page */ |
34 | cmpldi r11,0 /* check if tv is NULL */ | ||
35 | beq 2f | ||
35 | bl V_LOCAL_FUNC(__do_get_xsec) /* get xsec from tb & kernel */ | 36 | bl V_LOCAL_FUNC(__do_get_xsec) /* get xsec from tb & kernel */ |
36 | lis r7,15 /* r7 = 1000000 = USEC_PER_SEC */ | 37 | lis r7,15 /* r7 = 1000000 = USEC_PER_SEC */ |
37 | ori r7,r7,16960 | 38 | ori r7,r7,16960 |
@@ -43,8 +44,8 @@ V_FUNCTION_BEGIN(__kernel_gettimeofday) | |||
43 | * XSEC_PER_SEC | 44 | * XSEC_PER_SEC |
44 | */ | 45 | */ |
45 | rldicl r0,r0,44,20 | 46 | rldicl r0,r0,44,20 |
46 | cmpldi cr0,r10,0 /* check if tz is NULL */ | ||
47 | std r0,TVAL64_TV_USEC(r11) /* store usec in tv */ | 47 | std r0,TVAL64_TV_USEC(r11) /* store usec in tv */ |
48 | 2: cmpldi r10,0 /* check if tz is NULL */ | ||
48 | beq 1f | 49 | beq 1f |
49 | lwz r4,CFG_TZ_MINUTEWEST(r3)/* fill tz */ | 50 | lwz r4,CFG_TZ_MINUTEWEST(r3)/* fill tz */ |
50 | lwz r5,CFG_TZ_DSTTIME(r3) | 51 | lwz r5,CFG_TZ_DSTTIME(r3) |