Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
4e5adcc1
Commit
4e5adcc1
authored
Aug 02, 2002
by
Anton Blanchard
Browse files
Options
Browse Files
Download
Plain Diff
Merge samba.org:/scratch/anton/linux-2.5
into samba.org:/scratch/anton/linux-2.5_work
parents
454e1bfb
390ca130
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
126 additions
and
71 deletions
+126
-71
arch/ppc64/defconfig
arch/ppc64/defconfig
+19
-3
arch/ppc64/kernel/irq.c
arch/ppc64/kernel/irq.c
+6
-8
arch/ppc64/kernel/pSeries_lpar.c
arch/ppc64/kernel/pSeries_lpar.c
+7
-14
arch/ppc64/kernel/time.c
arch/ppc64/kernel/time.c
+0
-3
arch/ppc64/kernel/traps.c
arch/ppc64/kernel/traps.c
+2
-3
include/asm-ppc64/hardirq.h
include/asm-ppc64/hardirq.h
+75
-10
include/asm-ppc64/softirq.h
include/asm-ppc64/softirq.h
+8
-16
include/asm-ppc64/system.h
include/asm-ppc64/system.h
+6
-14
include/asm-ppc64/thread_info.h
include/asm-ppc64/thread_info.h
+3
-0
No files found.
arch/ppc64/defconfig
View file @
4e5adcc1
...
...
@@ -487,10 +487,26 @@ CONFIG_VIOPATH=y
#
CONFIG_VT=y
CONFIG_VT_CONSOLE=y
CONFIG_SERIAL=y
CONFIG_SERIAL_CONSOLE=y
# CONFIG_SERIAL_EXTENDED is not set
# CONFIG_SERIAL_NONSTANDARD is not set
#
# Serial drivers
#
CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_CONSOLE=y
# CONFIG_SERIAL_8250_CS is not set
# CONFIG_SERIAL_8250_EXTENDED is not set
# CONFIG_SERIAL_8250_MANY_PORTS is not set
# CONFIG_SERIAL_8250_SHARE_IRQ is not set
# CONFIG_SERIAL_8250_DETECT_IRQ is not set
# CONFIG_SERIAL_8250_MULTIPORT is not set
# CONFIG_SERIAL_8250_RSA is not set
#
# Non-8250 serial port support
#
CONFIG_SERIAL_CORE=y
CONFIG_SERIAL_CORE_CONSOLE=y
CONFIG_UNIX98_PTYS=y
CONFIG_UNIX98_PTY_COUNT=256
CONFIG_HVC_CONSOLE=y
...
...
arch/ppc64/kernel/irq.c
View file @
4e5adcc1
...
...
@@ -169,10 +169,12 @@ setup_irq(unsigned int irq, struct irqaction * new)
inline
void
synchronize_irq
(
unsigned
int
irq
)
{
while
(
irq_desc
[
irq
].
status
&
IRQ_INPROGRESS
)
{
barrier
();
/* is there anything to synchronize with? */
if
(
!
irq_desc
[
irq
].
action
)
return
;
while
(
irq_desc
[
irq
].
status
&
IRQ_INPROGRESS
)
cpu_relax
();
}
}
#endif
/* CONFIG_SMP */
...
...
@@ -567,7 +569,6 @@ void ppc_irq_dispatch_handler(struct pt_regs *regs, int irq)
int
do_IRQ
(
struct
pt_regs
*
regs
)
{
int
cpu
=
smp_processor_id
();
int
irq
,
first
=
1
;
#ifdef CONFIG_PPC_ISERIES
struct
paca_struct
*
lpaca
;
...
...
@@ -605,7 +606,7 @@ int do_IRQ(struct pt_regs *regs)
ppc_spurious_interrupts
++
;
#endif
irq_exit
();
irq_exit
();
#ifdef CONFIG_PPC_ISERIES
if
(
lpaca
->
xLpPaca
.
xIntDword
.
xFields
.
xDecrInt
)
{
...
...
@@ -615,9 +616,6 @@ int do_IRQ(struct pt_regs *regs)
}
#endif
if
(
softirq_pending
(
cpu
))
do_softirq
();
return
1
;
/* lets ret_from_int know we can do checks */
}
...
...
arch/ppc64/kernel/pSeries_lpar.c
View file @
4e5adcc1
...
...
@@ -155,7 +155,7 @@ long plpar_pte_protect(unsigned long flags,
unsigned
long
ptex
,
unsigned
long
avpn
)
{
return
plpar_hcall_norets
(
H_PROTECT
,
flags
,
ptex
);
return
plpar_hcall_norets
(
H_PROTECT
,
flags
,
ptex
,
avpn
);
}
long
plpar_tce_get
(
unsigned
long
liobn
,
...
...
@@ -552,6 +552,7 @@ static long pSeries_lpar_insert_hpte(unsigned long hpte_group,
int
secondary
,
unsigned
long
hpteflags
,
int
bolted
,
int
large
)
{
/* XXX fix for large page */
unsigned
long
avpn
=
vpn
>>
11
;
unsigned
long
arpn
=
physRpn_to_absRpn
(
prpn
);
unsigned
long
lpar_rc
;
...
...
@@ -651,11 +652,10 @@ static long pSeries_lpar_hpte_updatepp(unsigned long slot, unsigned long newpp,
unsigned
long
va
,
int
large
)
{
unsigned
long
lpar_rc
;
unsigned
long
flags
;
flags
=
(
newpp
&
7
)
|
H_AVPN
;
unsigned
long
vpn
=
va
>>
PAGE_SHIFT
;
unsigned
long
flags
=
(
newpp
&
7
)
|
H_AVPN
;
unsigned
long
avpn
=
va
>>
23
;
lpar_rc
=
plpar_pte_protect
(
flags
,
slot
,
(
vpn
>>
4
)
&
~
0x7fUL
);
lpar_rc
=
plpar_pte_protect
(
flags
,
slot
,
(
avpn
<<
7
)
);
if
(
lpar_rc
==
H_Not_Found
)
{
udbg_printf
(
"updatepp missed
\n
"
);
...
...
@@ -748,18 +748,11 @@ static void pSeries_lpar_hpte_updateboltedpp(unsigned long newpp,
static
void
pSeries_lpar_hpte_invalidate
(
unsigned
long
slot
,
unsigned
long
va
,
int
large
,
int
local
)
{
unsigned
long
vpn
,
avpn
;
unsigned
long
avpn
=
va
>>
23
;
unsigned
long
lpar_rc
;
unsigned
long
dummy1
,
dummy2
;
if
(
large
)
vpn
=
va
>>
LARGE_PAGE_SHIFT
;
else
vpn
=
va
>>
PAGE_SHIFT
;
avpn
=
vpn
>>
11
;
lpar_rc
=
plpar_pte_remove
(
H_AVPN
,
slot
,
(
vpn
>>
4
)
&
~
0x7fUL
,
&
dummy1
,
lpar_rc
=
plpar_pte_remove
(
H_AVPN
,
slot
,
(
avpn
<<
7
),
&
dummy1
,
&
dummy2
);
if
(
lpar_rc
==
H_Not_Found
)
{
...
...
arch/ppc64/kernel/time.c
View file @
4e5adcc1
...
...
@@ -293,9 +293,6 @@ int timer_interrupt(struct pt_regs * regs)
irq_exit
();
if
(
softirq_pending
(
cpu
))
do_softirq
();
return
1
;
}
...
...
arch/ppc64/kernel/traps.c
View file @
4e5adcc1
...
...
@@ -128,13 +128,12 @@ void
SystemResetException
(
struct
pt_regs
*
regs
)
{
if
(
fwnmi_active
)
{
char
*
msg
;
unsigned
long
*
r3
=
__va
(
regs
->
gpr
[
3
]);
/* for FWNMI debug */
struct
rtas_error_log
*
errlog
;
msg
=
"FWNMI is active with save area at %016lx
\n
"
;
udbg_printf
(
msg
,
r3
);
printk
(
msg
,
r3
);
udbg_printf
(
"FWNMI is active with save area at %016lx
\n
"
,
r3
);
errlog
=
FWNMI_get_errinfo
(
regs
);
FWNMI_release_errinfo
();
}
if
(
debugger
)
...
...
include/asm-ppc64/hardirq.h
View file @
4e5adcc1
...
...
@@ -13,30 +13,86 @@
#include <linux/preempt.h>
typedef
struct
{
unsigned
long
__softirq_pending
;
unsigned
long
__syscall_count
;
unsigned
int
__softirq_pending
;
unsigned
int
__syscall_count
;
struct
task_struct
*
__ksoftirqd_task
;
unsigned
long
idle_timestamp
;
}
____cacheline_aligned
irq_cpustat_t
;
#include <linux/irq_cpustat.h>
/* Standard mappings for irq_cpustat_t above */
#define IRQ_OFFSET 64
/*
* We put the hardirq and softirq counter into the preemption
* counter. The bitmask has the following meaning:
*
* - bits 0-7 are the preemption count (max preemption depth: 256)
* - bits 8-15 are the softirq count (max # of softirqs: 256)
* - bits 16-24 are the hardirq count (max # of hardirqs: 512)
*
* - ( bit 26 is the PREEMPT_ACTIVE flag. )
*
* PREEMPT_MASK: 0x000000ff
* SOFTIRQ_MASK: 0x0000ff00
* HARDIRQ_MASK: 0x01ff0000
*/
#define PREEMPT_BITS 8
#define SOFTIRQ_BITS 8
#define HARDIRQ_BITS 9
#define PREEMPT_SHIFT 0
#define SOFTIRQ_SHIFT (PREEMPT_SHIFT + PREEMPT_BITS)
#define HARDIRQ_SHIFT (SOFTIRQ_SHIFT + SOFTIRQ_BITS)
#define __HARDIRQ_MASK(x) ((1UL << (x))-1)
#define PREEMPT_MASK (__HARDIRQ_MASK(PREEMPT_BITS) << PREEMPT_SHIFT)
#define SOFTIRQ_MASK (__HARDIRQ_MASK(SOFTIRQ_BITS) << SOFTIRQ_SHIFT)
#define HARDIRQ_MASK (__HARDIRQ_MASK(HARDIRQ_BITS) << HARDIRQ_SHIFT)
#define hardirq_count() (preempt_count() & HARDIRQ_MASK)
#define softirq_count() (preempt_count() & SOFTIRQ_MASK)
#define irq_count() (preempt_count() & (HARDIRQ_MASK | SOFTIRQ_MASK))
#define PREEMPT_OFFSET (1UL << PREEMPT_SHIFT)
#define SOFTIRQ_OFFSET (1UL << SOFTIRQ_SHIFT)
#define HARDIRQ_OFFSET (1UL << HARDIRQ_SHIFT)
/*
* The hardirq mask has to be large enough to have
* space for potentially all IRQ sources in the system
* nesting on a single CPU:
*/
#if (1 << HARDIRQ_BITS) < NR_IRQS
# error HARDIRQ_BITS is too low!
#endif
/*
* Are we
in an interrupt context? Either doing bottom half
*
or hardware interrupt processing
?
* Are we
doing bottom half or hardware interrupt processing?
*
Are we in a softirq context? Interrupt context
?
*/
#define in_interrupt() \
((preempt_count() & ~PREEMPT_ACTIVE) >= IRQ_OFFSET)
#define in_irq() (hardirq_count())
#define in_softirq() (softirq_count())
#define in_interrupt() (irq_count())
#define in_irq in_interrupt
#define hardirq_trylock() (!in_interrupt())
#define hardirq_endlock() do { } while (0)
#define irq_enter() (preempt_count() += IRQ_OFFSET)
#define irq_exit() (preempt_count() -= IRQ_OFFSET)
#define irq_enter() (preempt_count() += HARDIRQ_OFFSET)
#if CONFIG_PREEMPT
# define IRQ_EXIT_OFFSET (HARDIRQ_OFFSET-1)
#else
# define IRQ_EXIT_OFFSET HARDIRQ_OFFSET
#endif
#define irq_exit() \
do { \
preempt_count() -= IRQ_EXIT_OFFSET; \
if (!in_interrupt() && softirq_pending(smp_processor_id())) \
do_softirq(); \
preempt_enable_no_resched(); \
} while (0)
#ifndef CONFIG_SMP
# define synchronize_irq(irq) barrier()
...
...
@@ -45,4 +101,13 @@ typedef struct {
#endif
/* CONFIG_SMP */
#endif
/* __KERNEL__ */
#define show_stack(SP) \
do { \
if (SP) \
print_backtrace(SP); \
else \
print_backtrace(_get_SP()); \
} while (0)
#endif
/* __ASM_HARDIRQ_H */
include/asm-ppc64/softirq.h
View file @
4e5adcc1
...
...
@@ -12,24 +12,16 @@
#include <asm/hardirq.h>
#define local_bh_disable() \
do { preempt_count() += IRQ_OFFSET; barrier(); } while (0)
do { preempt_count() += SOFTIRQ_OFFSET; barrier(); } while (0)
#define __local_bh_enable() \
do { barrier(); preempt_count() -= IRQ_OFFSET; } while (0)
do { barrier(); preempt_count() -=
SOFT
IRQ_OFFSET; } while (0)
#define local_bh_enable() \
do { \
if (unlikely((preempt_count() == IRQ_OFFSET) && \
softirq_pending(smp_processor_id()))) { \
__local_bh_enable(); \
do_softirq(); \
preempt_check_resched(); \
} else { \
__local_bh_enable(); \
preempt_check_resched(); \
} \
#define local_bh_enable() \
do { \
__local_bh_enable(); \
if (unlikely(!in_interrupt() && softirq_pending(smp_processor_id()))) \
do_softirq(); \
preempt_check_resched(); \
} while (0)
#define in_softirq() in_interrupt()
#endif
/* __ASM_SOFTIRQ_H */
include/asm-ppc64/system.h
View file @
4e5adcc1
...
...
@@ -88,26 +88,18 @@ struct task_struct;
extern
void
__switch_to
(
struct
task_struct
*
,
struct
task_struct
*
);
#define switch_to(prev, next, last) __switch_to((prev), (next))
#define prepare_arch_schedule(prev) do { } while(0)
#define finish_arch_schedule(prev) do { } while(0)
#define prepare_arch_switch(rq) do { } while(0)
#define finish_arch_switch(rq) spin_unlock_irq(&(rq)->lock)
struct
thread_struct
;
extern
void
_switch
(
struct
thread_struct
*
prev
,
struct
thread_struct
*
next
);
struct
pt_regs
;
extern
void
dump_regs
(
struct
pt_regs
*
);
#ifndef CONFIG_SMP
#define cli() local_irq_disable()
#define sti() local_irq_enable()
#define save_flags(flags) local_save_flags(flags)
#define restore_flags(flags) local_irq_restore(flags)
#define save_and_cli(flags) local_irq_save(flags)
#endif
/* !CONFIG_SMP */
#define irqs_disabled() \
({ \
unsigned long flags; \
local_save_flags(flags); \
!(flags & MSR_EE); \
})
static
__inline__
int
__is_processor
(
unsigned
long
pv
)
{
...
...
include/asm-ppc64/thread_info.h
View file @
4e5adcc1
...
...
@@ -27,6 +27,8 @@ struct thread_info {
/*
* macros/functions for gaining access to the thread information structure
*
* preempt_count needs to be 1 initially, until the scheduler is functional.
*/
#define INIT_THREAD_INFO(tsk) \
{ \
...
...
@@ -34,6 +36,7 @@ struct thread_info {
exec_domain: &default_exec_domain, \
flags: 0, \
cpu: 0, \
preempt_count: 1, \
}
#define init_thread_info (init_thread_union.thread_info)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment