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
c8ec0450
Commit
c8ec0450
authored
Jan 03, 2003
by
Anton Blanchard
Browse files
Options
Browse Files
Download
Plain Diff
Merge samba.org:/scratch/anton/linux-2.5
into samba.org:/scratch/anton/for-alan
parents
b0de9c76
a12bec84
Changes
34
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
34 changed files
with
399 additions
and
896 deletions
+399
-896
arch/ppc64/Makefile
arch/ppc64/Makefile
+20
-34
arch/ppc64/boot/Makefile
arch/ppc64/boot/Makefile
+85
-89
arch/ppc64/boot/main.c
arch/ppc64/boot/main.c
+6
-0
arch/ppc64/kernel/Makefile
arch/ppc64/kernel/Makefile
+25
-33
arch/ppc64/kernel/chrp_setup.c
arch/ppc64/kernel/chrp_setup.c
+1
-1
arch/ppc64/kernel/head.S
arch/ppc64/kernel/head.S
+11
-12
arch/ppc64/kernel/init_task.c
arch/ppc64/kernel/init_task.c
+1
-1
arch/ppc64/kernel/ioctl32.c
arch/ppc64/kernel/ioctl32.c
+8
-9
arch/ppc64/kernel/irq.c
arch/ppc64/kernel/irq.c
+9
-12
arch/ppc64/kernel/misc.S
arch/ppc64/kernel/misc.S
+4
-44
arch/ppc64/kernel/pSeries_pci.c
arch/ppc64/kernel/pSeries_pci.c
+1
-6
arch/ppc64/kernel/pci_dma.c
arch/ppc64/kernel/pci_dma.c
+16
-1
arch/ppc64/kernel/prom.c
arch/ppc64/kernel/prom.c
+12
-272
arch/ppc64/kernel/rtc.c
arch/ppc64/kernel/rtc.c
+57
-54
arch/ppc64/kernel/setup.c
arch/ppc64/kernel/setup.c
+6
-0
arch/ppc64/kernel/smp.c
arch/ppc64/kernel/smp.c
+26
-26
arch/ppc64/kernel/sys_ppc32.c
arch/ppc64/kernel/sys_ppc32.c
+32
-95
arch/ppc64/kernel/time.c
arch/ppc64/kernel/time.c
+6
-2
arch/ppc64/kernel/xics.c
arch/ppc64/kernel/xics.c
+4
-13
arch/ppc64/lib/Makefile
arch/ppc64/lib/Makefile
+5
-3
arch/ppc64/lib/memcpy.S
arch/ppc64/lib/memcpy.S
+1
-1
arch/ppc64/mm/Makefile
arch/ppc64/mm/Makefile
+2
-2
arch/ppc64/oprofile/Makefile
arch/ppc64/oprofile/Makefile
+2
-2
arch/ppc64/xmon/Makefile
arch/ppc64/xmon/Makefile
+2
-2
arch/ppc64/xmon/start.c
arch/ppc64/xmon/start.c
+3
-116
include/asm-ppc64/compat.h
include/asm-ppc64/compat.h
+31
-0
include/asm-ppc64/page.h
include/asm-ppc64/page.h
+1
-1
include/asm-ppc64/pgtable.h
include/asm-ppc64/pgtable.h
+2
-2
include/asm-ppc64/ppc32.h
include/asm-ppc64/ppc32.h
+11
-41
include/asm-ppc64/prom.h
include/asm-ppc64/prom.h
+1
-10
include/asm-ppc64/smp.h
include/asm-ppc64/smp.h
+1
-1
include/asm-ppc64/tlb.h
include/asm-ppc64/tlb.h
+2
-2
include/asm-ppc64/topology.h
include/asm-ppc64/topology.h
+1
-1
include/asm-ppc64/xics.h
include/asm-ppc64/xics.h
+4
-8
No files found.
arch/ppc64/Makefile
View file @
c8ec0450
...
@@ -13,61 +13,47 @@
...
@@ -13,61 +13,47 @@
# Adjusted for PPC64 by Tom Gall
# Adjusted for PPC64 by Tom Gall
#
#
KERNELLOAD
=
0xc000000000000000
KERNELLOAD
=
0xc000000000000000
LDFLAGS
:=
-m
elf64ppc
LDFLAGS
:=
-m
elf64ppc
LDFLAGS_vmlinux
=
-Bstatic
\
LDFLAGS_vmlinux
=
-Bstatic
-e
$(KERNELLOAD)
-Ttext
$(KERNELLOAD)
-e
$(KERNELLOAD)
-Ttext
$(KERNELLOAD)
LDFLAGS_BLOB
:=
--format
binary
--oformat
elf64-powerpc
LDFLAGS_BLOB
:=
--format
binary
--oformat
elf64-powerpc
CFLAGS
:=
$(CFLAGS)
-msoft-float
-pipe
\
CFLAGS
+=
-msoft-float
-pipe
\
-Wno-uninitialized
-mminimal-toc
-mtraceback
=
full
\
-Wno-uninitialized
-mminimal-toc
-mtraceback
=
full
\
-finline-limit-2000
-mcpu
=
power4
-finline-limit-2000
-mcpu
=
power4
CPP
=
$(CC)
-E
$(CFLAGS)
HEAD
:=
arch
/ppc64/kernel/head.o
HEAD
:=
arch
/ppc64/kernel/head.o
core-y
+=
arch
/ppc64/kernel/
arch
/ppc64/mm/
arch
/ppc64/lib/
libs-y
+=
arch
/ppc64/lib/
core-$(CONFIG_XMON)
+=
arch
/ppc64/xmon/
core-y
+=
arch
/ppc64/kernel/
core-y
+=
arch
/ppc64/mm/
# FIXME: is drivers- right ?
core-$(CONFIG_XMON)
+=
arch
/ppc64/xmon/
drivers-$(CONFIG_OPROFILE)
+=
arch
/ppc64/oprofile/
drivers-$(CONFIG_OPROFILE)
+=
arch
/ppc64/oprofile/
makeboot
=
$(
call
descend,arch/ppc64/boot,
$(1)
)
ifdef
CONFIG_PPC_PSERIES
BOOT_TARGETS
=
zImage zImage.initrd
endif
ifdef
CONFIG_PPC_ISERIES
makeboot
=
$(Q)$(MAKE)
-f
scripts/Makefile.build
obj
=
arch
/ppc64/boot
$(1)
BOOT_TARGETS
=
vmlinux.sminitrd vmlinux.initrd vmlinux.sm
endif
$(BOOT_TARGETS)
:
vmlinux
boottarget-$(CONFIG_PPC_PSERIES)
:=
zImage zImage.initrd
@
$(
call
makeboot,arch/ppc64/boot/
$@
)
boottarget-$(CONFIG_PPC_ISERIES)
:=
vmlinux.sminitrd vmlinux.initrd vmlinux.sm
$(boottarget-y)
:
vmlinux
$(
call
makeboot,arch/ppc64/boot/
$@
)
%_config
:
arch/ppc64/configs/%_defconfig
%_config
:
arch/ppc64/configs/%_defconfig
rm
-f
.config
arch
/ppc64/defconfig
rm
-f
.config
arch
/ppc64/defconfig
cp
-f
arch
/ppc64/configs/
$
(
@:config
=
defconfig
)
arch
/ppc64/defconfig
cp
-f
arch
/ppc64/configs/
$
(
@:config
=
defconfig
)
arch
/ppc64/defconfig
archclean
:
archclean
:
@
$(
call
makeboot,clean
)
$(Q)$(MAKE)
-f
scripts/Makefile.clean
obj
=
arch
/ppc64/boot
archmrproper
:
prepare
:
include/asm-ppc64/offsets.h
arch/ppc64/kernel/asm-offsets.s
:
include/asm include/linux/version.h
\
prepare
:
include/asm-$(ARCH)/offsets.h
arch/$(ARCH)/kernel/asm-offsets.s
:
include/asm include/linux/version.h
\
include/config/MARKER
include/config/MARKER
include/asm-$(ARCH)/offsets.h.tmp
:
arch/$(ARCH)/kernel/asm-offsets.s
include/asm-ppc64/offsets.h
:
arch/ppc64/kernel/asm-offsets.s
@
$
(
generate-asm-offsets.h
)
<
$<
>
$@
include/asm-$(ARCH)/offsets.h
:
include/asm-$(ARCH)/offsets.h.tmp
@
echo
-n
' Generating $@'
@
echo
-n
' Generating $@'
@
$
(
generate-asm-offsets.h
)
<
$<
>
$@
.tmp
@
$
(
update-if-changed
)
@
$
(
update-if-changed
)
CLEAN_FILES
+=
include/asm-
$(ARCH)
/offsets.h.tmp
\
CLEAN_FILES
+=
include/asm-
ppc64
/offsets.h.tmp
\
include/asm-
$(ARCH)
/offsets.h
include/asm-
ppc64
/offsets.h
arch/ppc64/boot/Makefile
View file @
c8ec0450
...
@@ -23,92 +23,88 @@
...
@@ -23,92 +23,88 @@
CROSS32_COMPILE
=
CROSS32_COMPILE
=
#CROSS32_COMPILE = /usr/local/ppc/bin/powerpc-linux-
#CROSS32_COMPILE = /usr/local/ppc/bin/powerpc-linux-
BOOTCC
=
$(CROSS32_COMPILE)
gcc
BOOTCC
:=
$(CROSS32_COMPILE)
gcc
BOOTCFLAGS
=
$(HOSTCFLAGS)
-I
$(objtree)
/include
BOOTCFLAGS
:=
$(HOSTCFLAGS)
-Iinclude
BOOTLD
=
$(CROSS32_COMPILE)
ld
BOOTLD
:=
$(CROSS32_COMPILE)
ld
BOOTAS
=
$(CROSS32_COMPILE)
as
BOOTAS
:=
$(CROSS32_COMPILE)
as
BOOTAFLAGS
=
-D__ASSEMBLY__
$(HOSTCFLAGS)
BOOTAFLAGS
:=
-D__ASSEMBLY__
$(HOSTCFLAGS)
$(obj)/start.o
:
$(obj)/start.c
CFLAGS
:=
$(CPPFLAGS)
-O
-fno-builtin
-DSTDC_HEADERS
$(BOOTCC)
$(BOOTCFLAGS)
-c
-o
$*
.o
$<
LD_ARGS
:=
-Ttext
0x00400000
-e
_start
OBJCOPYFLAGS
:=
-S
-O
binary
$(obj)/main.o
:
$(obj)/main.c
$(BOOTCC)
$(BOOTCFLAGS)
-c
-o
$*
.o
$<
obj-boot
:=
start.o main.o zlib.o imagesize.o no_initrd.o
OBJS
:=
crt0.o start.o main.o zlib.o imagesize.o image.o
$(obj)/zlib.o
:
$(obj)/zlib.c
obj-boot
:=
$(
addprefix
$(obj)
/,
$
(
obj-boot
))
$(BOOTCC)
$(BOOTCFLAGS)
-c
-o
$*
.o
$<
OBJS
:=
$(
addprefix
$(obj)
/,
$(OBJS)
)
targets
+=
$
(
obj-boot
)
$(
addprefix
$(obj)
/,image.c image.o
)
$(obj)/imagesize.o
:
$(obj)/imagesize.c
$(BOOTCC)
$(BOOTCFLAGS)
-c
-o
$*
.o
$<
quiet_cmd_bootcc
=
BOOTCC
$@
cmd_bootcc
=
$(BOOTCC)
-Wp
,-MD,
$(depfile)
$(BOOTCFLAGS)
-c
-o
$@
$<
$(obj)/no_initrd.o
:
$(obj)/no_initrd.c
$(obj-boot)
:
%.o: %.c FORCE
$(BOOTCC)
$(BOOTCFLAGS)
-c
-o
$*
.o
$<
$(
call
if_changed_dep,bootcc
)
$(obj)/crt0.o
:
$(obj)/crt0.S
quiet_cmd_bootas
=
BOOTAS
$@
$(BOOTCC)
$(BOOTAFLAGS)
-traditional
-c
-o
$*
.o
$<
cmd_bootas
=
$(BOOTCC)
-Wp
,-MD,
$(depfile)
$(BOOTAFLAGS)
-traditional
\
-c
-o
$@
$<
CFLAGS
=
$(CPPFLAGS)
-O
-fno-builtin
-DSTDC_HEADERS
$(obj)/crt0.o
:
%.o: %.S FORCE
LD_ARGS
=
-Ttext
0x00400000
-e
_start
$(
call
if_changed_dep,bootas
)
OBJCOPYFLAGS
:=
-S
-O
binary
host-progs
:=
piggyback addnote addSystemMap addRamDisk
OBJS
=
$(
addprefix
$(obj)
/,crt0.o start.o main.o zlib.o image.o imagesize.o
)
HOSTCFLAGS_piggyback.o
:=
-DKERNELBASE
=
$(KERNELBASE)
EXTRA_TARGETS
+=
zImage zImage.initrd vmlinux.bin vmlinux.gz
\
ifeq
($(CONFIG_PPC_ISERIES),y)
vmlinux.sm vmlinux.initrd vmlinux.sminitrd
\
sysmap.o initrd.o
boot
:
vmlinux.sm
quiet_cmd_sysmap
=
SYSMAP
$@
$(obj)/addSystemMap
:
$(obj)/addSystemMap.c
cmd_sysmap
=
$(obj)
/addSystemMap System.map
$<
$@
$(HOSTCC)
$(HOSTCFLAGS)
-o
$@
$<
$(obj)/vmlinux.sm
:
vmlinux $(obj)/addSystemMap System.map FORCE
$(
call
if_changed,sysmap
)
$(obj)/vmlinux.sm
:
vmlinux $(obj)/addSystemMap
$(obj)
/addSystemMap System.map vmlinux
$(obj)
/vmlinux.sm
quiet_cmd_ramdisk
=
RAMDISK
$@
cmd_ramdisk
=
$(obj)
/addRamDisk
$(obj)
/ramdisk.image.gz System.map
$<
$@
$(obj)/addRamDisk
:
$(obj)/addRamDisk.c
$(obj)/vmlinux.initrd
:
vmlinux $(obj)/addRamDisk $(obj)/ramdisk.image.gz System.map FORCE
$(HOSTCC)
$(HOSTCFLAGS)
-o
$@
$<
$(
call
if_changed,ramdisk
)
$(obj)/vmlinux.initrd
:
vmlinux $(obj)/addRamDisk $(obj)/ramdisk.image.gz System.map
$(obj)/vmlinux.sminitrd
:
$(obj)/vmlinux.sm $(obj)/addRamDisk $(obj)/ramdisk.image.gz FORCE
$(obj)
/addRamDisk
$(obj)
/ramdisk.image.gz System.map vmlinux
$(obj)
/vmlinux.initrd
$(
call
if_changed,ramdisk
)
$(obj)/vmlinux.sminitrd
:
$(obj)/vmlinux.sm $(obj)/addRamDisk $(obj)/ramdisk.image.gz System.map
$(obj)
/addRamDisk
$(obj)
/ramdisk.image.gz System.map
$(obj)
/vmlinux.sm
$(obj)
/vmlinux.sminitrd
quiet_cmd_piggy
=
PIGGY
$@
cmd_piggy
=
$(obj)
/piggyback
$
(
@:.o
=)
<
$<
|
$(BOOTAS)
-o
$@
else
boot
:
zImage
$(obj)/image.o
:
$(obj)/vmlinux.gz $(obj)/piggyback FORCE
endif
$(
call
if_changed,piggy
)
$(obj)/piggyback
:
$(obj)/piggyback.c
$(obj)/sysmap.o
:
System.map $(obj)/piggyback FORCE
$(HOSTCC)
$(HOSTCFLAGS)
-DKERNELBASE
=
$(KERNELBASE)
-o
$@
$<
$(
call
if_changed,piggy
)
$(obj)/addnote
:
$(obj)/addnote.c
$(obj)/initrd.o
:
$(obj)/ramdisk.image.gz $(obj)/piggyback FORCE
$(HOSTCC)
$(HOSTCFLAGS)
-o
$@
$<
$(
call
if_changed,piggy
)
$(obj)/image.o
:
$(obj)/piggyback $(obj)/vmlinux.gz
quiet_cmd_addnote
=
ADDNOTE
$@
$(obj)
/piggyback
$(obj)
/image <
$(obj)
/vmlinux.gz |
$(BOOTAS)
-o
$@
cmd_addnote
=
$(BOOTLD)
$(LD_ARGS)
-T
$(obj)
/zImage.lds
-o
$@
$(OBJS)
$<
\
&&
$(obj)
/addnote
$@
$(obj)/sysmap.o
:
$(obj)/piggyback System.map
$(obj)
/piggyback
$(obj)
/sysmap < System.map |
$(BOOTAS)
-o
$(obj)
/sysmap.o
$(obj)/zImage
:
$(obj)/no_initrd.o $(OBJS) $(obj)/addnote FORCE
$(
call
if_changed,addnote
)
$(obj)/initrd.o
:
$(obj)/ramdisk.image.gz $(obj)/piggyback
$(obj)
/piggyback
$(obj)
/initrd <
$(obj)
/ramdisk.image.gz |
$(BOOTAS)
-o
$(obj)
/initrd.o
$(obj)/zImage.initrd
:
$(obj)/initrd.o $(OBJS) $(obj)/addnote FORCE
$(
call
if_changed,addnote
)
$(obj)/zImage
:
$(OBJS) $(obj)/no_initrd.o $(obj)/addnote
$(BOOTLD)
$(LD_ARGS)
-T
$(obj)
/zImage.lds
-o
$@
$(OBJS)
$(obj)
/no_initrd.o
$(obj)/vmlinux.bin
:
vmlinux FORCE
$(obj)
/addnote
$@
$(
call
if_changed,objcopy
)
$(obj)/zImage.initrd
:
$(OBJS) $(obj)/initrd.o $(obj)/addnote
$(obj)/vmlinux.gz
:
$(obj)/vmlinux.bin FORCE
$(BOOTLD)
$(LD_ARGS)
-T
$(obj)
/zImage.lds
-o
$@
$(OBJS)
$(obj)
/initrd.o
$(
call
if_changed,gzip
)
./addnote
$@
$(obj)/imagesize.c
:
vmlinux
$(obj)/vmlinux.gz
:
vmlinux
@
echo
Generating
$@
$(OBJCOPY)
$(OBJCOPYFLAGS)
vmlinux
$(obj)
/vmlinux
ls
-l
vmlinux |
\
ls
-l
$(obj)
/vmlinux |
awk
'{printf "/* generated -- do not edit! */\nint uncompressed_size = %d;\n", $$5}'
>
$(obj)
/imagesize.c
awk
'{printf "/* generated -- do not edit! */\n" \
$(CROSS_COMPILE)
nm
-n
vmlinux |
tail
-1
|
awk
'{printf "long vmlinux_end = 0x%s;\n", substr($$1,8)}'
>>
$(obj)
/imagesize.c
"int uncompressed_size = %d;\n", $$5}'
>
$(obj)
/imagesize.c
gzip
-vf9
$(obj)
/vmlinux
$(CROSS_COMPILE)
nm
-n
vmlinux |
tail
-1
|
\
awk
'{printf "long vmlinux_end = 0x%s;\n", substr($$1,8)}'
\
$(obj)/imagesize.c
:
$(obj)/vmlinux.gz
>>
$(obj)
/imagesize.c
clean
:
clean-files
:=
$(targets)
@
rm
-f
$(OBJS)
@
rm
-f
$(
addprefix
$(obj)
/,piggyback note addnote zImage
\
zImage.initrd vmlinux.gz no_initrd.o imagesize.c addSystemMap
\
vmlinux.sm addRamDisk vmlinux.initrd vmlinux.sminitrd
)
arch/ppc64/boot/main.c
View file @
c8ec0450
...
@@ -14,6 +14,8 @@
...
@@ -14,6 +14,8 @@
#include <asm/page.h>
#include <asm/page.h>
#include <asm/bootinfo.h>
#include <asm/bootinfo.h>
#undef DEBUG
void
memmove
(
void
*
dst
,
void
*
im
,
int
len
);
void
memmove
(
void
*
dst
,
void
*
im
,
int
len
);
extern
void
*
finddevice
(
const
char
*
);
extern
void
*
finddevice
(
const
char
*
);
...
@@ -90,7 +92,9 @@ chrpboot(unsigned long a1, unsigned long a2, void *prom)
...
@@ -90,7 +92,9 @@ chrpboot(unsigned long a1, unsigned long a2, void *prom)
for
(
claim_addr
=
PROG_START
;
for
(
claim_addr
=
PROG_START
;
claim_addr
<=
PROG_START
*
8
;
claim_addr
<=
PROG_START
*
8
;
claim_addr
+=
0x100000
)
{
claim_addr
+=
0x100000
)
{
#ifdef DEBUG
printf
(
" trying: 0x%08lx
\n\r
"
,
claim_addr
);
printf
(
" trying: 0x%08lx
\n\r
"
,
claim_addr
);
#endif
dst
=
claim
(
claim_addr
,
uncompressed_size
,
0
);
dst
=
claim
(
claim_addr
,
uncompressed_size
,
0
);
if
(
dst
!=
(
void
*
)
-
1
)
break
;
if
(
dst
!=
(
void
*
)
-
1
)
break
;
}
}
...
@@ -118,6 +122,7 @@ chrpboot(unsigned long a1, unsigned long a2, void *prom)
...
@@ -118,6 +122,7 @@ chrpboot(unsigned long a1, unsigned long a2, void *prom)
bi_recs
=
make_bi_recs
((
unsigned
long
)
dst
+
vmlinux_end
);
bi_recs
=
make_bi_recs
((
unsigned
long
)
dst
+
vmlinux_end
);
kernel_entry
=
(
kernel_entry_t
)
dst
;
kernel_entry
=
(
kernel_entry_t
)
dst
;
#ifdef DEBUG
printf
(
"kernel:
\n\r
"
printf
(
"kernel:
\n\r
"
" entry addr = 0x%lx
\n\r
"
" entry addr = 0x%lx
\n\r
"
" a1 = 0x%lx,
\n\r
"
" a1 = 0x%lx,
\n\r
"
...
@@ -126,6 +131,7 @@ chrpboot(unsigned long a1, unsigned long a2, void *prom)
...
@@ -126,6 +131,7 @@ chrpboot(unsigned long a1, unsigned long a2, void *prom)
" bi_recs = 0x%lx,
\n\r
"
,
" bi_recs = 0x%lx,
\n\r
"
,
(
unsigned
long
)
kernel_entry
,
a1
,
a2
,
(
unsigned
long
)
kernel_entry
,
a1
,
a2
,
(
unsigned
long
)
prom
,
(
unsigned
long
)
bi_recs
);
(
unsigned
long
)
prom
,
(
unsigned
long
)
bi_recs
);
#endif
kernel_entry
(
a1
,
a2
,
prom
,
bi_recs
);
kernel_entry
(
a1
,
a2
,
prom
,
bi_recs
);
...
...
arch/ppc64/kernel/Makefile
View file @
c8ec0450
#
#
# Makefile for the linux kernel.
# Makefile for the linux
ppc64
kernel.
#
#
EXTRA_CFLAGS
=
-mno-minimal-toc
EXTRA_CFLAGS
+=
-mno-minimal-toc
EXTRA_TARGETS
:=
head.o
KHEAD
:=
head.o
export-objs
:=
ppc_ksyms.o
EXTRA_TARGETS
:=
$(KHEAD)
export-objs
:=
ppc_ksyms.o
obj-y
:=
ppc_ksyms.o setup.o entry.o traps.o irq.o idle.o
\
obj-y
:=
ppc_ksyms.o setup.o entry.o traps.o irq.o idle.o
\
time.o process.o signal.o syscalls.o misc.o ptrace.o
\
time.o process.o signal.o syscalls.o misc.o ptrace.o
\
align.o semaphore.o bitops.o stab.o htab.o pacaData.o
\
align.o semaphore.o bitops.o stab.o htab.o pacaData.o
\
LparData.o udbg.o binfmt_elf32.o sys_ppc32.o sys32.o
\
udbg.o binfmt_elf32.o sys_ppc32.o sys32.o ioctl32.o
\
ioctl32.o ptrace32.o signal32.o open_pic.o xics.o
\
ptrace32.o signal32.o pmc.o rtc.o init_task.o
\
pmc.o mf_proc.o proc_pmc.o iSeries_setup.o
\
lmb.o pci.o pci_dn.o pci_dma.o
ItLpQueue.o hvCall.o mf.o HvLpEvent.o ras.o
\
iSeries_proc.o HvCall.o HvLpConfig.o
\
obj-$(CONFIG_PPC_ISERIES)
+=
iSeries_pci.o iSeries_pci_reset.o
\
rtc.o init_task.o pSeries_htab.o
iSeries_IoMmTable.o iSeries_irq.o
\
iSeries_VpdInfo.o XmPciLpEvent.o
\
obj-$(CONFIG_PCI)
+=
pci.o pci_dn.o pci_dma.o
HvCall.o HvLpConfig.o LparData.o mf_proc.o
\
proc_pmc.o iSeries_setup.o ItLpQueue.o hvCall.o
\
ifeq
($(CONFIG_PPC_ISERIES),y)
mf.o HvLpEvent.o iSeries_proc.o
obj-$(CONFIG_PCI)
+=
iSeries_pci.o iSeries_pci_reset.o iSeries_IoMmTable.o iSeries_irq.o iSeries_VpdInfo.o XmPciLpEvent.o
endif
obj-$(CONFIG_PPC_PSERIES)
+=
pSeries_pci.o pSeries_lpar.o pSeries_hvCall.o
\
ifeq
($(CONFIG_PPC_PSERIES),y)
eeh.o rtasd.o nvram.o
obj-$(CONFIG_PCI)
+=
pSeries_pci.o pSeries_lpar.o pSeries_hvCall.o eeh.o
# Change this to pSeries only once we've got iSeries up to date
obj-y
+=
rtasd.o nvram.o
obj-y
+=
open_pic.o xics.o pSeries_htab.o rtas.o
\
endif
rtas-proc.o chrp_setup.o i8259.o ras.o prom.o
obj-$(CONFIG_RTAS_FLASH)
+=
rtas_flash.o
obj-$(CONFIG_RTAS_FLASH)
+=
rtas_flash.o
obj-$(CONFIG_SMP)
+=
smp.o
obj-$(CONFIG_SMP)
+=
smp.o
obj-$(CONFIG_PROFILING)
+=
profile.o
obj-$(CONFIG_PROFILING)
+=
profile.o
obj-y
+=
prom.o lmb.o rtas.o rtas-proc.o chrp_setup.o i8259.o
arch/ppc64/kernel/chrp_setup.c
View file @
c8ec0450
...
@@ -60,7 +60,7 @@
...
@@ -60,7 +60,7 @@
#include "i8259.h"
#include "i8259.h"
#include "open_pic.h"
#include "open_pic.h"
#include
"xics.h"
#include
<asm/xics.h>
#include <asm/ppcdebug.h>
#include <asm/ppcdebug.h>
extern
volatile
unsigned
char
*
chrp_int_ack_special
;
extern
volatile
unsigned
char
*
chrp_int_ack_special
;
...
...
arch/ppc64/kernel/head.S
View file @
c8ec0450
...
@@ -79,7 +79,7 @@
...
@@ -79,7 +79,7 @@
_stext
:
_stext
:
_STATIC
(
__start
)
_STATIC
(
__start
)
b
.
__start_initialization_pSeries
b
.
__start_initialization_pSeries
#ifdef CONFIG_PPC_ISERIES
/
*
At
offset
0x20
,
there
is
a
pointer
to
iSeries
LPAR
data
.
/
*
At
offset
0x20
,
there
is
a
pointer
to
iSeries
LPAR
data
.
*
This
is
required
by
the
hypervisor
*/
*
This
is
required
by
the
hypervisor
*/
.
=
0x20
.
=
0x20
...
@@ -90,9 +90,7 @@ _STATIC(__start)
...
@@ -90,9 +90,7 @@ _STATIC(__start)
*
between
physical
addresses
and
absolute
addresses
)
and
*
between
physical
addresses
and
absolute
addresses
)
and
*
to
the
pidhash
table
(
also
used
by
the
debugger
)
*/
*
to
the
pidhash
table
(
also
used
by
the
debugger
)
*/
.
llong
msChunks
-
KERNELBASE
.
llong
msChunks
-
KERNELBASE
#ifdef CONFIG_PPC_ISERIES
.
llong
pidhash
-
KERNELBASE
.
llong
pidhash
-
KERNELBASE
#endif
/
*
Offset
0x38
-
Pointer
to
start
of
embedded
System
.
map
*/
/
*
Offset
0x38
-
Pointer
to
start
of
embedded
System
.
map
*/
.
globl
embedded_sysmap_start
.
globl
embedded_sysmap_start
...
@@ -102,6 +100,7 @@ embedded_sysmap_start:
...
@@ -102,6 +100,7 @@ embedded_sysmap_start:
.
globl
embedded_sysmap_end
.
globl
embedded_sysmap_end
embedded_sysmap_end
:
embedded_sysmap_end
:
.
llong
0
.
llong
0
#endif
/
*
Secondary
processors
spin
on
this
value
until
it
goes
to
1
.
*/
/
*
Secondary
processors
spin
on
this
value
until
it
goes
to
1
.
*/
.
globl
__secondary_hold_spinloop
.
globl
__secondary_hold_spinloop
...
@@ -365,11 +364,15 @@ __start_interupts:
...
@@ -365,11 +364,15 @@ __start_interupts:
*
point
to
itVpdAreas
.
On
pSeries
native
,
this
value
is
not
used
.
*
point
to
itVpdAreas
.
On
pSeries
native
,
this
value
is
not
used
.
*/
*/
.
=
0x4000
.
=
0x4000
.
globl
__end_interupts
.
globl
__end_inter
r
upts
.
globl
__start_naca
.
globl
__start_naca
__end_interupts
:
__end_interupts
:
__start_naca
:
__start_naca
:
#ifdef CONFIG_PPC_ISERIES
.
llong
itVpdAreas
.
llong
itVpdAreas
#else
.
llong
0x0
#endif
.
llong
0x0
.
llong
0x0
.
llong
0x0
.
llong
0x0
.
llong
paca
.
llong
paca
...
@@ -390,6 +393,7 @@ __start_stab:
...
@@ -390,6 +393,7 @@ __start_stab:
.
globl
__end_stab
.
globl
__end_stab
__end_stab
:
__end_stab
:
#ifdef CONFIG_PPC_ISERIES
/
*
/
*
*
The
iSeries
LPAR
map
is
at
this
fixed
address
*
The
iSeries
LPAR
map
is
at
this
fixed
address
*
so
that
the
HvReleaseData
structure
can
address
*
so
that
the
HvReleaseData
structure
can
address
...
@@ -503,7 +507,7 @@ maskable_exception_exit:
...
@@ -503,7 +507,7 @@ maskable_exception_exit:
mfspr
r21
,
SPRG1
mfspr
r21
,
SPRG1
mfspr
r20
,
SPRG2
mfspr
r20
,
SPRG2
rfid
rfid
#endif
/*
/*
*
Data
area
reserved
for
FWNMI
option
.
*
Data
area
reserved
for
FWNMI
option
.
*/
*/
...
@@ -1217,7 +1221,7 @@ _GLOBAL(pseries_secondary_smp_init)
...
@@ -1217,7 +1221,7 @@ _GLOBAL(pseries_secondary_smp_init)
#endif
#endif
#endif
#endif
b
1
b
/*
Loop
until
told
to
go
*/
b
1
b
/*
Loop
until
told
to
go
*/
#ifdef CONFIG_PPC_ISERIES
_GLOBAL
(
__start_initialization_iSeries
)
_GLOBAL
(
__start_initialization_iSeries
)
LOADADDR
(
r1
,
init_thread_union
)
LOADADDR
(
r1
,
init_thread_union
)
...
@@ -1241,6 +1245,7 @@ _GLOBAL(__start_initialization_iSeries)
...
@@ -1241,6 +1245,7 @@ _GLOBAL(__start_initialization_iSeries)
bl
.
iSeries_fixup_klimit
bl
.
iSeries_fixup_klimit
b
.
start_here_common
b
.
start_here_common
#endif
_GLOBAL
(
__start_initialization_pSeries
)
_GLOBAL
(
__start_initialization_pSeries
)
mr
r31
,
r3
/*
save
parameters
*/
mr
r31
,
r3
/*
save
parameters
*/
...
@@ -1248,9 +1253,6 @@ _GLOBAL(__start_initialization_pSeries)
...
@@ -1248,9 +1253,6 @@ _GLOBAL(__start_initialization_pSeries)
mr
r29
,
r5
mr
r29
,
r5
mr
r28
,
r6
mr
r28
,
r6
mr
r27
,
r7
mr
r27
,
r7
mr
r26
,
r8
/*
YABOOT
:
debug_print
()
routine
*/
mr
r25
,
r9
/*
YABOOT
:
debug_delay
()
routine
*/
mr
r24
,
r10
/*
YABOOT
:
debug_prom
()
routine
*/
bl
.
enable_64b_mode
bl
.
enable_64b_mode
...
@@ -1295,9 +1297,6 @@ _GLOBAL(__start_initialization_pSeries)
...
@@ -1295,9 +1297,6 @@ _GLOBAL(__start_initialization_pSeries)
mr
r5
,
r29
mr
r5
,
r29
mr
r6
,
r28
mr
r6
,
r28
mr
r7
,
r27
mr
r7
,
r27
mr
r8
,
r26
mr
r9
,
r25
mr
r10
,
r24
bl
.
prom_init
bl
.
prom_init
...
...
arch/ppc64/kernel/init_task.c
View file @
c8ec0450
...
@@ -13,7 +13,7 @@ struct mm_struct init_mm = INIT_MM(init_mm);
...
@@ -13,7 +13,7 @@ struct mm_struct init_mm = INIT_MM(init_mm);
/*
/*
* Initial thread structure.
* Initial thread structure.
*
*
* We need to make sure that this is
8192
-byte aligned due to the
* We need to make sure that this is
16384
-byte aligned due to the
* way process stacks are handled. This is done by having a special
* way process stacks are handled. This is done by having a special
* "init_task" linker map entry..
* "init_task" linker map entry..
*/
*/
...
...
arch/ppc64/kernel/ioctl32.c
View file @
c8ec0450
...
@@ -1722,9 +1722,9 @@ out: if (data)
...
@@ -1722,9 +1722,9 @@ out: if (data)
struct
loop_info32
{
struct
loop_info32
{
int
lo_number
;
/* ioctl r/o */
int
lo_number
;
/* ioctl r/o */
__kernel_dev_t32
lo_device
;
/* ioctl r/o */
compat_dev_t
lo_device
;
/* ioctl r/o */
unsigned
int
lo_inode
;
/* ioctl r/o */
unsigned
int
lo_inode
;
/* ioctl r/o */
__kernel_dev_t32
lo_rdevice
;
/* ioctl r/o */
compat_dev_t
lo_rdevice
;
/* ioctl r/o */
int
lo_offset
;
int
lo_offset
;
int
lo_encrypt_type
;
int
lo_encrypt_type
;
int
lo_encrypt_key_size
;
/* ioctl w/o */
int
lo_encrypt_key_size
;
/* ioctl w/o */
...
@@ -2054,7 +2054,7 @@ static int do_smb_getmountuid(unsigned int fd, unsigned int cmd, unsigned long a
...
@@ -2054,7 +2054,7 @@ static int do_smb_getmountuid(unsigned int fd, unsigned int cmd, unsigned long a
set_fs
(
old_fs
);
set_fs
(
old_fs
);
if
(
err
>=
0
)
if
(
err
>=
0
)
err
=
put_user
(
kuid
,
(
__kernel_uid_t32
*
)
arg
);
err
=
put_user
(
kuid
,
(
compat_uid_t
*
)
arg
);
return
err
;
return
err
;
}
}
...
@@ -3656,7 +3656,7 @@ struct ioctl_trans {
...
@@ -3656,7 +3656,7 @@ struct ioctl_trans {
#define HANDLE_IOCTL(cmd,handler) { cmd, (unsigned long)handler, 0 }
#define HANDLE_IOCTL(cmd,handler) { cmd, (unsigned long)handler, 0 }
#define AUTOFS_IOC_SETTIMEOUT32 _IOWR(0x93,0x64,unsigned int)
#define AUTOFS_IOC_SETTIMEOUT32 _IOWR(0x93,0x64,unsigned int)
#define SMB_IOC_GETMOUNTUID_32 _IOR('u', 1,
__kernel_uid_t32
)
#define SMB_IOC_GETMOUNTUID_32 _IOR('u', 1,
compat_uid_t
)
static
struct
ioctl_trans
ioctl_translations
[]
=
{
static
struct
ioctl_trans
ioctl_translations
[]
=
{
/* List here explicitly which ioctl's need translation,
/* List here explicitly which ioctl's need translation,
...
@@ -3708,11 +3708,6 @@ COMPATIBLE_IOCTL(TIOCSLTC),
...
@@ -3708,11 +3708,6 @@ COMPATIBLE_IOCTL(TIOCSLTC),
COMPATIBLE_IOCTL
(
FBIOGET_VSCREENINFO
),
COMPATIBLE_IOCTL
(
FBIOGET_VSCREENINFO
),
COMPATIBLE_IOCTL
(
FBIOPUT_VSCREENINFO
),
COMPATIBLE_IOCTL
(
FBIOPUT_VSCREENINFO
),
COMPATIBLE_IOCTL
(
FBIOPAN_DISPLAY
),
COMPATIBLE_IOCTL
(
FBIOPAN_DISPLAY
),
COMPATIBLE_IOCTL
(
FBIOGET_FCURSORINFO
),
COMPATIBLE_IOCTL
(
FBIOGET_VCURSORINFO
),
COMPATIBLE_IOCTL
(
FBIOPUT_VCURSORINFO
),
COMPATIBLE_IOCTL
(
FBIOGET_CURSORSTATE
),
COMPATIBLE_IOCTL
(
FBIOPUT_CURSORSTATE
),
COMPATIBLE_IOCTL
(
FBIOGET_CON2FBMAP
),
COMPATIBLE_IOCTL
(
FBIOGET_CON2FBMAP
),
COMPATIBLE_IOCTL
(
FBIOPUT_CON2FBMAP
),
COMPATIBLE_IOCTL
(
FBIOPUT_CON2FBMAP
),
#if 0
#if 0
...
@@ -3763,6 +3758,8 @@ COMPATIBLE_IOCTL(BLKRRPART),
...
@@ -3763,6 +3758,8 @@ COMPATIBLE_IOCTL(BLKRRPART),
COMPATIBLE_IOCTL
(
BLKFLSBUF
),
COMPATIBLE_IOCTL
(
BLKFLSBUF
),
COMPATIBLE_IOCTL
(
BLKSECTSET
),
COMPATIBLE_IOCTL
(
BLKSECTSET
),
COMPATIBLE_IOCTL
(
BLKSSZGET
),
COMPATIBLE_IOCTL
(
BLKSSZGET
),
COMPATIBLE_IOCTL
(
BLKRASET
),
COMPATIBLE_IOCTL
(
BLKFRASET
),
/* RAID */
/* RAID */
COMPATIBLE_IOCTL
(
RAID_VERSION
),
COMPATIBLE_IOCTL
(
RAID_VERSION
),
COMPATIBLE_IOCTL
(
GET_ARRAY_INFO
),
COMPATIBLE_IOCTL
(
GET_ARRAY_INFO
),
...
@@ -4350,6 +4347,8 @@ HANDLE_IOCTL(SIOCGSTAMP, do_siocgstamp),
...
@@ -4350,6 +4347,8 @@ HANDLE_IOCTL(SIOCGSTAMP, do_siocgstamp),
HANDLE_IOCTL
(
HDIO_GETGEO
,
hdio_getgeo
),
HANDLE_IOCTL
(
HDIO_GETGEO
,
hdio_getgeo
),
HANDLE_IOCTL
(
HDIO_GETGEO_BIG_RAW
,
hdio_getgeo_big
),
HANDLE_IOCTL
(
HDIO_GETGEO_BIG_RAW
,
hdio_getgeo_big
),
HANDLE_IOCTL
(
BLKGETSIZE
,
w_long
),
HANDLE_IOCTL
(
BLKGETSIZE
,
w_long
),
HANDLE_IOCTL
(
BLKRAGET
,
w_long
),
HANDLE_IOCTL
(
BLKFRAGET
,
w_long
),
HANDLE_IOCTL
(
0x1260
,
broken_blkgetsize
),
HANDLE_IOCTL
(
0x1260
,
broken_blkgetsize
),
HANDLE_IOCTL
(
BLKSECTGET
,
w_long
),
HANDLE_IOCTL
(
BLKSECTGET
,
w_long
),
HANDLE_IOCTL
(
BLKPG
,
blkpg_ioctl_trans
),
HANDLE_IOCTL
(
BLKPG
,
blkpg_ioctl_trans
),
...
...
arch/ppc64/kernel/irq.c
View file @
c8ec0450
...
@@ -395,7 +395,7 @@ handle_irq_event(int irq, struct pt_regs *regs, struct irqaction *action)
...
@@ -395,7 +395,7 @@ handle_irq_event(int irq, struct pt_regs *regs, struct irqaction *action)
}
}
#ifdef CONFIG_SMP
#ifdef CONFIG_SMP
extern
unsigned
int
irq_affinity
[
NR_IRQS
];
extern
unsigned
long
irq_affinity
[
NR_IRQS
];
typedef
struct
{
typedef
struct
{
unsigned
long
cpu
;
unsigned
long
cpu
;
...
@@ -409,7 +409,7 @@ static irq_balance_t irq_balance[NR_IRQS] __cacheline_aligned
...
@@ -409,7 +409,7 @@ static irq_balance_t irq_balance[NR_IRQS] __cacheline_aligned
(idle_cpu(cpu) && ((now) - irq_stat[(cpu)].idle_timestamp > 1))
(idle_cpu(cpu) && ((now) - irq_stat[(cpu)].idle_timestamp > 1))
#define IRQ_ALLOWED(cpu,allowed_mask) \
#define IRQ_ALLOWED(cpu,allowed_mask) \
((1 << cpu) & (allowed_mask))
((1
UL
<< cpu) & (allowed_mask))
#define IRQ_BALANCE_INTERVAL (HZ/50)
#define IRQ_BALANCE_INTERVAL (HZ/50)
...
@@ -461,7 +461,7 @@ static inline void balance_irq(int irq)
...
@@ -461,7 +461,7 @@ static inline void balance_irq(int irq)
new_cpu
=
move
(
entry
->
cpu
,
allowed_mask
,
now
,
random_number
);
new_cpu
=
move
(
entry
->
cpu
,
allowed_mask
,
now
,
random_number
);
if
(
entry
->
cpu
!=
new_cpu
)
{
if
(
entry
->
cpu
!=
new_cpu
)
{
entry
->
cpu
=
new_cpu
;
entry
->
cpu
=
new_cpu
;
irq_desc
[
irq
].
handler
->
set_affinity
(
irq
,
1
<<
new_cpu
);
irq_desc
[
irq
].
handler
->
set_affinity
(
irq
,
1
UL
<<
new_cpu
);
}
}
}
}
}
}
...
@@ -649,19 +649,19 @@ static struct proc_dir_entry * irq_dir [NR_IRQS];
...
@@ -649,19 +649,19 @@ static struct proc_dir_entry * irq_dir [NR_IRQS];
static
struct
proc_dir_entry
*
smp_affinity_entry
[
NR_IRQS
];
static
struct
proc_dir_entry
*
smp_affinity_entry
[
NR_IRQS
];
#ifdef CONFIG_IRQ_ALL_CPUS
#ifdef CONFIG_IRQ_ALL_CPUS
unsigned
int
irq_affinity
[
NR_IRQS
]
=
{
[
0
...
NR_IRQS
-
1
]
=
0xffffffff
};
unsigned
long
irq_affinity
[
NR_IRQS
]
=
{
[
0
...
NR_IRQS
-
1
]
=
-
1UL
};
#else
/* CONFIG_IRQ_ALL_CPUS */
#else
/* CONFIG_IRQ_ALL_CPUS */
unsigned
int
irq_affinity
[
NR_IRQS
]
=
{
[
0
...
NR_IRQS
-
1
]
=
0x0000000
0
};
unsigned
long
irq_affinity
[
NR_IRQS
]
=
{
[
0
...
NR_IRQS
-
1
]
=
0x
0
};
#endif
/* CONFIG_IRQ_ALL_CPUS */
#endif
/* CONFIG_IRQ_ALL_CPUS */
#define HEX_DIGITS
8
#define HEX_DIGITS
16
static
int
irq_affinity_read_proc
(
char
*
page
,
char
**
start
,
off_t
off
,
static
int
irq_affinity_read_proc
(
char
*
page
,
char
**
start
,
off_t
off
,
int
count
,
int
*
eof
,
void
*
data
)
int
count
,
int
*
eof
,
void
*
data
)
{
{
if
(
count
<
HEX_DIGITS
+
1
)
if
(
count
<
HEX_DIGITS
+
1
)
return
-
EINVAL
;
return
-
EINVAL
;
return
sprintf
(
page
,
"%08x
\n
"
,
irq_affinity
[(
int
)
(
long
)
data
]);
return
sprintf
(
page
,
"%16lx
\n
"
,
irq_affinity
[
(
long
)
data
]);
}
}
static
unsigned
int
parse_hex_value
(
const
char
*
buffer
,
static
unsigned
int
parse_hex_value
(
const
char
*
buffer
,
...
@@ -679,7 +679,7 @@ static unsigned int parse_hex_value (const char *buffer,
...
@@ -679,7 +679,7 @@ static unsigned int parse_hex_value (const char *buffer,
return
-
EFAULT
;
return
-
EFAULT
;
/*
/*
* Parse the first
8
characters as a hex string, any non-hex char
* Parse the first
16
characters as a hex string, any non-hex char
* is end-of-string. '00e1', 'e1', '00E1', 'E1' are all the same.
* is end-of-string. '00e1', 'e1', '00E1', 'E1' are all the same.
*/
*/
value
=
0
;
value
=
0
;
...
@@ -704,7 +704,7 @@ static unsigned int parse_hex_value (const char *buffer,
...
@@ -704,7 +704,7 @@ static unsigned int parse_hex_value (const char *buffer,
static
int
irq_affinity_write_proc
(
struct
file
*
file
,
const
char
*
buffer
,
static
int
irq_affinity_write_proc
(
struct
file
*
file
,
const
char
*
buffer
,
unsigned
long
count
,
void
*
data
)
unsigned
long
count
,
void
*
data
)
{
{
int
irq
=
(
int
)(
long
)
data
,
full_count
=
count
,
err
;
int
irq
=
(
long
)
data
,
full_count
=
count
,
err
;
unsigned
long
new_value
;
unsigned
long
new_value
;
if
(
!
irq_desc
[
irq
].
handler
->
set_affinity
)
if
(
!
irq_desc
[
irq
].
handler
->
set_affinity
)
...
@@ -712,8 +712,6 @@ static int irq_affinity_write_proc (struct file *file, const char *buffer,
...
@@ -712,8 +712,6 @@ static int irq_affinity_write_proc (struct file *file, const char *buffer,
err
=
parse_hex_value
(
buffer
,
count
,
&
new_value
);
err
=
parse_hex_value
(
buffer
,
count
,
&
new_value
);
/* Why is this disabled ? --BenH */
#if 0/*CONFIG_SMP*/
/*
/*
* Do not allow disabling IRQs completely - it's a too easy
* Do not allow disabling IRQs completely - it's a too easy
* way to make the system unusable accidentally :-) At least
* way to make the system unusable accidentally :-) At least
...
@@ -721,7 +719,6 @@ static int irq_affinity_write_proc (struct file *file, const char *buffer,
...
@@ -721,7 +719,6 @@ static int irq_affinity_write_proc (struct file *file, const char *buffer,
*/
*/
if
(
!
(
new_value
&
cpu_online_map
))
if
(
!
(
new_value
&
cpu_online_map
))
return
-
EINVAL
;
return
-
EINVAL
;
#endif
irq_affinity
[
irq
]
=
new_value
;
irq_affinity
[
irq
]
=
new_value
;
irq_desc
[
irq
].
handler
->
set_affinity
(
irq
,
new_value
);
irq_desc
[
irq
].
handler
->
set_affinity
(
irq
,
new_value
);
...
...
arch/ppc64/kernel/misc.S
View file @
c8ec0450
...
@@ -398,46 +398,6 @@ _GLOBAL(_outsl_ns)
...
@@ -398,46 +398,6 @@ _GLOBAL(_outsl_ns)
bdnz
00
b
bdnz
00
b
blr
blr
/*
*
Extended
precision
shifts
*
*
R3
/
R4
has
64
bit
value
*
R5
has
shift
count
*
result
in
R3
/
R4
*
*
ashrdi3
:
XXXYYY
/
ZZZAAA
->
SSSXXX
/
YYYZZZ
*
ashldi3
:
XXXYYY
/
ZZZAAA
->
YYYZZZ
/
AAA000
*
lshrdi3
:
XXXYYY
/
ZZZAAA
->
000
XXX
/
YYYZZZ
*/
/*
MIKEC
:
These
may
no
longer
be
needed
...
what
does
gcc
expect
?
*/
_GLOBAL
(
__ashrdi3
)
li
r6
,
32
sub
r6
,
r6
,
r5
slw
r7
,
r3
,
r6
/*
isolate
YYY
*/
srw
r4
,
r4
,
r5
/*
isolate
ZZZ
*/
or
r4
,
r4
,
r7
/*
YYYZZZ
*/
sraw
r3
,
r3
,
r5
/*
SSSXXX
*/
blr
_GLOBAL
(
__ashldi3
)
li
r6
,
32
sub
r6
,
r6
,
r5
srw
r7
,
r4
,
r6
/*
isolate
ZZZ
*/
slw
r4
,
r4
,
r5
/*
AAA000
*/
slw
r3
,
r3
,
r5
/*
YYY
---
*/
or
r3
,
r3
,
r7
/*
YYYZZZ
*/
blr
_GLOBAL
(
__lshrdi3
)
li
r6
,
32
sub
r6
,
r6
,
r5
slw
r7
,
r3
,
r6
/*
isolate
YYY
*/
srw
r4
,
r4
,
r5
/*
isolate
ZZZ
*/
or
r4
,
r4
,
r7
/*
YYYZZZ
*/
srw
r3
,
r3
,
r5
/*
000
XXX
*/
blr
_GLOBAL
(
abs
)
_GLOBAL
(
abs
)
cmpi
0
,
r3
,
0
cmpi
0
,
r3
,
0
bge
10
f
bge
10
f
...
@@ -551,7 +511,7 @@ _GLOBAL(sys_call_table32)
...
@@ -551,7 +511,7 @@ _GLOBAL(sys_call_table32)
.
llong
.
sys_rmdir
/*
40
*/
.
llong
.
sys_rmdir
/*
40
*/
.
llong
.
sys_dup
.
llong
.
sys_dup
.
llong
.
sys_pipe
.
llong
.
sys_pipe
.
llong
.
sys32
_times
.
llong
.
compat_sys
_times
.
llong
.
sys_ni_syscall
/*
old
prof
syscall
*/
.
llong
.
sys_ni_syscall
/*
old
prof
syscall
*/
.
llong
.
sys_brk
/*
45
*/
.
llong
.
sys_brk
/*
45
*/
.
llong
.
sys_setgid
.
llong
.
sys_setgid
...
@@ -614,9 +574,9 @@ _GLOBAL(sys_call_table32)
...
@@ -614,9 +574,9 @@ _GLOBAL(sys_call_table32)
.
llong
.
sys32_syslog
.
llong
.
sys32_syslog
.
llong
.
compat_sys_setitimer
.
llong
.
compat_sys_setitimer
.
llong
.
compat_sys_getitimer
/*
105
*/
.
llong
.
compat_sys_getitimer
/*
105
*/
.
llong
.
sys32
_newstat
.
llong
.
compat_sys
_newstat
.
llong
.
sys32
_newlstat
.
llong
.
compat_sys
_newlstat
.
llong
.
sys32
_newfstat
.
llong
.
compat_sys
_newfstat
.
llong
.
sys_uname
.
llong
.
sys_uname
.
llong
.
sys_ni_syscall
/*
110
old
iopl
syscall
*/
.
llong
.
sys_ni_syscall
/*
110
old
iopl
syscall
*/
.
llong
.
sys_vhangup
.
llong
.
sys_vhangup
...
...
arch/ppc64/kernel/pSeries_pci.c
View file @
c8ec0450
...
@@ -40,7 +40,6 @@
...
@@ -40,7 +40,6 @@
#include <asm/naca.h>
#include <asm/naca.h>
#include <asm/pci_dma.h>
#include <asm/pci_dma.h>
#include "xics.h"
#include "open_pic.h"
#include "open_pic.h"
#include "pci.h"
#include "pci.h"
...
@@ -402,7 +401,7 @@ alloc_phb(struct device_node *dev, char *model, unsigned int addr_size_words)
...
@@ -402,7 +401,7 @@ alloc_phb(struct device_node *dev, char *model, unsigned int addr_size_words)
* Python
* Python
***************************************************************/
***************************************************************/
if
(
strstr
(
model
,
"Python"
))
{
if
(
strstr
(
model
,
"Python"
))
{
unsigned
long
chip_regs
;
void
*
chip_regs
;
volatile
u32
*
tmp
,
i
;
volatile
u32
*
tmp
,
i
;
PPCDBG
(
PPCDBG_PHBINIT
,
"
\t
Create python
\n
"
);
PPCDBG
(
PPCDBG_PHBINIT
,
"
\t
Create python
\n
"
);
...
@@ -608,10 +607,6 @@ pSeries_pcibios_fixup(void)
...
@@ -608,10 +607,6 @@ pSeries_pcibios_fixup(void)
pci_read_irq_line
(
dev
);
pci_read_irq_line
(
dev
);
PPCDBGCALL
(
PPCDBG_PHBINIT
,
dumpPci_Dev
(
dev
)
);
PPCDBGCALL
(
PPCDBG_PHBINIT
,
dumpPci_Dev
(
dev
)
);
}
}
if
(
naca
->
interrupt_controller
==
IC_PPC_XIC
)
{
xics_isa_init
();
}
}
}
/***********************************************************************
/***********************************************************************
...
...
arch/ppc64/kernel/pci_dma.c
View file @
c8ec0450
...
@@ -147,6 +147,7 @@ static unsigned long __inline__ count_leading_zeros64( unsigned long x )
...
@@ -147,6 +147,7 @@ static unsigned long __inline__ count_leading_zeros64( unsigned long x )
return
lz
;
return
lz
;
}
}
#ifdef CONFIG_PPC_ISERIES
static
void
tce_build_iSeries
(
struct
TceTable
*
tbl
,
long
tcenum
,
static
void
tce_build_iSeries
(
struct
TceTable
*
tbl
,
long
tcenum
,
unsigned
long
uaddr
,
int
direction
)
unsigned
long
uaddr
,
int
direction
)
{
{
...
@@ -180,7 +181,9 @@ static void tce_build_iSeries(struct TceTable *tbl, long tcenum,
...
@@ -180,7 +181,9 @@ static void tce_build_iSeries(struct TceTable *tbl, long tcenum,
panic
(
"PCI_DMA: HvCallXm_setTce failed, Rc: 0x%lx
\n
"
,
setTceRc
);
panic
(
"PCI_DMA: HvCallXm_setTce failed, Rc: 0x%lx
\n
"
,
setTceRc
);
}
}
}
}
#endif
#ifdef CONFIG_PPC_PSERIES
static
void
tce_build_pSeries
(
struct
TceTable
*
tbl
,
long
tcenum
,
static
void
tce_build_pSeries
(
struct
TceTable
*
tbl
,
long
tcenum
,
unsigned
long
uaddr
,
int
direction
)
unsigned
long
uaddr
,
int
direction
)
{
{
...
@@ -199,8 +202,8 @@ static void tce_build_pSeries(struct TceTable *tbl, long tcenum,
...
@@ -199,8 +202,8 @@ static void tce_build_pSeries(struct TceTable *tbl, long tcenum,
tce_addr
=
((
union
Tce
*
)
tbl
->
base
)
+
tcenum
;
tce_addr
=
((
union
Tce
*
)
tbl
->
base
)
+
tcenum
;
*
tce_addr
=
(
union
Tce
)
tce
.
wholeTce
;
*
tce_addr
=
(
union
Tce
)
tce
.
wholeTce
;
}
}
#endif
/*
/*
* Build a TceTable structure. This contains a multi-level bit map which
* Build a TceTable structure. This contains a multi-level bit map which
...
@@ -548,6 +551,7 @@ static inline dma_addr_t get_tces( struct TceTable *tbl, unsigned order, void *p
...
@@ -548,6 +551,7 @@ static inline dma_addr_t get_tces( struct TceTable *tbl, unsigned order, void *p
return
retTce
;
return
retTce
;
}
}
#ifdef CONFIG_PPC_ISERIES
static
void
tce_free_one_iSeries
(
struct
TceTable
*
tbl
,
long
tcenum
)
static
void
tce_free_one_iSeries
(
struct
TceTable
*
tbl
,
long
tcenum
)
{
{
u64
set_tce_rc
;
u64
set_tce_rc
;
...
@@ -560,7 +564,9 @@ static void tce_free_one_iSeries( struct TceTable *tbl, long tcenum )
...
@@ -560,7 +564,9 @@ static void tce_free_one_iSeries( struct TceTable *tbl, long tcenum )
panic
(
"PCI_DMA: HvCallXm_setTce failed, Rc: 0x%lx
\n
"
,
set_tce_rc
);
panic
(
"PCI_DMA: HvCallXm_setTce failed, Rc: 0x%lx
\n
"
,
set_tce_rc
);
}
}
#endif
#ifdef CONFIG_PPC_PSERIES
static
void
tce_free_one_pSeries
(
struct
TceTable
*
tbl
,
long
tcenum
)
static
void
tce_free_one_pSeries
(
struct
TceTable
*
tbl
,
long
tcenum
)
{
{
union
Tce
tce
;
union
Tce
tce
;
...
@@ -572,6 +578,7 @@ static void tce_free_one_pSeries( struct TceTable *tbl, long tcenum )
...
@@ -572,6 +578,7 @@ static void tce_free_one_pSeries( struct TceTable *tbl, long tcenum )
*
tce_addr
=
(
union
Tce
)
tce
.
wholeTce
;
*
tce_addr
=
(
union
Tce
)
tce
.
wholeTce
;
}
}
#endif
static
void
tce_free
(
struct
TceTable
*
tbl
,
dma_addr_t
dma_addr
,
static
void
tce_free
(
struct
TceTable
*
tbl
,
dma_addr_t
dma_addr
,
unsigned
order
,
unsigned
num_pages
)
unsigned
order
,
unsigned
num_pages
)
...
@@ -609,6 +616,7 @@ static void tce_free(struct TceTable *tbl, dma_addr_t dma_addr,
...
@@ -609,6 +616,7 @@ static void tce_free(struct TceTable *tbl, dma_addr_t dma_addr,
free_tce_range
(
tbl
,
free_tce
,
order
);
free_tce_range
(
tbl
,
free_tce
,
order
);
}
}
#ifdef CONFIG_PPC_ISERIES
void
__init
create_virtual_bus_tce_table
(
void
)
void
__init
create_virtual_bus_tce_table
(
void
)
{
{
struct
TceTable
*
t
;
struct
TceTable
*
t
;
...
@@ -661,6 +669,7 @@ void __init create_virtual_bus_tce_table(void)
...
@@ -661,6 +669,7 @@ void __init create_virtual_bus_tce_table(void)
}
}
else
printk
(
"Virtual Bus VIO TCE table failed.
\n
"
);
else
printk
(
"Virtual Bus VIO TCE table failed.
\n
"
);
}
}
#endif
void
create_tce_tables_for_buses
(
struct
list_head
*
bus_list
)
void
create_tce_tables_for_buses
(
struct
list_head
*
bus_list
)
{
{
...
@@ -842,6 +851,7 @@ static struct TceTable* findHwTceTable(struct TceTable * newTceTable )
...
@@ -842,6 +851,7 @@ static struct TceTable* findHwTceTable(struct TceTable * newTceTable )
static
void
getTceTableParmsiSeries
(
struct
iSeries_Device_Node
*
DevNode
,
static
void
getTceTableParmsiSeries
(
struct
iSeries_Device_Node
*
DevNode
,
struct
TceTable
*
newTceTable
)
struct
TceTable
*
newTceTable
)
{
{
#ifdef CONFIG_PPC_ISERIES
struct
TceTableManagerCB
*
pciBusTceTableParms
=
(
struct
TceTableManagerCB
*
)
kmalloc
(
sizeof
(
struct
TceTableManagerCB
),
GFP_KERNEL
);
struct
TceTableManagerCB
*
pciBusTceTableParms
=
(
struct
TceTableManagerCB
*
)
kmalloc
(
sizeof
(
struct
TceTableManagerCB
),
GFP_KERNEL
);
if
(
pciBusTceTableParms
==
NULL
)
panic
(
"PCI_DMA: TCE Table Allocation failed."
);
if
(
pciBusTceTableParms
==
NULL
)
panic
(
"PCI_DMA: TCE Table Allocation failed."
);
...
@@ -872,6 +882,7 @@ static void getTceTableParmsiSeries(struct iSeries_Device_Node* DevNode,
...
@@ -872,6 +882,7 @@ static void getTceTableParmsiSeries(struct iSeries_Device_Node* DevNode,
newTceTable
->
tceType
=
TCE_PCI
;
newTceTable
->
tceType
=
TCE_PCI
;
kfree
(
pciBusTceTableParms
);
kfree
(
pciBusTceTableParms
);
#endif
}
}
static
void
getTceTableParmsPSeries
(
struct
pci_controller
*
phb
,
static
void
getTceTableParmsPSeries
(
struct
pci_controller
*
phb
,
...
@@ -1440,15 +1451,19 @@ void pci_unmap_sg(struct pci_dev *pdev, struct scatterlist *sglist, int nelems,
...
@@ -1440,15 +1451,19 @@ void pci_unmap_sg(struct pci_dev *pdev, struct scatterlist *sglist, int nelems,
}
}
#endif
#endif
#ifdef CONFIG_PPC_PSERIES
/* These are called very early. */
/* These are called very early. */
void
tce_init_pSeries
(
void
)
void
tce_init_pSeries
(
void
)
{
{
ppc_md
.
tce_build
=
tce_build_pSeries
;
ppc_md
.
tce_build
=
tce_build_pSeries
;
ppc_md
.
tce_free_one
=
tce_free_one_pSeries
;
ppc_md
.
tce_free_one
=
tce_free_one_pSeries
;
}
}
#endif
#ifdef CONFIG_PPC_ISERIES
void
tce_init_iSeries
(
void
)
void
tce_init_iSeries
(
void
)
{
{
ppc_md
.
tce_build
=
tce_build_iSeries
;
ppc_md
.
tce_build
=
tce_build_iSeries
;
ppc_md
.
tce_free_one
=
tce_free_one_iSeries
;
ppc_md
.
tce_free_one
=
tce_free_one_iSeries
;
}
}
#endif
arch/ppc64/kernel/prom.c
View file @
c8ec0450
This diff is collapsed.
Click to expand it.
arch/ppc64/kernel/rtc.c
View file @
c8ec0450
...
@@ -258,6 +258,7 @@ static int rtc_read_proc(char *page, char **start, off_t off,
...
@@ -258,6 +258,7 @@ static int rtc_read_proc(char *page, char **start, off_t off,
return
len
;
return
len
;
}
}
#ifdef CONFIG_PPC_ISERIES
/*
/*
* Get the RTC from the virtual service processor
* Get the RTC from the virtual service processor
* This requires flowing LpEvents to the primary partition
* This requires flowing LpEvents to the primary partition
...
@@ -271,60 +272,6 @@ void iSeries_get_rtc_time(struct rtc_time *rtc_tm)
...
@@ -271,60 +272,6 @@ void iSeries_get_rtc_time(struct rtc_time *rtc_tm)
rtc_tm
->
tm_mon
--
;
rtc_tm
->
tm_mon
--
;
}
}
void
pSeries_get_rtc_time
(
struct
rtc_time
*
rtc_tm
)
{
unsigned
long
ret
[
8
];
int
error
;
int
count
;
/*
* error -2 is clock busy, we keep retrying a few times to see
* if it will come good -- paulus
*/
count
=
0
;
do
{
error
=
rtas_call
(
rtas_token
(
"get-time-of-day"
),
0
,
8
,
(
void
*
)
&
ret
);
}
while
(
error
==
-
2
&&
++
count
<
1000
);
if
(
error
!=
0
)
{
printk
(
KERN_WARNING
"error: reading the clock failed (%d)
\n
"
,
error
);
return
;
}
rtc_tm
->
tm_sec
=
ret
[
5
];
rtc_tm
->
tm_min
=
ret
[
4
];
rtc_tm
->
tm_hour
=
ret
[
3
];
rtc_tm
->
tm_mday
=
ret
[
2
];
rtc_tm
->
tm_mon
=
ret
[
1
]
-
1
;
rtc_tm
->
tm_year
=
ret
[
0
]
-
1900
;
}
int
pSeries_set_rtc_time
(
struct
rtc_time
*
tm
)
{
int
error
;
int
count
;
/*
* error -2 is clock busy, we keep retrying a few times to see
* if it will come good -- paulus
*/
count
=
0
;
do
{
error
=
rtas_call
(
rtas_token
(
"set-time-of-day"
),
7
,
1
,
NULL
,
tm
->
tm_year
+
1900
,
tm
->
tm_mon
+
1
,
tm
->
tm_mday
,
tm
->
tm_hour
,
tm
->
tm_min
,
tm
->
tm_sec
,
0
);
}
while
(
error
==
-
2
&&
++
count
<
1000
);
if
(
error
!=
0
)
printk
(
KERN_WARNING
"error: setting the clock failed (%d)
\n
"
,
error
);
return
0
;
}
/*
/*
* Set the RTC in the virtual service processor
* Set the RTC in the virtual service processor
* This requires flowing LpEvents to the primary partition
* This requires flowing LpEvents to the primary partition
...
@@ -380,3 +327,59 @@ void iSeries_get_boot_time(struct rtc_time *tm)
...
@@ -380,3 +327,59 @@ void iSeries_get_boot_time(struct rtc_time *tm)
tm
->
tm_year
-=
1900
;
tm
->
tm_year
-=
1900
;
tm
->
tm_mon
-=
1
;
tm
->
tm_mon
-=
1
;
}
}
#endif
#ifdef CONFIG_PPC_PSERIES
void
pSeries_get_rtc_time
(
struct
rtc_time
*
rtc_tm
)
{
unsigned
long
ret
[
8
];
int
error
;
int
count
;
/*
* error -2 is clock busy, we keep retrying a few times to see
* if it will come good -- paulus
*/
count
=
0
;
do
{
error
=
rtas_call
(
rtas_token
(
"get-time-of-day"
),
0
,
8
,
(
void
*
)
&
ret
);
}
while
(
error
==
-
2
&&
++
count
<
1000
);
if
(
error
!=
0
)
{
printk
(
KERN_WARNING
"error: reading the clock failed (%d)
\n
"
,
error
);
return
;
}
rtc_tm
->
tm_sec
=
ret
[
5
];
rtc_tm
->
tm_min
=
ret
[
4
];
rtc_tm
->
tm_hour
=
ret
[
3
];
rtc_tm
->
tm_mday
=
ret
[
2
];
rtc_tm
->
tm_mon
=
ret
[
1
]
-
1
;
rtc_tm
->
tm_year
=
ret
[
0
]
-
1900
;
}
int
pSeries_set_rtc_time
(
struct
rtc_time
*
tm
)
{
int
error
;
int
count
;
/*
* error -2 is clock busy, we keep retrying a few times to see
* if it will come good -- paulus
*/
count
=
0
;
do
{
error
=
rtas_call
(
rtas_token
(
"set-time-of-day"
),
7
,
1
,
NULL
,
tm
->
tm_year
+
1900
,
tm
->
tm_mon
+
1
,
tm
->
tm_mday
,
tm
->
tm_hour
,
tm
->
tm_min
,
tm
->
tm_sec
,
0
);
}
while
(
error
==
-
2
&&
++
count
<
1000
);
if
(
error
!=
0
)
printk
(
KERN_WARNING
"error: setting the clock failed (%d)
\n
"
,
error
);
return
0
;
}
#endif
arch/ppc64/kernel/setup.c
View file @
c8ec0450
...
@@ -153,14 +153,18 @@ void setup_system(unsigned long r3, unsigned long r4, unsigned long r5,
...
@@ -153,14 +153,18 @@ void setup_system(unsigned long r3, unsigned long r4, unsigned long r5,
debugger_dabr_match
=
xmon_dabr_match
;
debugger_dabr_match
=
xmon_dabr_match
;
#endif
#endif
#ifdef CONFIG_PPC_ISERIES
/* pSeries systems are identified in prom.c via OF. */
/* pSeries systems are identified in prom.c via OF. */
if
(
itLpNaca
.
xLparInstalled
==
1
)
if
(
itLpNaca
.
xLparInstalled
==
1
)
naca
->
platform
=
PLATFORM_ISERIES_LPAR
;
naca
->
platform
=
PLATFORM_ISERIES_LPAR
;
#endif
switch
(
naca
->
platform
)
{
switch
(
naca
->
platform
)
{
#ifdef CONFIG_PPC_ISERIES
case
PLATFORM_ISERIES_LPAR
:
case
PLATFORM_ISERIES_LPAR
:
iSeries_init_early
();
iSeries_init_early
();
break
;
break
;
#endif
#ifdef CONFIG_PPC_PSERIES
#ifdef CONFIG_PPC_PSERIES
case
PLATFORM_PSERIES
:
case
PLATFORM_PSERIES
:
...
@@ -215,9 +219,11 @@ void setup_system(unsigned long r3, unsigned long r4, unsigned long r5,
...
@@ -215,9 +219,11 @@ void setup_system(unsigned long r3, unsigned long r4, unsigned long r5,
mm_init_ppc64
();
mm_init_ppc64
();
switch
(
naca
->
platform
)
{
switch
(
naca
->
platform
)
{
#ifdef CONFIG_PPC_ISERIES
case
PLATFORM_ISERIES_LPAR
:
case
PLATFORM_ISERIES_LPAR
:
iSeries_init
();
iSeries_init
();
break
;
break
;
#endif
default:
default:
/* The following relies on the device tree being */
/* The following relies on the device tree being */
/* fully configured. */
/* fully configured. */
...
...
arch/ppc64/kernel/smp.c
View file @
c8ec0450
...
@@ -56,7 +56,7 @@ unsigned long cpu_online_map = 0;
...
@@ -56,7 +56,7 @@ unsigned long cpu_online_map = 0;
static
struct
smp_ops_t
*
smp_ops
;
static
struct
smp_ops_t
*
smp_ops
;
volatile
unsigned
long
cpu_callin_map
[
NR_CPUS
];
volatile
unsigned
int
cpu_callin_map
[
NR_CPUS
];
extern
unsigned
char
stab_array
[];
extern
unsigned
char
stab_array
[];
...
@@ -86,6 +86,7 @@ static inline void set_tb(unsigned int upper, unsigned int lower)
...
@@ -86,6 +86,7 @@ static inline void set_tb(unsigned int upper, unsigned int lower)
mttbl
(
lower
);
mttbl
(
lower
);
}
}
#ifdef CONFIG_PPC_ISERIES
void
iSeries_smp_message_recv
(
struct
pt_regs
*
regs
)
void
iSeries_smp_message_recv
(
struct
pt_regs
*
regs
)
{
{
int
cpu
=
smp_processor_id
();
int
cpu
=
smp_processor_id
();
...
@@ -117,7 +118,6 @@ static void smp_iSeries_message_pass(int target, int msg, unsigned long data, in
...
@@ -117,7 +118,6 @@ static void smp_iSeries_message_pass(int target, int msg, unsigned long data, in
}
}
}
}
#ifdef CONFIG_PPC_ISERIES
static
int
smp_iSeries_numProcs
(
void
)
static
int
smp_iSeries_numProcs
(
void
)
{
{
unsigned
np
,
i
;
unsigned
np
,
i
;
...
@@ -132,7 +132,6 @@ static int smp_iSeries_numProcs(void)
...
@@ -132,7 +132,6 @@ static int smp_iSeries_numProcs(void)
}
}
return
np
;
return
np
;
}
}
#endif
static
int
smp_iSeries_probe
(
void
)
static
int
smp_iSeries_probe
(
void
)
{
{
...
@@ -189,13 +188,12 @@ void __init smp_init_iSeries(void)
...
@@ -189,13 +188,12 @@ void __init smp_init_iSeries(void)
smp_ops
->
probe
=
smp_iSeries_probe
;
smp_ops
->
probe
=
smp_iSeries_probe
;
smp_ops
->
kick_cpu
=
smp_iSeries_kick_cpu
;
smp_ops
->
kick_cpu
=
smp_iSeries_kick_cpu
;
smp_ops
->
setup_cpu
=
smp_iSeries_setup_cpu
;
smp_ops
->
setup_cpu
=
smp_iSeries_setup_cpu
;
#ifdef CONFIG_PPC_ISERIES
#warning fix for iseries
#warning fix for iseries
naca
->
processorCount
=
smp_iSeries_numProcs
();
naca
->
processorCount
=
smp_iSeries_numProcs
();
#endif
}
}
#endif
#ifdef CONFIG_PPC_PSERIES
static
void
static
void
smp_openpic_message_pass
(
int
target
,
int
msg
,
unsigned
long
data
,
int
wait
)
smp_openpic_message_pass
(
int
target
,
int
msg
,
unsigned
long
data
,
int
wait
)
{
{
...
@@ -257,6 +255,7 @@ smp_kick_cpu(int nr)
...
@@ -257,6 +255,7 @@ smp_kick_cpu(int nr)
*/
*/
paca
[
nr
].
xProcStart
=
1
;
paca
[
nr
].
xProcStart
=
1
;
}
}
#endif
static
void
__init
smp_space_timers
(
unsigned
int
max_cpus
)
static
void
__init
smp_space_timers
(
unsigned
int
max_cpus
)
{
{
...
@@ -273,6 +272,7 @@ static void __init smp_space_timers(unsigned int max_cpus)
...
@@ -273,6 +272,7 @@ static void __init smp_space_timers(unsigned int max_cpus)
}
}
}
}
#ifdef CONFIG_PPC_PSERIES
static
void
__devinit
pSeries_setup_cpu
(
int
cpu
)
static
void
__devinit
pSeries_setup_cpu
(
int
cpu
)
{
{
if
(
OpenPIC_Addr
)
{
if
(
OpenPIC_Addr
)
{
...
@@ -361,6 +361,7 @@ void __init smp_init_pSeries(void)
...
@@ -361,6 +361,7 @@ void __init smp_init_pSeries(void)
smp_ops
->
kick_cpu
=
smp_kick_cpu
;
smp_ops
->
kick_cpu
=
smp_kick_cpu
;
smp_ops
->
setup_cpu
=
pSeries_setup_cpu
;
smp_ops
->
setup_cpu
=
pSeries_setup_cpu
;
}
}
#endif
void
smp_local_timer_interrupt
(
struct
pt_regs
*
regs
)
void
smp_local_timer_interrupt
(
struct
pt_regs
*
regs
)
{
{
...
@@ -563,26 +564,8 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
...
@@ -563,26 +564,8 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
/* Fixup boot cpu */
/* Fixup boot cpu */
smp_store_cpu_info
(
smp_processor_id
());
smp_store_cpu_info
(
smp_processor_id
());
cpu_callin_map
[
smp_processor_id
()]
=
1
;
cpu_callin_map
[
smp_processor_id
()]
=
1
;
paca
[
smp_processor_id
()].
prof_counter
=
1
;
for
(
i
=
0
;
i
<
NR_CPUS
;
i
++
)
{
paca
[
smp_processor_id
()].
prof_multiplier
=
1
;
paca
[
i
].
prof_counter
=
1
;
paca
[
i
].
prof_multiplier
=
1
;
if
(
i
!=
boot_cpuid
)
{
void
*
tmp
;
/*
* the boot cpu segment table is statically
* initialized to real address 0x5000. The
* Other processor's tables are created and
* initialized here.
*/
tmp
=
&
stab_array
[
PAGE_SIZE
*
(
i
-
1
)];
memset
(
tmp
,
0
,
PAGE_SIZE
);
paca
[
i
].
xStab_data
.
virt
=
(
unsigned
long
)
tmp
;
paca
[
i
].
xStab_data
.
real
=
(
unsigned
long
)
__v2a
(
tmp
);
paca
[
i
].
default_decr
=
tb_ticks_per_jiffy
/
decr_overclock
;
}
}
/*
/*
* XXX very rough.
* XXX very rough.
...
@@ -616,6 +599,23 @@ int __devinit __cpu_up(unsigned int cpu)
...
@@ -616,6 +599,23 @@ int __devinit __cpu_up(unsigned int cpu)
struct
task_struct
*
p
;
struct
task_struct
*
p
;
int
c
;
int
c
;
paca
[
cpu
].
prof_counter
=
1
;
paca
[
cpu
].
prof_multiplier
=
1
;
paca
[
cpu
].
default_decr
=
tb_ticks_per_jiffy
/
decr_overclock
;
if
(
!
cpu_has_slb
())
{
void
*
tmp
;
/* maximum of 48 CPUs on machines with a segment table */
if
(
cpu
>=
48
)
BUG
();
tmp
=
&
stab_array
[
PAGE_SIZE
*
cpu
];
memset
(
tmp
,
0
,
PAGE_SIZE
);
paca
[
cpu
].
xStab_data
.
virt
=
(
unsigned
long
)
tmp
;
paca
[
cpu
].
xStab_data
.
real
=
(
unsigned
long
)
__v2a
(
tmp
);
}
/* create a process for the processor */
/* create a process for the processor */
/* only regs.msr is actually used, and 0 is OK for it */
/* only regs.msr is actually used, and 0 is OK for it */
memset
(
&
regs
,
0
,
sizeof
(
struct
pt_regs
));
memset
(
&
regs
,
0
,
sizeof
(
struct
pt_regs
));
...
...
arch/ppc64/kernel/sys_ppc32.c
View file @
c8ec0450
...
@@ -300,16 +300,16 @@ asmlinkage long sys32_fcntl(unsigned int fd, unsigned int cmd, unsigned long arg
...
@@ -300,16 +300,16 @@ asmlinkage long sys32_fcntl(unsigned int fd, unsigned int cmd, unsigned long arg
struct
ncp_mount_data32_v3
{
struct
ncp_mount_data32_v3
{
int
version
;
int
version
;
unsigned
int
ncp_fd
;
unsigned
int
ncp_fd
;
__kernel_uid_t32
mounted_uid
;
compat_uid_t
mounted_uid
;
__kernel_pid_t32
wdog_pid
;
compat_pid_t
wdog_pid
;
unsigned
char
mounted_vol
[
NCP_VOLNAME_LEN
+
1
];
unsigned
char
mounted_vol
[
NCP_VOLNAME_LEN
+
1
];
unsigned
int
time_out
;
unsigned
int
time_out
;
unsigned
int
retry_count
;
unsigned
int
retry_count
;
unsigned
int
flags
;
unsigned
int
flags
;
__kernel_uid_t32
uid
;
compat_uid_t
uid
;
__kernel_gid_t32
gid
;
compat_gid_t
gid
;
__kernel_mode_t32
file_mode
;
compat_mode_t
file_mode
;
__kernel_mode_t32
dir_mode
;
compat_mode_t
dir_mode
;
};
};
struct
ncp_mount_data32_v4
{
struct
ncp_mount_data32_v4
{
...
@@ -380,11 +380,11 @@ static void *do_ncp_super_data_conv(void *raw_data)
...
@@ -380,11 +380,11 @@ static void *do_ncp_super_data_conv(void *raw_data)
struct
smb_mount_data32
{
struct
smb_mount_data32
{
int
version
;
int
version
;
__kernel_uid_t32
mounted_uid
;
compat_uid_t
mounted_uid
;
__kernel_uid_t32
uid
;
compat_uid_t
uid
;
__kernel_gid_t32
gid
;
compat_gid_t
gid
;
__kernel_mode_t32
file_mode
;
compat_mode_t
file_mode
;
__kernel_mode_t32
dir_mode
;
compat_mode_t
dir_mode
;
};
};
static
void
*
do_smb_super_data_conv
(
void
*
raw_data
)
static
void
*
do_smb_super_data_conv
(
void
*
raw_data
)
...
@@ -802,10 +802,13 @@ asmlinkage int ppc32_select(u32 n, u32* inp, u32* outp, u32* exp, u32 tvp_x)
...
@@ -802,10 +802,13 @@ asmlinkage int ppc32_select(u32 n, u32* inp, u32* outp, u32* exp, u32 tvp_x)
return
sys32_select
((
int
)
n
,
inp
,
outp
,
exp
,
tvp_x
);
return
sys32_select
((
int
)
n
,
inp
,
outp
,
exp
,
tvp_x
);
}
}
static
int
cp_new_stat32
(
struct
kstat
*
stat
,
struct
stat32
*
statbuf
)
int
cp_compat_stat
(
struct
kstat
*
stat
,
struct
compat_stat
*
statbuf
)
{
{
int
err
;
int
err
;
if
(
stat
->
size
>
MAX_NON_LFS
)
return
-
EOVERFLOW
;
err
=
put_user
(
stat
->
dev
,
&
statbuf
->
st_dev
);
err
=
put_user
(
stat
->
dev
,
&
statbuf
->
st_dev
);
err
|=
put_user
(
stat
->
ino
,
&
statbuf
->
st_ino
);
err
|=
put_user
(
stat
->
ino
,
&
statbuf
->
st_ino
);
err
|=
put_user
(
stat
->
mode
,
&
statbuf
->
st_mode
);
err
|=
put_user
(
stat
->
mode
,
&
statbuf
->
st_mode
);
...
@@ -813,8 +816,6 @@ static int cp_new_stat32(struct kstat *stat, struct stat32 *statbuf)
...
@@ -813,8 +816,6 @@ static int cp_new_stat32(struct kstat *stat, struct stat32 *statbuf)
err
|=
put_user
(
stat
->
uid
,
&
statbuf
->
st_uid
);
err
|=
put_user
(
stat
->
uid
,
&
statbuf
->
st_uid
);
err
|=
put_user
(
stat
->
gid
,
&
statbuf
->
st_gid
);
err
|=
put_user
(
stat
->
gid
,
&
statbuf
->
st_gid
);
err
|=
put_user
(
stat
->
rdev
,
&
statbuf
->
st_rdev
);
err
|=
put_user
(
stat
->
rdev
,
&
statbuf
->
st_rdev
);
if
(
stat
->
size
>
MAX_NON_LFS
)
return
-
EOVERFLOW
;
err
|=
put_user
(
stat
->
size
,
&
statbuf
->
st_size
);
err
|=
put_user
(
stat
->
size
,
&
statbuf
->
st_size
);
err
|=
put_user
(
stat
->
atime
.
tv_sec
,
&
statbuf
->
st_atime
);
err
|=
put_user
(
stat
->
atime
.
tv_sec
,
&
statbuf
->
st_atime
);
err
|=
put_user
(
0
,
&
statbuf
->
__unused1
);
err
|=
put_user
(
0
,
&
statbuf
->
__unused1
);
...
@@ -830,39 +831,6 @@ static int cp_new_stat32(struct kstat *stat, struct stat32 *statbuf)
...
@@ -830,39 +831,6 @@ static int cp_new_stat32(struct kstat *stat, struct stat32 *statbuf)
return
err
;
return
err
;
}
}
asmlinkage
long
sys32_newstat
(
char
*
filename
,
struct
stat32
*
statbuf
)
{
struct
kstat
stat
;
int
error
=
vfs_stat
(
filename
,
&
stat
);
if
(
!
error
)
error
=
cp_new_stat32
(
&
stat
,
statbuf
);
return
error
;
}
asmlinkage
long
sys32_newlstat
(
char
*
filename
,
struct
stat32
*
statbuf
)
{
struct
kstat
stat
;
int
error
=
vfs_lstat
(
filename
,
&
stat
);
if
(
!
error
)
error
=
cp_new_stat32
(
&
stat
,
statbuf
);
return
error
;
}
asmlinkage
long
sys32_newfstat
(
unsigned
int
fd
,
struct
stat32
*
statbuf
)
{
struct
kstat
stat
;
int
error
=
vfs_fstat
(
fd
,
&
stat
);
if
(
!
error
)
error
=
cp_new_stat32
(
&
stat
,
statbuf
);
return
error
;
}
static
inline
int
put_statfs
(
struct
statfs32
*
ubuf
,
struct
statfs
*
kbuf
)
static
inline
int
put_statfs
(
struct
statfs32
*
ubuf
,
struct
statfs
*
kbuf
)
{
{
int
err
;
int
err
;
...
@@ -1492,27 +1460,27 @@ struct nfsctl_client32 {
...
@@ -1492,27 +1460,27 @@ struct nfsctl_client32 {
struct
nfsctl_export32
{
struct
nfsctl_export32
{
s8
ex32_client
[
NFSCLNT_IDMAX
+
1
];
s8
ex32_client
[
NFSCLNT_IDMAX
+
1
];
s8
ex32_path
[
NFS_MAXPATHLEN
+
1
];
s8
ex32_path
[
NFS_MAXPATHLEN
+
1
];
__kernel_dev_t32
ex32_dev
;
compat_dev_t
ex32_dev
;
__kernel_ino_t32
ex32_ino
;
compat_ino_t
ex32_ino
;
s32
ex32_flags
;
s32
ex32_flags
;
__kernel_uid_t32
ex32_anon_uid
;
compat_uid_t
ex32_anon_uid
;
__kernel_gid_t32
ex32_anon_gid
;
compat_gid_t
ex32_anon_gid
;
};
};
struct
nfsctl_uidmap32
{
struct
nfsctl_uidmap32
{
u32
ug32_ident
;
/* char * */
u32
ug32_ident
;
/* char * */
__kernel_uid_t32
ug32_uidbase
;
compat_uid_t
ug32_uidbase
;
s32
ug32_uidlen
;
s32
ug32_uidlen
;
u32
ug32_udimap
;
/* uid_t * */
u32
ug32_udimap
;
/* uid_t * */
__kernel_uid_t32
ug32_gidbase
;
compat_uid_t
ug32_gidbase
;
s32
ug32_gidlen
;
s32
ug32_gidlen
;
u32
ug32_gdimap
;
/* gid_t * */
u32
ug32_gdimap
;
/* gid_t * */
};
};
struct
nfsctl_fhparm32
{
struct
nfsctl_fhparm32
{
struct
sockaddr
gf32_addr
;
struct
sockaddr
gf32_addr
;
__kernel_dev_t32
gf32_dev
;
compat_dev_t
gf32_dev
;
__kernel_ino_t32
gf32_ino
;
compat_ino_t
gf32_ino
;
s32
gf32_version
;
s32
gf32_version
;
};
};
...
@@ -1645,7 +1613,7 @@ static int nfs_uud32_trans(struct nfsctl_arg *karg, struct nfsctl_arg32 *arg32)
...
@@ -1645,7 +1613,7 @@ static int nfs_uud32_trans(struct nfsctl_arg *karg, struct nfsctl_arg32 *arg32)
return
-
ENOMEM
;
return
-
ENOMEM
;
for
(
i
=
0
;
i
<
karg
->
ca_umap
.
ug_uidlen
;
i
++
)
for
(
i
=
0
;
i
<
karg
->
ca_umap
.
ug_uidlen
;
i
++
)
err
|=
__get_user
(
karg
->
ca_umap
.
ug_udimap
[
i
],
err
|=
__get_user
(
karg
->
ca_umap
.
ug_udimap
[
i
],
&
(((
__kernel_uid_t32
*
)
A
(
uaddr
))[
i
]));
&
(((
compat_uid_t
*
)
A
(
uaddr
))[
i
]));
err
|=
__get_user
(
karg
->
ca_umap
.
ug_gidbase
,
err
|=
__get_user
(
karg
->
ca_umap
.
ug_gidbase
,
&
arg32
->
ca32_umap
.
ug32_gidbase
);
&
arg32
->
ca32_umap
.
ug32_gidbase
);
err
|=
__get_user
(
karg
->
ca_umap
.
ug_uidlen
,
err
|=
__get_user
(
karg
->
ca_umap
.
ug_uidlen
,
...
@@ -1659,7 +1627,7 @@ static int nfs_uud32_trans(struct nfsctl_arg *karg, struct nfsctl_arg32 *arg32)
...
@@ -1659,7 +1627,7 @@ static int nfs_uud32_trans(struct nfsctl_arg *karg, struct nfsctl_arg32 *arg32)
return
-
ENOMEM
;
return
-
ENOMEM
;
for
(
i
=
0
;
i
<
karg
->
ca_umap
.
ug_gidlen
;
i
++
)
for
(
i
=
0
;
i
<
karg
->
ca_umap
.
ug_gidlen
;
i
++
)
err
|=
__get_user
(
karg
->
ca_umap
.
ug_gdimap
[
i
],
err
|=
__get_user
(
karg
->
ca_umap
.
ug_gdimap
[
i
],
&
(((
__kernel_gid_t32
*
)
A
(
uaddr
))[
i
]));
&
(((
compat_gid_t
*
)
A
(
uaddr
))[
i
]));
return
err
;
return
err
;
}
}
...
@@ -2076,37 +2044,6 @@ asmlinkage long sys32_settimeofday(struct compat_timeval *tv, struct timezone *t
...
@@ -2076,37 +2044,6 @@ asmlinkage long sys32_settimeofday(struct compat_timeval *tv, struct timezone *t
}
}
struct
tms32
{
__kernel_clock_t32
tms_utime
;
__kernel_clock_t32
tms_stime
;
__kernel_clock_t32
tms_cutime
;
__kernel_clock_t32
tms_cstime
;
};
extern
asmlinkage
long
sys_times
(
struct
tms
*
tbuf
);
asmlinkage
long
sys32_times
(
struct
tms32
*
tbuf
)
{
struct
tms
t
;
long
ret
;
mm_segment_t
old_fs
=
get_fs
();
int
err
;
set_fs
(
KERNEL_DS
);
ret
=
sys_times
(
tbuf
?
&
t
:
NULL
);
set_fs
(
old_fs
);
if
(
tbuf
)
{
err
=
put_user
(
t
.
tms_utime
,
&
tbuf
->
tms_utime
);
err
|=
__put_user
(
t
.
tms_stime
,
&
tbuf
->
tms_stime
);
err
|=
__put_user
(
t
.
tms_cutime
,
&
tbuf
->
tms_cutime
);
err
|=
__put_user
(
t
.
tms_cstime
,
&
tbuf
->
tms_cstime
);
if
(
err
)
ret
=
-
EFAULT
;
}
return
ret
;
}
struct
msgbuf32
{
s32
mtype
;
char
mtext
[
1
];
};
struct
msgbuf32
{
s32
mtype
;
char
mtext
[
1
];
};
struct
semid_ds32
{
struct
semid_ds32
{
...
@@ -2159,8 +2096,8 @@ struct msqid64_ds32 {
...
@@ -2159,8 +2096,8 @@ struct msqid64_ds32 {
unsigned
int
msg_cbytes
;
unsigned
int
msg_cbytes
;
unsigned
int
msg_qnum
;
unsigned
int
msg_qnum
;
unsigned
int
msg_qbytes
;
unsigned
int
msg_qbytes
;
__kernel_pid_t32
msg_lspid
;
compat_pid_t
msg_lspid
;
__kernel_pid_t32
msg_lrpid
;
compat_pid_t
msg_lrpid
;
unsigned
int
__unused4
;
unsigned
int
__unused4
;
unsigned
int
__unused5
;
unsigned
int
__unused5
;
};
};
...
@@ -2189,8 +2126,8 @@ struct shmid64_ds32 {
...
@@ -2189,8 +2126,8 @@ struct shmid64_ds32 {
compat_time_t
shm_ctime
;
compat_time_t
shm_ctime
;
unsigned
int
__unused4
;
unsigned
int
__unused4
;
compat_size_t
shm_segsz
;
compat_size_t
shm_segsz
;
__kernel_pid_t32
shm_cpid
;
compat_pid_t
shm_cpid
;
__kernel_pid_t32
shm_lpid
;
compat_pid_t
shm_lpid
;
unsigned
int
shm_nattch
;
unsigned
int
shm_nattch
;
unsigned
int
__unused5
;
unsigned
int
__unused5
;
unsigned
int
__unused6
;
unsigned
int
__unused6
;
...
@@ -2712,7 +2649,7 @@ extern asmlinkage ssize_t sys_sendfile(int out_fd, int in_fd, off_t* offset, siz
...
@@ -2712,7 +2649,7 @@ extern asmlinkage ssize_t sys_sendfile(int out_fd, int in_fd, off_t* offset, siz
* proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode)
* proper conversion (sign extension) between the register representation of a signed int (msr in 32-bit mode)
* and the register representation of a signed int (msr in 64-bit mode) is performed.
* and the register representation of a signed int (msr in 64-bit mode) is performed.
*/
*/
asmlinkage
long
sys32_sendfile
(
u32
out_fd
,
u32
in_fd
,
__kernel_off_t32
*
offset
,
u32
count
)
asmlinkage
long
sys32_sendfile
(
u32
out_fd
,
u32
in_fd
,
compat_off_t
*
offset
,
u32
count
)
{
{
mm_segment_t
old_fs
=
get_fs
();
mm_segment_t
old_fs
=
get_fs
();
int
ret
;
int
ret
;
...
@@ -4296,7 +4233,7 @@ asmlinkage long sys32_time(compat_time_t* tloc)
...
@@ -4296,7 +4233,7 @@ asmlinkage long sys32_time(compat_time_t* tloc)
extern
asmlinkage
int
sys_sched_setaffinity
(
pid_t
pid
,
unsigned
int
len
,
extern
asmlinkage
int
sys_sched_setaffinity
(
pid_t
pid
,
unsigned
int
len
,
unsigned
long
*
user_mask_ptr
);
unsigned
long
*
user_mask_ptr
);
asmlinkage
int
sys32_sched_setaffinity
(
__kernel_pid_t32
pid
,
unsigned
int
len
,
asmlinkage
int
sys32_sched_setaffinity
(
compat_pid_t
pid
,
unsigned
int
len
,
u32
*
user_mask_ptr
)
u32
*
user_mask_ptr
)
{
{
unsigned
long
kernel_mask
;
unsigned
long
kernel_mask
;
...
@@ -4320,7 +4257,7 @@ asmlinkage int sys32_sched_setaffinity(__kernel_pid_t32 pid, unsigned int len,
...
@@ -4320,7 +4257,7 @@ asmlinkage int sys32_sched_setaffinity(__kernel_pid_t32 pid, unsigned int len,
extern
asmlinkage
int
sys_sched_getaffinity
(
pid_t
pid
,
unsigned
int
len
,
extern
asmlinkage
int
sys_sched_getaffinity
(
pid_t
pid
,
unsigned
int
len
,
unsigned
long
*
user_mask_ptr
);
unsigned
long
*
user_mask_ptr
);
asmlinkage
int
sys32_sched_getaffinity
(
__kernel_pid_t32
pid
,
unsigned
int
len
,
asmlinkage
int
sys32_sched_getaffinity
(
compat_pid_t
pid
,
unsigned
int
len
,
u32
*
user_mask_ptr
)
u32
*
user_mask_ptr
)
{
{
unsigned
long
kernel_mask
;
unsigned
long
kernel_mask
;
...
...
arch/ppc64/kernel/time.c
View file @
c8ec0450
...
@@ -301,9 +301,11 @@ int timer_interrupt(struct pt_regs * regs)
...
@@ -301,9 +301,11 @@ int timer_interrupt(struct pt_regs * regs)
next_dec
=
lpaca
->
default_decr
;
next_dec
=
lpaca
->
default_decr
;
set_dec
(
next_dec
);
set_dec
(
next_dec
);
#ifdef CONFIG_PPC_ISERIES
lpq
=
lpaca
->
lpQueuePtr
;
lpq
=
lpaca
->
lpQueuePtr
;
if
(
lpq
&&
ItLpQueue_isLpIntPending
(
lpq
))
if
(
lpq
&&
ItLpQueue_isLpIntPending
(
lpq
))
lpEvent_count
+=
ItLpQueue_process
(
lpq
,
regs
);
lpEvent_count
+=
ItLpQueue_process
(
lpq
,
regs
);
#endif
irq_exit
();
irq_exit
();
...
@@ -458,9 +460,11 @@ void __init time_init(void)
...
@@ -458,9 +460,11 @@ void __init time_init(void)
ppc_md
.
calibrate_decr
();
ppc_md
.
calibrate_decr
();
if
(
!
piranha_simulator
)
{
#ifdef CONFIG_PPC_ISERIES
if
(
!
piranha_simulator
)
#endif
ppc_md
.
get_boot_time
(
&
tm
);
ppc_md
.
get_boot_time
(
&
tm
);
}
write_lock_irqsave
(
&
xtime_lock
,
flags
);
write_lock_irqsave
(
&
xtime_lock
,
flags
);
xtime
.
tv_sec
=
mktime
(
tm
.
tm_year
+
1900
,
tm
.
tm_mon
+
1
,
tm
.
tm_mday
,
xtime
.
tv_sec
=
mktime
(
tm
.
tm_year
+
1900
,
tm
.
tm_mon
+
1
,
tm
.
tm_mday
,
tm
.
tm_hour
,
tm
.
tm_min
,
tm
.
tm_sec
);
tm
.
tm_hour
,
tm
.
tm_min
,
tm
.
tm_sec
);
...
...
arch/ppc64/kernel/xics.c
View file @
c8ec0450
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
#include <asm/naca.h>
#include <asm/naca.h>
#include <asm/rtas.h>
#include <asm/rtas.h>
#include "i8259.h"
#include "i8259.h"
#include
"xics.h"
#include
<asm/xics.h>
#include <asm/ppcdebug.h>
#include <asm/ppcdebug.h>
#include <asm/machdep.h>
#include <asm/machdep.h>
...
@@ -430,15 +430,6 @@ xics_init_IRQ( void )
...
@@ -430,15 +430,6 @@ xics_init_IRQ( void )
ppc64_boot_msg
(
0x21
,
"XICS Done"
);
ppc64_boot_msg
(
0x21
,
"XICS Done"
);
}
}
void
xics_isa_init
(
void
)
{
return
;
if
(
request_irq
(
xics_irq_8259_cascade
+
XICS_IRQ_OFFSET
,
no_action
,
0
,
"8259 cascade"
,
0
))
printk
(
KERN_ERR
"xics_init_IRQ: couldn't get 8259 cascade
\n
"
);
i8259_init
();
}
void
xics_set_affinity
(
unsigned
int
virq
,
unsigned
long
cpumask
)
void
xics_set_affinity
(
unsigned
int
virq
,
unsigned
long
cpumask
)
{
{
irq_desc_t
*
desc
=
irq_desc
+
virq
;
irq_desc_t
*
desc
=
irq_desc
+
virq
;
...
@@ -446,7 +437,7 @@ void xics_set_affinity(unsigned int virq, unsigned long cpumask)
...
@@ -446,7 +437,7 @@ void xics_set_affinity(unsigned int virq, unsigned long cpumask)
unsigned
long
flags
;
unsigned
long
flags
;
long
status
;
long
status
;
unsigned
long
xics_status
[
2
];
unsigned
long
xics_status
[
2
];
u
32
newmask
;
u
nsigned
long
newmask
;
virq
-=
XICS_IRQ_OFFSET
;
virq
-=
XICS_IRQ_OFFSET
;
irq
=
virt_irq_to_real
(
virq
);
irq
=
virt_irq_to_real
(
virq
);
...
@@ -464,12 +455,12 @@ void xics_set_affinity(unsigned int virq, unsigned long cpumask)
...
@@ -464,12 +455,12 @@ void xics_set_affinity(unsigned int virq, unsigned long cpumask)
}
}
/* For the moment only implement delivery to all cpus or one cpu */
/* For the moment only implement delivery to all cpus or one cpu */
if
(
cpumask
==
0xffffffff
)
{
if
(
cpumask
==
-
1UL
)
{
newmask
=
default_distrib_server
;
newmask
=
default_distrib_server
;
}
else
{
}
else
{
if
(
!
(
cpumask
&
cpu_online_map
))
if
(
!
(
cpumask
&
cpu_online_map
))
goto
out
;
goto
out
;
newmask
=
find_first_bit
(
&
cpumask
,
32
);
newmask
=
find_first_bit
(
&
cpumask
,
8
*
sizeof
(
unsigned
long
)
);
}
}
status
=
rtas_call
(
ibm_set_xive
,
3
,
1
,
NULL
,
status
=
rtas_call
(
ibm_set_xive
,
3
,
1
,
NULL
,
...
...
arch/ppc64/lib/Makefile
View file @
c8ec0450
...
@@ -2,7 +2,9 @@
...
@@ -2,7 +2,9 @@
# Makefile for ppc64-specific library files..
# Makefile for ppc64-specific library files..
#
#
export-objs
:=
dec_and_lock.o
L_TARGET
=
lib.a
obj-y
:=
checksum.o dec_and_lock.o string.o strcase.o copypage.o
\
export-objs
:=
dec_and_lock.o
memcpy.o copyuser.o
obj-y
:=
checksum.o dec_and_lock.o string.o strcase.o
obj-y
+=
copypage.o memcpy.o copyuser.o
arch/ppc64/lib/memcpy.S
View file @
c8ec0450
...
@@ -121,7 +121,7 @@ _GLOBAL(memcpy)
...
@@ -121,7 +121,7 @@ _GLOBAL(memcpy)
cmpwi
cr1
,
r5
,
8
cmpwi
cr1
,
r5
,
8
addi
r3
,
r3
,
32
addi
r3
,
r3
,
32
sld
r9
,
r9
,
r10
sld
r9
,
r9
,
r10
bl
t
cr1
,
.
Ldo_tail
bl
e
cr1
,
.
Ldo_tail
ld
r0
,
8
(
r4
)
ld
r0
,
8
(
r4
)
srd
r7
,
r0
,
r11
srd
r7
,
r0
,
r11
or
r9
,
r7
,
r9
or
r9
,
r7
,
r9
...
...
arch/ppc64/mm/Makefile
View file @
c8ec0450
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
# Makefile for the linux ppc-specific parts of the memory manager.
# Makefile for the linux ppc-specific parts of the memory manager.
#
#
EXTRA_CFLAGS
=
-mno-minimal-toc
EXTRA_CFLAGS
+
=
-mno-minimal-toc
obj-y
:=
fault.o init.o extable.o imalloc.o
obj-y
:=
fault.o init.o extable.o imalloc.o
obj-$(CONFIG_DISCONTIGMEM)
+=
numa.o
obj-$(CONFIG_DISCONTIGMEM)
+=
numa.o
arch/ppc64/oprofile/Makefile
View file @
c8ec0450
obj-$(CONFIG_OPROFILE)
+=
oprofile.o
obj-$(CONFIG_OPROFILE)
+=
oprofile.o
DRIVER_OBJS
=
$(
addprefix
../../../drivers/oprofile/,
\
DRIVER_OBJS
:
=
$(
addprefix
../../../drivers/oprofile/,
\
oprof.o cpu_buffer.o buffer_sync.o
\
oprof.o cpu_buffer.o buffer_sync.o
\
event_buffer.o oprofile_files.o
\
event_buffer.o oprofile_files.o
\
oprofilefs.o oprofile_stats.o
)
oprofilefs.o oprofile_stats.o
)
oprofile-y
:=
$(DRIVER_OBJS)
init.o timer_int.o
oprofile-y
:=
$(DRIVER_OBJS)
init.o timer_int.o
arch/ppc64/xmon/Makefile
View file @
c8ec0450
# Makefile for xmon
# Makefile for xmon
EXTRA_CFLAGS
=
-mno-minimal-toc
EXTRA_CFLAGS
+
=
-mno-minimal-toc
obj-y
:=
start.o xmon.o ppc-dis.o ppc-opc.o subr_prf.o setjmp.o
obj-y
:=
start.o xmon.o ppc-dis.o ppc-opc.o subr_prf.o setjmp.o
arch/ppc64/xmon/start.c
View file @
c8ec0450
...
@@ -14,29 +14,13 @@
...
@@ -14,29 +14,13 @@
#include <asm/page.h>
#include <asm/page.h>
#include <asm/prom.h>
#include <asm/prom.h>
#include <asm/processor.h>
#include <asm/processor.h>
/* Transition to udbg isn't quite done yet...but very close. */
#define USE_UDBG
#ifdef USE_UDBG
#include <asm/udbg.h>
#include <asm/udbg.h>
#endif
#ifndef USE_UDBG
static
volatile
unsigned
char
*
sccc
,
*
sccd
;
#endif
unsigned
long
TXRDY
,
RXRDY
;
extern
void
xmon_printf
(
const
char
*
fmt
,
...);
extern
void
xmon_printf
(
const
char
*
fmt
,
...);
static
int
xmon_expect
(
const
char
*
str
,
unsigned
int
timeout
);
static
int
xmon_expect
(
const
char
*
str
,
unsigned
int
timeout
);
#ifndef USE_UDBG
static
int
console
=
0
;
#endif
static
int
via_modem
=
0
;
/* static int xmon_use_sccb = 0; --Unused */
#define TB_SPEED 25000000
#define TB_SPEED 25000000
extern
void
*
comport1
;
static
inline
unsigned
int
readtb
(
void
)
static
inline
unsigned
int
readtb
(
void
)
{
{
unsigned
int
ret
;
unsigned
int
ret
;
...
@@ -45,16 +29,10 @@ static inline unsigned int readtb(void)
...
@@ -45,16 +29,10 @@ static inline unsigned int readtb(void)
return
ret
;
return
ret
;
}
}
#ifndef USE_UDBG
static
void
sysrq_handle_xmon
(
int
key
,
struct
pt_regs
*
pt_regs
,
void
buf_access
(
void
)
struct
tty_struct
*
tty
)
{
{
sccd
[
3
]
&=
~
0x80
;
/* reset DLAB */
xmon
(
pt_regs
);
}
#endif
static
void
sysrq_handle_xmon
(
int
key
,
struct
pt_regs
*
pt_regs
,
struct
tty_struct
*
tty
)
{
xmon
(
pt_regs
);
}
}
static
struct
sysrq_key_op
sysrq_xmon_op
=
static
struct
sysrq_key_op
sysrq_xmon_op
=
{
{
...
@@ -68,50 +46,12 @@ xmon_map_scc(void)
...
@@ -68,50 +46,12 @@ xmon_map_scc(void)
{
{
/* This maybe isn't the best place to register sysrq 'x' */
/* This maybe isn't the best place to register sysrq 'x' */
__sysrq_put_key_op
(
'x'
,
&
sysrq_xmon_op
);
__sysrq_put_key_op
(
'x'
,
&
sysrq_xmon_op
);
#ifndef USE_UDBG
/* should already be mapped by the kernel boot */
sccd
=
(
volatile
unsigned
char
*
)
(((
unsigned
long
)
comport1
));
sccc
=
(
volatile
unsigned
char
*
)
(((
unsigned
long
)
comport1
)
+
5
);
TXRDY
=
0x20
;
RXRDY
=
1
;
#endif
}
}
static
int
scc_initialized
=
0
;
void
xmon_init_scc
(
void
);
extern
void
pmu_poll
(
void
);
int
int
xmon_write
(
void
*
handle
,
void
*
ptr
,
int
nb
)
xmon_write
(
void
*
handle
,
void
*
ptr
,
int
nb
)
{
{
#ifdef USE_UDBG
return
udbg_write
(
ptr
,
nb
);
return
udbg_write
(
ptr
,
nb
);
#else
char
*
p
=
ptr
;
int
i
,
c
,
ct
;
if
(
!
scc_initialized
)
xmon_init_scc
();
ct
=
0
;
for
(
i
=
0
;
i
<
nb
;
++
i
)
{
while
((
*
sccc
&
TXRDY
)
==
0
)
{
}
c
=
p
[
i
];
if
(
c
==
'\n'
&&
!
ct
)
{
c
=
'\r'
;
ct
=
1
;
--
i
;
}
else
{
if
(
console
)
printk
(
"%c"
,
c
);
ct
=
0
;
}
buf_access
();
*
sccd
=
c
;
}
return
i
;
#endif
}
}
int
xmon_wants_key
;
int
xmon_wants_key
;
...
@@ -119,68 +59,15 @@ int xmon_wants_key;
...
@@ -119,68 +59,15 @@ int xmon_wants_key;
int
int
xmon_read
(
void
*
handle
,
void
*
ptr
,
int
nb
)
xmon_read
(
void
*
handle
,
void
*
ptr
,
int
nb
)
{
{
#ifdef USE_UDBG
return
udbg_read
(
ptr
,
nb
);
return
udbg_read
(
ptr
,
nb
);
#else
char
*
p
=
ptr
;
int
i
,
c
;
if
(
!
scc_initialized
)
xmon_init_scc
();
for
(
i
=
0
;
i
<
nb
;
++
i
)
{
do
{
while
((
*
sccc
&
RXRDY
)
==
0
)
;
buf_access
();
c
=
*
sccd
;
}
while
(
c
==
0x11
||
c
==
0x13
);
*
p
++
=
c
;
}
return
i
;
#endif
}
}
int
int
xmon_read_poll
(
void
)
xmon_read_poll
(
void
)
{
{
#ifdef USE_UDBG
return
udbg_getc_poll
();
return
udbg_getc_poll
();
#else
if
((
*
sccc
&
RXRDY
)
==
0
)
{
return
-
1
;
}
buf_access
();
return
*
sccd
;
#endif
}
}
void
xmon_init_scc
()
{
#ifndef USE_UDBG
sccd
[
3
]
=
0x83
;
eieio
();
/* LCR = 8N1 + DLAB */
sccd
[
0
]
=
12
;
eieio
();
/* DLL = 9600 baud */
sccd
[
1
]
=
0
;
eieio
();
sccd
[
2
]
=
0
;
eieio
();
/* FCR = 0 */
sccd
[
3
]
=
3
;
eieio
();
/* LCR = 8N1 */
sccd
[
1
]
=
0
;
eieio
();
/* IER = 0 */
#endif
scc_initialized
=
1
;
if
(
via_modem
)
{
for
(;;)
{
xmon_write
(
0
,
"ATE1V1
\r
"
,
7
);
if
(
xmon_expect
(
"OK"
,
5
))
{
xmon_write
(
0
,
"ATA
\r
"
,
4
);
if
(
xmon_expect
(
"CONNECT"
,
40
))
break
;
}
xmon_write
(
0
,
"+++"
,
3
);
xmon_expect
(
"OK"
,
3
);
}
}
}
void
*
xmon_stdin
;
void
*
xmon_stdin
;
void
*
xmon_stdout
;
void
*
xmon_stdout
;
void
*
xmon_stderr
;
void
*
xmon_stderr
;
...
...
include/asm-ppc64/compat.h
View file @
c8ec0450
...
@@ -5,9 +5,20 @@
...
@@ -5,9 +5,20 @@
*/
*/
#include <linux/types.h>
#include <linux/types.h>
#define COMPAT_USER_HZ 100
typedef
u32
compat_size_t
;
typedef
u32
compat_size_t
;
typedef
s32
compat_ssize_t
;
typedef
s32
compat_ssize_t
;
typedef
s32
compat_time_t
;
typedef
s32
compat_time_t
;
typedef
s32
compat_clock_t
;
typedef
s32
compat_pid_t
;
typedef
u32
compat_uid_t
;
typedef
u32
compat_gid_t
;
typedef
u32
compat_mode_t
;
typedef
u32
compat_ino_t
;
typedef
u32
compat_dev_t
;
typedef
s32
compat_off_t
;
typedef
s16
compat_nlink_t
;
struct
compat_timespec
{
struct
compat_timespec
{
compat_time_t
tv_sec
;
compat_time_t
tv_sec
;
...
@@ -19,4 +30,24 @@ struct compat_timeval {
...
@@ -19,4 +30,24 @@ struct compat_timeval {
s32
tv_usec
;
s32
tv_usec
;
};
};
struct
compat_stat
{
compat_dev_t
st_dev
;
compat_ino_t
st_ino
;
compat_mode_t
st_mode
;
compat_nlink_t
st_nlink
;
compat_uid_t
st_uid
;
compat_gid_t
st_gid
;
compat_dev_t
st_rdev
;
compat_off_t
st_size
;
compat_off_t
st_blksize
;
compat_off_t
st_blocks
;
compat_time_t
st_atime
;
u32
__unused1
;
compat_time_t
st_mtime
;
u32
__unused2
;
compat_time_t
st_ctime
;
u32
__unused3
;
u32
__unused4
[
2
];
};
#endif
/* _ASM_PPC64_COMPAT_H */
#endif
/* _ASM_PPC64_COMPAT_H */
include/asm-ppc64/page.h
View file @
c8ec0450
...
@@ -48,7 +48,7 @@ static __inline__ void clear_page(void *addr)
...
@@ -48,7 +48,7 @@ static __inline__ void clear_page(void *addr)
lines
=
naca
->
dCacheL1LinesPerPage
;
lines
=
naca
->
dCacheL1LinesPerPage
;
__asm__
__volatile__
(
__asm__
__volatile__
(
" mtctr %1
\n
\
"mtctr %1 # clear_page
\n
\
1: dcbz 0,%0
\n
\
1: dcbz 0,%0
\n
\
add %0,%0,%3
\n
\
add %0,%0,%3
\n
\
bdnz+ 1b"
bdnz+ 1b"
...
...
include/asm-ppc64/pgtable.h
View file @
c8ec0450
...
@@ -267,8 +267,8 @@ static inline unsigned long pte_update( pte_t *p, unsigned long clr,
...
@@ -267,8 +267,8 @@ static inline unsigned long pte_update( pte_t *p, unsigned long clr,
{
{
unsigned
long
old
,
tmp
;
unsigned
long
old
,
tmp
;
__asm__
__volatile__
(
"
\n
\
__asm__
__volatile__
(
1: ldarx %0,0,%3
\n
\
"1: ldarx %0,0,%3 # pte_update
\n
\
andc %1,%0,%4
\n
\
andc %1,%0,%4
\n
\
or %1,%1,%5
\n
\
or %1,%1,%5
\n
\
stdcx. %1,0,%3
\n
\
stdcx. %1,0,%3
\n
\
...
...
include/asm-ppc64/ppc32.h
View file @
c8ec0450
...
@@ -44,19 +44,9 @@ typedef __kernel_fsid_t __kernel_fsid_t32;
...
@@ -44,19 +44,9 @@ typedef __kernel_fsid_t __kernel_fsid_t32;
})
})
/* These are here to support 32-bit syscalls on a 64-bit kernel. */
/* These are here to support 32-bit syscalls on a 64-bit kernel. */
typedef
int
__kernel_ptrdiff_t32
;
typedef
int
__kernel_clock_t32
;
typedef
int
__kernel_pid_t32
;
typedef
unsigned
short
__kernel_ipc_pid_t32
;
typedef
unsigned
short
__kernel_ipc_pid_t32
;
typedef
unsigned
int
__kernel_uid_t32
;
typedef
unsigned
int
__kernel_gid_t32
;
typedef
unsigned
int
__kernel_dev_t32
;
typedef
unsigned
int
__kernel_ino_t32
;
typedef
unsigned
int
__kernel_mode_t32
;
typedef
unsigned
int
__kernel_umode_t32
;
typedef
unsigned
int
__kernel_umode_t32
;
typedef
short
__kernel_nlink_t32
;
typedef
int
__kernel_daddr_t32
;
typedef
int
__kernel_daddr_t32
;
typedef
int
__kernel_off_t32
;
typedef
unsigned
int
__kernel_caddr_t32
;
typedef
unsigned
int
__kernel_caddr_t32
;
typedef
int
__kernel_loff_t32
;
typedef
int
__kernel_loff_t32
;
...
@@ -88,8 +78,8 @@ typedef struct siginfo32 {
...
@@ -88,8 +78,8 @@ typedef struct siginfo32 {
/* kill() */
/* kill() */
struct
{
struct
{
__kernel_pid_t32
_pid
;
/* sender's pid */
compat_pid_t
_pid
;
/* sender's pid */
__kernel_uid_t32
_uid
;
/* sender's uid */
compat_uid_t
_uid
;
/* sender's uid */
}
_kill
;
}
_kill
;
/* POSIX.1b timers */
/* POSIX.1b timers */
...
@@ -100,18 +90,18 @@ typedef struct siginfo32 {
...
@@ -100,18 +90,18 @@ typedef struct siginfo32 {
/* POSIX.1b signals */
/* POSIX.1b signals */
struct
{
struct
{
__kernel_pid_t32
_pid
;
/* sender's pid */
compat_pid_t
_pid
;
/* sender's pid */
__kernel_uid_t32
_uid
;
/* sender's uid */
compat_uid_t
_uid
;
/* sender's uid */
sigval_t32
_sigval
;
sigval_t32
_sigval
;
}
_rt
;
}
_rt
;
/* SIGCHLD */
/* SIGCHLD */
struct
{
struct
{
__kernel_pid_t32
_pid
;
/* which child */
compat_pid_t
_pid
;
/* which child */
__kernel_uid_t32
_uid
;
/* sender's uid */
compat_uid_t
_uid
;
/* sender's uid */
int
_status
;
/* exit code */
int
_status
;
/* exit code */
__kernel_clock_t32
_utime
;
compat_clock_t
_utime
;
__kernel_clock_t32
_stime
;
compat_clock_t
_stime
;
}
_sigchld
;
}
_sigchld
;
/* SIGILL, SIGFPE, SIGSEGV, SIGBUS, SIGEMT */
/* SIGILL, SIGFPE, SIGSEGV, SIGBUS, SIGEMT */
...
@@ -164,32 +154,12 @@ typedef struct sigaltstack_32 {
...
@@ -164,32 +154,12 @@ typedef struct sigaltstack_32 {
struct
flock32
{
struct
flock32
{
short
l_type
;
short
l_type
;
short
l_whence
;
short
l_whence
;
__kernel_off_t32
l_start
;
compat_off_t
l_start
;
__kernel_off_t32
l_len
;
compat_off_t
l_len
;
__kernel_pid_t32
l_pid
;
compat_pid_t
l_pid
;
short
__unused
;
short
__unused
;
};
};
struct
stat32
{
__kernel_dev_t32
st_dev
;
/* 2 */
__kernel_ino_t32
st_ino
;
/* 4 */
__kernel_mode_t32
st_mode
;
/* 2 */
short
st_nlink
;
/* 2 */
__kernel_uid_t32
st_uid
;
/* 2 */
__kernel_gid_t32
st_gid
;
/* 2 */
__kernel_dev_t32
st_rdev
;
/* 2 */
__kernel_off_t32
st_size
;
/* 4 */
__kernel_off_t32
st_blksize
;
/* 4 */
__kernel_off_t32
st_blocks
;
/* 4 */
compat_time_t
st_atime
;
/* 4 */
unsigned
int
__unused1
;
/* 4 */
compat_time_t
st_mtime
;
/* 4 */
unsigned
int
__unused2
;
/* 4 */
compat_time_t
st_ctime
;
/* 4 */
unsigned
int
__unused3
;
/* 4 */
unsigned
int
__unused4
[
2
];
/* 2*4 */
};
struct
sigcontext32
{
struct
sigcontext32
{
unsigned
int
_unused
[
4
];
unsigned
int
_unused
[
4
];
int
signal
;
int
signal
;
...
...
include/asm-ppc64/prom.h
View file @
c8ec0450
...
@@ -155,12 +155,6 @@ struct prom_args {
...
@@ -155,12 +155,6 @@ struct prom_args {
prom_arg_t
*
rets
;
/* Pointer to return values in args[16]. */
prom_arg_t
*
rets
;
/* Pointer to return values in args[16]. */
};
};
typedef
struct
{
u32
printf
;
/* void (*printf)(char *, ...); */
u32
memdump
;
/* void (*memdump)(unsigned char *, unsigned long); */
u32
dummy
;
/* void (*dummy)(void); */
}
yaboot_debug_t
;
struct
prom_t
{
struct
prom_t
{
unsigned
long
entry
;
unsigned
long
entry
;
ihandle
chosen
;
ihandle
chosen
;
...
@@ -171,9 +165,6 @@ struct prom_t {
...
@@ -171,9 +165,6 @@ struct prom_t {
unsigned
long
version
;
unsigned
long
version
;
unsigned
long
encode_phys_size
;
unsigned
long
encode_phys_size
;
struct
bi_record
*
bi_recs
;
struct
bi_record
*
bi_recs
;
#ifdef DEBUG_YABOOT
yaboot_debug_t
*
yaboot
;
#endif
};
};
extern
struct
prom_t
prom
;
extern
struct
prom_t
prom
;
...
@@ -183,7 +174,7 @@ extern int boot_cpuid;
...
@@ -183,7 +174,7 @@ extern int boot_cpuid;
/* Prototypes */
/* Prototypes */
extern
void
abort
(
void
);
extern
void
abort
(
void
);
extern
unsigned
long
prom_init
(
unsigned
long
,
unsigned
long
,
unsigned
long
,
extern
unsigned
long
prom_init
(
unsigned
long
,
unsigned
long
,
unsigned
long
,
unsigned
long
,
unsigned
long
,
yaboot_debug_t
*
);
unsigned
long
,
unsigned
long
);
extern
void
prom_print
(
const
char
*
msg
);
extern
void
prom_print
(
const
char
*
msg
);
extern
void
relocate_nodes
(
void
);
extern
void
relocate_nodes
(
void
);
extern
void
finish_device_tree
(
void
);
extern
void
finish_device_tree
(
void
);
...
...
include/asm-ppc64/smp.h
View file @
c8ec0450
...
@@ -52,7 +52,7 @@ static inline int num_online_cpus(void)
...
@@ -52,7 +52,7 @@ static inline int num_online_cpus(void)
return
nr
;
return
nr
;
}
}
extern
volatile
unsigned
long
cpu_callin_map
[
NR_CPUS
];
extern
volatile
unsigned
int
cpu_callin_map
[
NR_CPUS
];
#define smp_processor_id() (get_paca()->xPacaIndex)
#define smp_processor_id() (get_paca()->xPacaIndex)
...
...
include/asm-ppc64/tlb.h
View file @
c8ec0450
...
@@ -62,7 +62,7 @@ static inline void __tlb_remove_tlb_entry(mmu_gather_t *tlb, pte_t *ptep,
...
@@ -62,7 +62,7 @@ static inline void __tlb_remove_tlb_entry(mmu_gather_t *tlb, pte_t *ptep,
if
(
i
==
PPC64_TLB_BATCH_NR
)
{
if
(
i
==
PPC64_TLB_BATCH_NR
)
{
int
local
=
0
;
int
local
=
0
;
if
(
tlb
->
mm
->
cpu_vm_mask
==
(
1
<<
cpu
))
if
(
tlb
->
mm
->
cpu_vm_mask
==
(
1
UL
<<
cpu
))
local
=
1
;
local
=
1
;
flush_hash_range
(
tlb
->
mm
->
context
,
i
,
local
);
flush_hash_range
(
tlb
->
mm
->
context
,
i
,
local
);
...
@@ -80,7 +80,7 @@ static inline void tlb_flush(struct free_pte_ctx *tlb)
...
@@ -80,7 +80,7 @@ static inline void tlb_flush(struct free_pte_ctx *tlb)
struct
ppc64_tlb_batch
*
batch
=
&
ppc64_tlb_batch
[
cpu
];
struct
ppc64_tlb_batch
*
batch
=
&
ppc64_tlb_batch
[
cpu
];
int
local
=
0
;
int
local
=
0
;
if
(
tlb
->
mm
->
cpu_vm_mask
==
(
1
<<
smp_processor_id
()))
if
(
tlb
->
mm
->
cpu_vm_mask
==
(
1
UL
<<
smp_processor_id
()))
local
=
1
;
local
=
1
;
flush_hash_range
(
tlb
->
mm
->
context
,
batch
->
index
,
local
);
flush_hash_range
(
tlb
->
mm
->
context
,
batch
->
index
,
local
);
...
...
include/asm-ppc64/topology.h
View file @
c8ec0450
...
@@ -41,7 +41,7 @@ static inline unsigned long __node_to_cpu_mask(int node)
...
@@ -41,7 +41,7 @@ static inline unsigned long __node_to_cpu_mask(int node)
for
(
cpu
=
0
;
cpu
<
NR_CPUS
;
cpu
++
)
for
(
cpu
=
0
;
cpu
<
NR_CPUS
;
cpu
++
)
if
(
numa_cpu_lookup_table
[
cpu
]
==
node
)
if
(
numa_cpu_lookup_table
[
cpu
]
==
node
)
mask
|=
1
<<
cpu
;
mask
|=
1
UL
<<
cpu
;
return
mask
;
return
mask
;
}
}
...
...
arch/ppc64/kernel
/xics.h
→
include/asm-ppc64
/xics.h
View file @
c8ec0450
/*
/*
* arch/ppc/kernel/xics.h
* arch/ppc
64
/kernel/xics.h
*
*
* Copyright 2000 IBM Corporation.
* Copyright 2000 IBM Corporation.
*
*
...
@@ -9,14 +9,10 @@
...
@@ -9,14 +9,10 @@
* 2 of the License, or (at your option) any later version.
* 2 of the License, or (at your option) any later version.
*/
*/
#ifndef _PPC_KERNEL_XICS_H
#ifndef _PPC64_KERNEL_XICS_H
#define _PPC_KERNEL_XICS_H
#define _PPC64_KERNEL_XICS_H
extern
struct
hw_interrupt_type
xics_pic
;
extern
struct
hw_interrupt_type
xics_8259_pic
;
void
xics_init_IRQ
(
void
);
void
xics_init_IRQ
(
void
);
int
xics_get_irq
(
struct
pt_regs
*
);
int
xics_get_irq
(
struct
pt_regs
*
);
void
xics_isa_init
(
void
);
#endif
/* _PPC_KERNEL_XICS_H */
#endif
/* _PPC
64
_KERNEL_XICS_H */
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