Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 104230
b: refs/heads/master
c: 519f014
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed Jul 21, 2008
1 parent 10dc362 commit 7c00449
Show file tree
Hide file tree
Showing 464 changed files with 26,916 additions and 27,116 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 908cf4b925e419bc74f3297b2f0e51d6f8a81da2
refs/heads/master: 519f0141f1c42e2b8b59c7dea005cbf6095358e8
42 changes: 29 additions & 13 deletions trunk/arch/sparc/kernel/apc.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ __setup("apc=", apc_setup);
* CPU idle callback function
* See .../arch/sparc/kernel/process.c
*/
void apc_swift_idle(void)
static void apc_swift_idle(void)
{
#ifdef APC_DEBUG_LED
set_auxio(0x00, AUXIO_LED);
Expand Down Expand Up @@ -85,54 +85,70 @@ static int apc_release(struct inode *inode, struct file *f)
return 0;
}

static int apc_ioctl(struct inode *inode, struct file *f,
unsigned int cmd, unsigned long __arg)
static long apc_ioctl(struct file *f, unsigned int cmd, unsigned long __arg)
{
__u8 inarg, __user *arg;

arg = (__u8 __user *) __arg;

lock_kernel();

switch (cmd) {
case APCIOCGFANCTL:
if (put_user(apc_readb(APC_FANCTL_REG) & APC_REGMASK, arg))
return -EFAULT;
if (put_user(apc_readb(APC_FANCTL_REG) & APC_REGMASK, arg)) {
unlock_kernel();
return -EFAULT;
}
break;

case APCIOCGCPWR:
if (put_user(apc_readb(APC_CPOWER_REG) & APC_REGMASK, arg))
if (put_user(apc_readb(APC_CPOWER_REG) & APC_REGMASK, arg)) {
unlock_kernel();
return -EFAULT;
}
break;

case APCIOCGBPORT:
if (put_user(apc_readb(APC_BPORT_REG) & APC_BPMASK, arg))
if (put_user(apc_readb(APC_BPORT_REG) & APC_BPMASK, arg)) {
unlock_kernel();
return -EFAULT;
}
break;

case APCIOCSFANCTL:
if (get_user(inarg, arg))
if (get_user(inarg, arg)) {
unlock_kernel();
return -EFAULT;
}
apc_writeb(inarg & APC_REGMASK, APC_FANCTL_REG);
break;
case APCIOCSCPWR:
if (get_user(inarg, arg))
if (get_user(inarg, arg)) {
unlock_kernel();
return -EFAULT;
}
apc_writeb(inarg & APC_REGMASK, APC_CPOWER_REG);
break;
case APCIOCSBPORT:
if (get_user(inarg, arg))
if (get_user(inarg, arg)) {
unlock_kernel();
return -EFAULT;
}
apc_writeb(inarg & APC_BPMASK, APC_BPORT_REG);
break;
default:
unlock_kernel();
return -EINVAL;
};

unlock_kernel();
return 0;
}

static const struct file_operations apc_fops = {
.ioctl = apc_ioctl,
.open = apc_open,
.release = apc_release,
.unlocked_ioctl = apc_ioctl,
.open = apc_open,
.release = apc_release,
};

static struct miscdevice apc_miscdev = { APC_MINOR, APC_DEVNAME, &apc_fops };
Expand Down
12 changes: 0 additions & 12 deletions trunk/arch/sparc/kernel/asm-offsets.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,6 @@ int foo(void)
{
DEFINE(AOFF_task_thread, offsetof(struct task_struct, thread));
BLANK();
/* XXX This is the stuff for sclow.S, kill it. */
DEFINE(AOFF_task_pid, offsetof(struct task_struct, pid));
DEFINE(AOFF_task_uid, offsetof(struct task_struct, uid));
DEFINE(AOFF_task_gid, offsetof(struct task_struct, gid));
DEFINE(AOFF_task_euid, offsetof(struct task_struct, euid));
DEFINE(AOFF_task_egid, offsetof(struct task_struct, egid));
/* DEFINE(THREAD_INFO, offsetof(struct task_struct, stack)); */
DEFINE(ASIZ_task_uid, sizeof(current->uid));
DEFINE(ASIZ_task_gid, sizeof(current->gid));
DEFINE(ASIZ_task_euid, sizeof(current->euid));
DEFINE(ASIZ_task_egid, sizeof(current->egid));
BLANK();
DEFINE(AOFF_thread_fork_kpsr,
offsetof(struct thread_struct, fork_kpsr));
BLANK();
Expand Down
9 changes: 5 additions & 4 deletions trunk/arch/sparc/kernel/ebus.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ static inline unsigned long ebus_alloc(size_t size)

/*
*/
int __init ebus_blacklist_irq(const char *name)
static int __init ebus_blacklist_irq(const char *name)
{
struct ebus_device_irq *dp;

Expand All @@ -83,8 +83,8 @@ int __init ebus_blacklist_irq(const char *name)
return 0;
}

void __init fill_ebus_child(struct device_node *dp,
struct linux_ebus_child *dev)
static void __init fill_ebus_child(struct device_node *dp,
struct linux_ebus_child *dev)
{
const int *regs;
const int *irqs;
Expand Down Expand Up @@ -144,7 +144,8 @@ void __init fill_ebus_child(struct device_node *dp,
}
}

void __init fill_ebus_device(struct device_node *dp, struct linux_ebus_device *dev)
static void __init fill_ebus_device(struct device_node *dp,
struct linux_ebus_device *dev)
{
const struct linux_prom_registers *regs;
struct linux_ebus_child *child;
Expand Down
5 changes: 2 additions & 3 deletions trunk/arch/sparc/kernel/entry.S
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include <asm/vaddrs.h>
#include <asm/memreg.h>
#include <asm/page.h>
#include <asm/pgtable.h>
#ifdef CONFIG_SUN4
#include <asm/pgtsun4.h>
#else
Expand Down Expand Up @@ -1317,7 +1318,6 @@ linux_sparc_syscall:
bne linux_fast_syscall
/* Just do first insn from SAVE_ALL in the delay slot */

.globl syscall_is_too_hard
syscall_is_too_hard:
SAVE_ALL_HEAD
rd %wim, %l3
Expand Down Expand Up @@ -1544,8 +1544,7 @@ kgdb_trap_low:
#endif

.align 4
.globl __handle_exception, flush_patch_exception
__handle_exception:
.globl flush_patch_exception
flush_patch_exception:
FLUSH_ALL_KERNEL_WINDOWS;
ldd [%o0], %o6
Expand Down
1 change: 0 additions & 1 deletion trunk/arch/sparc/kernel/etrap.S
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,6 @@ tsetup_mmu_patchme:
*/
#define glob_tmp g1

.globl tsetup_sun4c_stackchk
tsetup_sun4c_stackchk:
/* Done by caller: andcc %sp, 0x7, %g0 */
bne trap_setup_user_stack_is_bolixed
Expand Down
2 changes: 0 additions & 2 deletions trunk/arch/sparc/kernel/head.S
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
*/

.align 4
.globl cputyp
cputyp:
.word 1

Expand Down Expand Up @@ -1280,7 +1279,6 @@ halt_me:
* gets initialized in c-code so all routines can use it.
*/

.globl prom_vector_p
prom_vector_p:
.word 0

Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/sparc/kernel/idprom.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ static struct idprom idprom_buffer;
* of the Sparc CPU and have a meaningful IDPROM machtype value that we
* know about. See asm-sparc/machines.h for empirical constants.
*/
struct Sun_Machine_Models Sun_Machines[NUM_SUN_MACHINES] = {
static struct Sun_Machine_Models Sun_Machines[NUM_SUN_MACHINES] = {
/* First, Sun4's */
{ "Sun 4/100 Series", (SM_SUN4 | SM_4_110) },
{ "Sun 4/200 Series", (SM_SUN4 | SM_4_260) },
Expand Down
13 changes: 7 additions & 6 deletions trunk/arch/sparc/kernel/ioport.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,16 @@

#define mmu_inval_dma_area(p, l) /* Anton pulled it out for 2.4.0-xx */

struct resource *_sparc_find_resource(struct resource *r, unsigned long);
static struct resource *_sparc_find_resource(struct resource *r,
unsigned long);

static void __iomem *_sparc_ioremap(struct resource *res, u32 bus, u32 pa, int sz);
static void __iomem *_sparc_alloc_io(unsigned int busno, unsigned long phys,
unsigned long size, char *name);
static void _sparc_free_io(struct resource *res);

static void register_proc_sparc_ioport(void);

/* This points to the next to use virtual memory for DVMA mappings */
static struct resource _sparc_dvma = {
.name = "sparc_dvma", .start = DVMA_VADDR, .end = DVMA_END - 1
Expand Down Expand Up @@ -539,8 +542,6 @@ void __init sbus_setup_arch_props(struct sbus_bus *sbus, struct device_node *dp)

int __init sbus_arch_preinit(void)
{
extern void register_proc_sparc_ioport(void);

register_proc_sparc_ioport();

#ifdef CONFIG_SUN4
Expand Down Expand Up @@ -853,8 +854,8 @@ _sparc_io_get_info(char *buf, char **start, off_t fpos, int length, int *eof,
* XXX Too slow. Can have 8192 DVMA pages on sun4m in the worst case.
* This probably warrants some sort of hashing.
*/
struct resource *
_sparc_find_resource(struct resource *root, unsigned long hit)
static struct resource *_sparc_find_resource(struct resource *root,
unsigned long hit)
{
struct resource *tmp;

Expand All @@ -865,7 +866,7 @@ _sparc_find_resource(struct resource *root, unsigned long hit)
return NULL;
}

void register_proc_sparc_ioport(void)
static void register_proc_sparc_ioport(void)
{
#ifdef CONFIG_PROC_FS
create_proc_read_entry("io_map",0,NULL,_sparc_io_get_info,&sparc_iomap);
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/sparc/kernel/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ void (*sparc_init_timers)(irq_handler_t ) =
struct irqaction static_irqaction[MAX_STATIC_ALLOC];
int static_irq_count;

struct {
static struct {
struct irqaction *action;
int flags;
} sparc_irq[NR_IRQS];
Expand Down
14 changes: 7 additions & 7 deletions trunk/arch/sparc/kernel/process.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* linux/arch/sparc/kernel/process.c
*
* Copyright (C) 1995 David S. Miller (davem@davemloft.net)
* Copyright (C) 1995, 2008 David S. Miller (davem@davemloft.net)
* Copyright (C) 1996 Eddie C. Dost (ecd@skynet.be)
*/

Expand All @@ -14,7 +14,6 @@
#include <linux/module.h>
#include <linux/sched.h>
#include <linux/kernel.h>
#include <linux/kallsyms.h>
#include <linux/mm.h>
#include <linux/stddef.h>
#include <linux/ptrace.h>
Expand Down Expand Up @@ -177,6 +176,8 @@ void machine_power_off(void)
machine_halt();
}

#if 0

static DEFINE_SPINLOCK(sparc_backtrace_lock);

void __show_backtrace(unsigned long fp)
Expand All @@ -196,7 +197,7 @@ void __show_backtrace(unsigned long fp)
rw->ins[4], rw->ins[5],
rw->ins[6],
rw->ins[7]);
print_symbol("%s\n", rw->ins[7]);
printk("%pS\n", (void *) rw->ins[7]);
rw = (struct reg_window *) rw->ins[6];
}
spin_unlock_irqrestore(&sparc_backtrace_lock, flags);
Expand Down Expand Up @@ -228,7 +229,6 @@ void smp_show_backtrace_all_cpus(void)
}
#endif

#if 0
void show_stackframe(struct sparc_stackf *sf)
{
unsigned long size;
Expand Down Expand Up @@ -264,14 +264,14 @@ void show_regs(struct pt_regs *r)

printk("PSR: %08lx PC: %08lx NPC: %08lx Y: %08lx %s\n",
r->psr, r->pc, r->npc, r->y, print_tainted());
print_symbol("PC: <%s>\n", r->pc);
printk("PC: <%pS>\n", (void *) r->pc);
printk("%%G: %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
r->u_regs[0], r->u_regs[1], r->u_regs[2], r->u_regs[3],
r->u_regs[4], r->u_regs[5], r->u_regs[6], r->u_regs[7]);
printk("%%O: %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
r->u_regs[8], r->u_regs[9], r->u_regs[10], r->u_regs[11],
r->u_regs[12], r->u_regs[13], r->u_regs[14], r->u_regs[15]);
print_symbol("RPC: <%s>\n", r->u_regs[15]);
printk("RPC: <%pS>\n", (void *) r->u_regs[15]);

printk("%%L: %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
rw->locals[0], rw->locals[1], rw->locals[2], rw->locals[3],
Expand Down Expand Up @@ -306,7 +306,7 @@ void show_stack(struct task_struct *tsk, unsigned long *_ksp)
rw = (struct reg_window *) fp;
pc = rw->ins[7];
printk("[%08lx : ", pc);
print_symbol("%s ] ", pc);
printk("%pS ] ", (void *) pc);
fp = rw->ins[6];
} while (++count < 16);
printk("\n");
Expand Down
2 changes: 0 additions & 2 deletions trunk/arch/sparc/kernel/rtrap.S
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,6 @@ ret_trap_user_stack_is_bolixed:
b signal_p
ld [%curptr + TI_FLAGS], %g2


.globl sun4c_rett_stackchk
sun4c_rett_stackchk:
be 1f
and %fp, 0xfff, %g1 ! delay slot
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/sparc/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ struct screen_info screen_info = {
extern unsigned long trapbase;

/* Pretty sick eh? */
void prom_sync_me(void)
static void prom_sync_me(void)
{
unsigned long prom_tbr, flags;

Expand Down Expand Up @@ -97,7 +97,7 @@ void prom_sync_me(void)
return;
}

unsigned int boot_flags __initdata = 0;
static unsigned int boot_flags __initdata = 0;
#define BOOTME_DEBUG 0x1

/* Exported for mm/init.c:paging_init. */
Expand Down
7 changes: 0 additions & 7 deletions trunk/arch/sparc/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,9 @@

#include "irq.h"

int smp_num_cpus = 1;
volatile unsigned long cpu_callin_map[NR_CPUS] __initdata = {0,};
unsigned char boot_cpu_id = 0;
unsigned char boot_cpu_id4 = 0; /* boot_cpu_id << 2 */
int smp_activated = 0;
volatile int __cpu_number_map[NR_CPUS];
volatile int __cpu_logical_map[NR_CPUS];

cpumask_t cpu_online_map = CPU_MASK_NONE;
cpumask_t phys_cpu_present_map = CPU_MASK_NONE;
Expand All @@ -55,9 +51,6 @@ cpumask_t smp_commenced_mask = CPU_MASK_NONE;
* instruction which is much better...
*/

/* Used to make bitops atomic */
unsigned char bitops_spinlock = 0;

void __cpuinit smp_store_cpu_info(int id)
{
int cpu_node;
Expand Down
3 changes: 2 additions & 1 deletion trunk/arch/sparc/kernel/sun4c_irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ unsigned char *interrupt_enable = NULL;

static int sun4c_pil_map[] = { 0, 1, 2, 3, 5, 7, 8, 9 };

unsigned int sun4c_sbint_to_irq(struct sbus_dev *sdev, unsigned int sbint)
static unsigned int sun4c_sbint_to_irq(struct sbus_dev *sdev,
unsigned int sbint)
{
if (sbint >= sizeof(sun4c_pil_map)) {
printk(KERN_ERR "%s: bogus SBINT %d\n", sdev->prom_name, sbint);
Expand Down
Loading

0 comments on commit 7c00449

Please sign in to comment.