diff options
Diffstat (limited to 'arch/sparc/kernel')
-rw-r--r-- | arch/sparc/kernel/head_32.S | 4 | ||||
-rw-r--r-- | arch/sparc/kernel/head_64.S | 2 | ||||
-rw-r--r-- | arch/sparc/kernel/ldc.c | 6 | ||||
-rw-r--r-- | arch/sparc/kernel/of_device_32.c | 21 | ||||
-rw-r--r-- | arch/sparc/kernel/of_device_64.c | 21 | ||||
-rw-r--r-- | arch/sparc/kernel/smp_64.c | 4 | ||||
-rw-r--r-- | arch/sparc/kernel/sys_sparc32.c | 19 | ||||
-rw-r--r-- | arch/sparc/kernel/time_64.c | 7 | ||||
-rw-r--r-- | arch/sparc/kernel/vmlinux.lds.S | 2 |
9 files changed, 57 insertions, 29 deletions
diff --git a/arch/sparc/kernel/head_32.S b/arch/sparc/kernel/head_32.S index f0b4b51..6b4d8ac 100644 --- a/arch/sparc/kernel/head_32.S +++ b/arch/sparc/kernel/head_32.S @@ -72,7 +72,7 @@ sun4e_notsup: .align 4 /* The Sparc trap table, bootloader gives us control at _start. */ - .section .text.head,"ax" + __HEAD .globl start, _stext, _start, __stext .globl trapbase _start: /* danger danger */ @@ -735,7 +735,7 @@ go_to_highmem: nop /* The code above should be at beginning and we have to take care about - * short jumps, as branching to .text.init section from .text is usually + * short jumps, as branching to .init.text section from .text is usually * impossible */ __INIT /* Acquire boot time privileged register values, this will help debugging. diff --git a/arch/sparc/kernel/head_64.S b/arch/sparc/kernel/head_64.S index 3a1b7bf..91bf4c7 100644 --- a/arch/sparc/kernel/head_64.S +++ b/arch/sparc/kernel/head_64.S @@ -467,7 +467,7 @@ jump_to_sun4u_init: jmpl %g2 + %g0, %g0 nop - .section .text.init.refok + __REF sun4u_init: BRANCH_IF_SUN4V(g1, sun4v_init) diff --git a/arch/sparc/kernel/ldc.c b/arch/sparc/kernel/ldc.c index 6ce5d25..adf5f27 100644 --- a/arch/sparc/kernel/ldc.c +++ b/arch/sparc/kernel/ldc.c @@ -1183,8 +1183,7 @@ out_free_txq: free_queue(lp->tx_num_entries, lp->tx_base); out_free_mssbuf: - if (mssbuf) - kfree(mssbuf); + kfree(mssbuf); out_free_iommu: ldc_iommu_release(lp); @@ -1217,8 +1216,7 @@ void ldc_free(struct ldc_channel *lp) hlist_del(&lp->list); - if (lp->mssbuf) - kfree(lp->mssbuf); + kfree(lp->mssbuf); ldc_iommu_release(lp); diff --git a/arch/sparc/kernel/of_device_32.c b/arch/sparc/kernel/of_device_32.c index 0a83bd7..c8f14c1 100644 --- a/arch/sparc/kernel/of_device_32.c +++ b/arch/sparc/kernel/of_device_32.c @@ -246,8 +246,25 @@ static unsigned long of_bus_pci_get_flags(const u32 *addr, unsigned long flags) static int of_bus_sbus_match(struct device_node *np) { - return !strcmp(np->name, "sbus") || - !strcmp(np->name, "sbi"); + struct device_node *dp = np; + + while (dp) { + if (!strcmp(dp->name, "sbus") || + !strcmp(dp->name, "sbi")) + return 1; + + /* Have a look at use_1to1_mapping(). We're trying + * to match SBUS if that's the top-level bus and we + * don't have some intervening real bus that provides + * ranges based translations. + */ + if (of_find_property(dp, "ranges", NULL) != NULL) + break; + + dp = dp->parent; + } + + return 0; } static void of_bus_sbus_count_cells(struct device_node *child, diff --git a/arch/sparc/kernel/of_device_64.c b/arch/sparc/kernel/of_device_64.c index 27381f1..5ac287a 100644 --- a/arch/sparc/kernel/of_device_64.c +++ b/arch/sparc/kernel/of_device_64.c @@ -300,8 +300,25 @@ static unsigned long of_bus_pci_get_flags(const u32 *addr, unsigned long flags) static int of_bus_sbus_match(struct device_node *np) { - return !strcmp(np->name, "sbus") || - !strcmp(np->name, "sbi"); + struct device_node *dp = np; + + while (dp) { + if (!strcmp(dp->name, "sbus") || + !strcmp(dp->name, "sbi")) + return 1; + + /* Have a look at use_1to1_mapping(). We're trying + * to match SBUS if that's the top-level bus and we + * don't have some intervening real bus that provides + * ranges based translations. + */ + if (of_find_property(dp, "ranges", NULL) != NULL) + break; + + dp = dp->parent; + } + + return 0; } static void of_bus_sbus_count_cells(struct device_node *child, diff --git a/arch/sparc/kernel/smp_64.c b/arch/sparc/kernel/smp_64.c index 708e12a..f7642e5a 100644 --- a/arch/sparc/kernel/smp_64.c +++ b/arch/sparc/kernel/smp_64.c @@ -118,9 +118,9 @@ void __cpuinit smp_callin(void) while (!cpu_isset(cpuid, smp_commenced_mask)) rmb(); - ipi_call_lock(); + ipi_call_lock_irq(); cpu_set(cpuid, cpu_online_map); - ipi_call_unlock(); + ipi_call_unlock_irq(); /* idle thread is expected to have preempt disabled */ preempt_disable(); diff --git a/arch/sparc/kernel/sys_sparc32.c b/arch/sparc/kernel/sys_sparc32.c index e800503..f5000a4 100644 --- a/arch/sparc/kernel/sys_sparc32.c +++ b/arch/sparc/kernel/sys_sparc32.c @@ -206,21 +206,12 @@ asmlinkage long compat_sys_fstatat64(unsigned int dfd, char __user *filename, struct compat_stat64 __user * statbuf, int flag) { struct kstat stat; - int error = -EINVAL; - - if ((flag & ~AT_SYMLINK_NOFOLLOW) != 0) - goto out; - - if (flag & AT_SYMLINK_NOFOLLOW) - error = vfs_lstat_fd(dfd, filename, &stat); - else - error = vfs_stat_fd(dfd, filename, &stat); - - if (!error) - error = cp_compat_stat64(&stat, statbuf); + int error; -out: - return error; + error = vfs_fstatat(dfd, filename, &stat, flag); + if (error) + return error; + return cp_compat_stat64(&stat, statbuf); } asmlinkage long compat_sys_sysfs(int option, u32 arg1, u32 arg2) diff --git a/arch/sparc/kernel/time_64.c b/arch/sparc/kernel/time_64.c index db310aa..5c12e79 100644 --- a/arch/sparc/kernel/time_64.c +++ b/arch/sparc/kernel/time_64.c @@ -814,6 +814,11 @@ void udelay(unsigned long usecs) } EXPORT_SYMBOL(udelay); +static cycle_t clocksource_tick_read(struct clocksource *cs) +{ + return tick_ops->get_tick(); +} + void __init time_init(void) { unsigned long freq = sparc64_init_timers(); @@ -827,7 +832,7 @@ void __init time_init(void) clocksource_tick.mult = clocksource_hz2mult(freq, clocksource_tick.shift); - clocksource_tick.read = tick_ops->get_tick; + clocksource_tick.read = clocksource_tick_read; printk("clocksource: mult[%x] shift[%d]\n", clocksource_tick.mult, clocksource_tick.shift); diff --git a/arch/sparc/kernel/vmlinux.lds.S b/arch/sparc/kernel/vmlinux.lds.S index 7626708..fcbbd00 100644 --- a/arch/sparc/kernel/vmlinux.lds.S +++ b/arch/sparc/kernel/vmlinux.lds.S @@ -41,7 +41,7 @@ SECTIONS .text TEXTSTART : { _text = .; - *(.text.head) + HEAD_TEXT TEXT_TEXT SCHED_TEXT LOCK_TEXT |