Skip to content

Commit cedc563

Browse files
author
Linus Torvalds
committed
Merge bk://kernel.bkbits.net/davem/sparc-2.5
into home.osdl.org:/home/torvalds/v2.5/linux
2 parents ebf20dd + 919a119 commit cedc563

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+1205
-1435
lines changed

arch/arm/Kconfig

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ config DISCONTIGMEM
239239

240240
# Now handle the bus types
241241
config PCI
242-
bool "PCI support" if ARCH_INTEGRATOR
242+
bool "PCI support" if ARCH_INTEGRATOR_AP
243243
default y if ARCH_FTVPCI || ARCH_SHARK || FOOTBRIDGE_HOST || ARCH_IOP3XX
244244
help
245245
Find out whether you have a PCI motherboard. PCI is the name of a
@@ -645,8 +645,6 @@ source "drivers/misc/Kconfig"
645645

646646
source "drivers/usb/Kconfig"
647647

648-
source "net/bluetooth/Kconfig"
649-
650648

651649
menu "Kernel hacking"
652650

arch/arm/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,6 @@ define archhelp
182182
echo '* zImage - Compressed kernel image (arch/$(ARCH)/boot/zImage)'
183183
echo ' Image - Uncompressed kernel image (arch/$(ARCH)/boot/Image)'
184184
echo ' bootpImage - Combined zImage and initial RAM disk'
185-
echo ' initrd - Create an initial image'
186185
echo ' install - Install uncompressed kernel'
187186
echo ' zinstall - Install compressed kernel'
188187
echo ' Install using (your) ~/bin/installkernel or'

arch/arm/boot/compressed/head.S

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -477,6 +477,12 @@ proc_types:
477477
@ b __arm6_cache_off
478478
@ b __armv3_cache_flush
479479

480+
.word 0x00000000 @ old ARM ID
481+
.word 0x0000f000
482+
mov pc, lr
483+
mov pc, lr
484+
mov pc, lr
485+
480486
.word 0x41007000 @ ARM7/710
481487
.word 0xfff8fe00
482488
b __arm7_cache_off
@@ -489,6 +495,14 @@ proc_types:
489495
b __armv4_cache_off
490496
mov pc, lr
491497

498+
.word 0x00007000 @ ARM7 IDs
499+
.word 0x0000f000
500+
mov pc, lr
501+
mov pc, lr
502+
mov pc, lr
503+
504+
@ Everything from here on will be the new ID system.
505+
492506
.word 0x41129200 @ ARM920T
493507
.word 0xff00fff0
494508
b __armv4_cache_on
@@ -507,8 +521,16 @@ proc_types:
507521
b __armv4_cache_off
508522
b __armv4_cache_flush
509523

510-
.word 0x69050000 @ xscale
511-
.word 0xffff0000
524+
@ These match on the architecture ID
525+
526+
.word 0x00050000 @ ARMv5TE
527+
.word 0x000f0000
528+
b __armv4_cache_on
529+
b __armv4_cache_off
530+
b __armv4_cache_flush
531+
532+
.word 0x00060000 @ ARMv5TEJ
533+
.word 0x000f0000
512534
b __armv4_cache_on
513535
b __armv4_cache_off
514536
b __armv4_cache_flush

arch/arm/kernel/apm.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -179,13 +179,10 @@ static void queue_event(apm_event_t event, struct apm_user *sender)
179179
wake_up_interruptible(&apm_waitqueue);
180180
}
181181

182-
/* defined in pm.c */
183-
extern int suspend(void);
184-
185182
static int apm_suspend(void)
186183
{
187184
struct list_head *l;
188-
int err = suspend();
185+
int err = pm_suspend(PM_SUSPEND_MEM);
189186

190187
/*
191188
* Anyone on the APM queues will think we're still suspended.

arch/arm/kernel/entry-armv.S

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -439,20 +439,25 @@ ENTRY(soft_irq_mask)
439439

440440
.macro get_irqnr_and_base, irqnr, irqstat, base, tmp
441441
/* FIXME: should not be using soo many LDRs here */
442-
ldr \irqnr, =IO_ADDRESS(INTEGRATOR_IC_BASE)
443-
ldr \irqstat, [\irqnr, #IRQ_STATUS] @ get masked status
444-
ldr \irqnr, =IO_ADDRESS(INTEGRATOR_HDR_BASE)
445-
ldr \irqnr, [\irqnr, #(INTEGRATOR_HDR_IC_OFFSET+IRQ_STATUS)]
446-
orr \irqstat, \irqstat, \irqnr, lsl #INTEGRATOR_CM_INT0
442+
ldr \base, =IO_ADDRESS(INTEGRATOR_IC_BASE)
443+
mov \irqnr, #IRQ_PIC_START
444+
ldr \irqstat, [\base, #IRQ_STATUS] @ get masked status
445+
ldr \base, =IO_ADDRESS(INTEGRATOR_HDR_BASE)
446+
teq \irqstat, #0
447+
ldreq \irqstat, [\base, #(INTEGRATOR_HDR_IC_OFFSET+IRQ_STATUS)]
448+
moveq \irqnr, #IRQ_CIC_START
447449

448-
mov \irqnr, #0
449-
1001: tst \irqstat, #1
450+
1001: tst \irqstat, #15
450451
bne 1002f
452+
add \irqnr, \irqnr, #4
453+
movs \irqstat, \irqstat, lsr #4
454+
bne 1001b
455+
1002: tst \irqstat, #1
456+
bne 1003f
451457
add \irqnr, \irqnr, #1
452-
mov \irqstat, \irqstat, lsr #1
453-
cmp \irqnr, #22
454-
bcc 1001b
455-
1002: /* EQ will be set if we reach 22 */
458+
movs \irqstat, \irqstat, lsr #1
459+
bne 1002b
460+
1003: /* EQ will be set if no irqs pending */
456461
.endm
457462

458463
.macro irq_prio_table

arch/arm/kernel/pm.c

Lines changed: 3 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -9,68 +9,18 @@
99
* sleep.
1010
*/
1111
#include <linux/config.h>
12+
#include <linux/init.h>
13+
#include <linux/sysctl.h>
1214
#include <linux/pm.h>
13-
#include <linux/device.h>
14-
#include <linux/sysdev.h>
1515
#include <linux/errno.h>
1616
#include <linux/sched.h>
1717

18-
#include <asm/leds.h>
19-
#include <asm/system.h>
20-
21-
/*
22-
* Tell the linker that pm_do_suspend may not be present.
23-
*/
24-
extern int pm_do_suspend(void) __attribute__((weak));
25-
26-
int suspend(void)
27-
{
28-
int ret;
29-
30-
if (!pm_do_suspend)
31-
return -ENOSYS;
32-
33-
/*
34-
* Suspend "legacy" devices.
35-
*/
36-
ret = pm_send_all(PM_SUSPEND, (void *)3);
37-
if (ret != 0)
38-
goto out;
39-
40-
ret = device_suspend(3);
41-
if (ret)
42-
goto resume_legacy;
43-
44-
local_irq_disable();
45-
leds_event(led_stop);
46-
47-
sysdev_suspend(3);
48-
49-
ret = pm_do_suspend();
50-
51-
sysdev_resume();
52-
53-
leds_event(led_start);
54-
local_irq_enable();
55-
56-
device_resume();
57-
58-
resume_legacy:
59-
pm_send_all(PM_RESUME, (void *)0);
60-
61-
out:
62-
return ret;
63-
}
64-
6518
#ifdef CONFIG_SYSCTL
6619
/*
6720
* We really want this to die. It's a disgusting hack using unallocated
6821
* sysctl numbers. We should be using a real interface.
6922
*/
7023

71-
#include <linux/init.h>
72-
#include <linux/sysctl.h>
73-
7424
static int
7525
pm_sysctl_proc_handler(ctl_table *ctl, int write, struct file *filp,
7626
void *buffer, size_t *lenp)
@@ -79,7 +29,7 @@ pm_sysctl_proc_handler(ctl_table *ctl, int write, struct file *filp,
7929
printk("PM: task %s (pid %d) uses deprecated sysctl PM interface\n",
8030
current->comm, current->pid);
8131
if (write)
82-
ret = suspend();
32+
ret = pm_suspend(PM_SUSPEND_MEM);
8333
return ret;
8434
}
8535

arch/arm/kernel/process.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,12 +117,10 @@ __setup("reboot=", reboot_setup);
117117

118118
void machine_halt(void)
119119
{
120-
leds_event(led_halted);
121120
}
122121

123122
void machine_power_off(void)
124123
{
125-
leds_event(led_halted);
126124
if (pm_power_off)
127125
pm_power_off();
128126
}

arch/arm/kernel/setup.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ static const char *proc_arch[] = {
182182
"5",
183183
"5T",
184184
"5TE",
185-
"?(8)",
185+
"5TEJ",
186186
"?(9)",
187187
"?(10)",
188188
"?(11)",

arch/arm/kernel/signal.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#include <linux/tty.h>
2222
#include <linux/binfmts.h>
2323
#include <linux/elf.h>
24+
#include <linux/suspend.h>
2425

2526
#include <asm/pgalloc.h>
2627
#include <asm/ucontext.h>
@@ -539,6 +540,11 @@ static int do_signal(sigset_t *oldset, struct pt_regs *regs, int syscall)
539540
if (!user_mode(regs))
540541
return 0;
541542

543+
if (current->flags & PF_FREEZE) {
544+
refrigerator(0);
545+
goto no_signal;
546+
}
547+
542548
if (current->ptrace & PT_SINGLESTEP)
543549
ptrace_cancel_bpt(current);
544550

@@ -550,6 +556,7 @@ static int do_signal(sigset_t *oldset, struct pt_regs *regs, int syscall)
550556
return 1;
551557
}
552558

559+
no_signal:
553560
/*
554561
* No signal to deliver to the process - restart the syscall.
555562
*/

arch/arm/kernel/time.c

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#include <linux/timex.h>
2727
#include <linux/errno.h>
2828
#include <linux/profile.h>
29+
#include <linux/sysdev.h>
2930

3031
#include <asm/hardware.h>
3132
#include <asm/io.h>
@@ -72,8 +73,6 @@ unsigned long (*gettimeoffset)(void) = dummy_gettimeoffset;
7273
*/
7374
unsigned long long sched_clock(void)
7475
{
75-
unsigned long long this_offset;
76-
7776
return (unsigned long long)jiffies * (1000000000 / HZ);
7877
}
7978

@@ -137,6 +136,47 @@ static void dummy_leds_event(led_event_t evt)
137136

138137
void (*leds_event)(led_event_t) = dummy_leds_event;
139138

139+
static int leds_suspend(struct sys_device *dev, u32 state)
140+
{
141+
leds_event(led_stop);
142+
return 0;
143+
}
144+
145+
static int leds_resume(struct sys_device *dev)
146+
{
147+
leds_event(led_start);
148+
return 0;
149+
}
150+
151+
static int leds_shutdown(struct sys_device *dev)
152+
{
153+
leds_event(led_halted);
154+
return 0;
155+
}
156+
157+
static struct sysdev_class leds_sysclass = {
158+
set_kset_name("leds"),
159+
.shutdown = leds_shutdown,
160+
.suspend = leds_suspend,
161+
.resume = leds_resume,
162+
};
163+
164+
static struct sys_device leds_device = {
165+
.id = 0,
166+
.cls = &leds_sysclass,
167+
};
168+
169+
static int __init leds_init(void)
170+
{
171+
int ret;
172+
ret = sysdev_class_register(&leds_sysclass);
173+
if (ret == 0)
174+
ret = sys_device_register(&leds_device);
175+
return ret;
176+
}
177+
178+
device_initcall(leds_init);
179+
140180
EXPORT_SYMBOL(leds_event);
141181
#endif
142182

arch/arm/kernel/traps.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,10 +212,10 @@ NORET_TYPE void die(const char *str, struct pt_regs *regs, int err)
212212
printk("CPU: %d\n", smp_processor_id());
213213
show_regs(regs);
214214
printk("Process %s (pid: %d, stack limit = 0x%p)\n",
215-
current->comm, current->pid, tsk->thread_info + 1);
215+
tsk->comm, tsk->pid, tsk->thread_info + 1);
216216

217217
if (!user_mode(regs) || in_interrupt()) {
218-
dump_mem("Stack: ", (unsigned long)(regs + 1), 8192+(unsigned long)tsk->thread_info);
218+
dump_mem("Stack: ", regs->ARM_sp, 8192+(unsigned long)tsk->thread_info);
219219
dump_backtrace(regs, tsk);
220220
dump_instr(regs);
221221
}

0 commit comments

Comments
 (0)