Commit d6162f7e authored by Paul Mackerras's avatar Paul Mackerras

Merge samba.org:/home/paulus/kernel/linux-2.5

into samba.org:/home/paulus/kernel/for-linus-ppc
parents d0229603 ba3f8ae2
...@@ -1055,9 +1055,7 @@ ...@@ -1055,9 +1055,7 @@
Another common problem is deleting timers which restart Another common problem is deleting timers which restart
themselves (by calling <function>add_timer()</function> at the end themselves (by calling <function>add_timer()</function> at the end
of their timer function). Because this is a fairly common case of their timer function). Because this is a fairly common case
which is prone to races, you can put a call to which is prone to races, you should use <function>del_timer_sync()</function>
<function>timer_exit()</function> at the very end of your timer function,
and user <function>del_timer_sync()</function>
(<filename class=headerfile>include/linux/timer.h</filename>) (<filename class=headerfile>include/linux/timer.h</filename>)
to handle this case. It returns the number of times the timer to handle this case. It returns the number of times the timer
had to be deleted before we finally stopped it from adding itself back had to be deleted before we finally stopped it from adding itself back
......
...@@ -1175,7 +1175,7 @@ ide_map_buffer. ...@@ -1175,7 +1175,7 @@ ide_map_buffer.
8.12. Multiple block-size transfers for faster raw i/o (Shailabh Nagar, 8.12. Multiple block-size transfers for faster raw i/o (Shailabh Nagar,
Badari) Badari)
8.13 Priority based i/o scheduler - prepatches (Arjan van de Ven) 8.13 Priority based i/o scheduler - prepatches (Arjan van de Ven)
8.14 IDE Taskfile i/o patch (Andre Hedrik) 8.14 IDE Taskfile i/o patch (Andre Hedrick)
8.15 Multi-page writeout and readahead patches (Andrew Morton) 8.15 Multi-page writeout and readahead patches (Andrew Morton)
8.16 Direct i/o patches for 2.5 using kvec and bio (Badari Pulavarthy) 8.16 Direct i/o patches for 2.5 using kvec and bio (Badari Pulavarthy)
......
...@@ -41,6 +41,7 @@ ldd ...@@ -41,6 +41,7 @@ ldd
Debugging modules Debugging modules
The proc file system The proc file system
Starting points for debugging scripting languages etc. Starting points for debugging scripting languages etc.
Dumptool & Lcrash
SysRq SysRq
References References
Special Thanks Special Thanks
...@@ -237,10 +238,9 @@ they go to 64 Bit. ...@@ -237,10 +238,9 @@ they go to 64 Bit.
On 390 our limitations & strengths make us slightly different. On 390 our limitations & strengths make us slightly different.
For backward compatibility ( because of the psw address hi bit which For backward compatibility we are only allowed use 31 bits (2GB)
indicates whether we are in 31 or 64 bit mode ) we are only allowed of our 32 bit addresses,however, we use entirely separate address
use 31 bits (2GB) of our 32 bit addresses. However, spaces for the user & kernel.
we use entirely separate address spaces for the user & kernel.
This means we can support 2GB of non Extended RAM on s/390, & more This means we can support 2GB of non Extended RAM on s/390, & more
with the Extended memory managment swap device & with the Extended memory managment swap device &
...@@ -1288,14 +1288,10 @@ this can make debugging a particular process under VM painful under normal ...@@ -1288,14 +1288,10 @@ this can make debugging a particular process under VM painful under normal
circumstances as the process may change when doing a circumstances as the process may change when doing a
TR I R <address range>. TR I R <address range>.
Thankfully after reading VM's online help I figured out how to debug Thankfully after reading VM's online help I figured out how to debug
particular processes in 31 bit mode, however, according to the current I particular process.
VM online help documentation the method described below uses
TR STO or STD which don't currently work on z/Series while in
64-bit mode.
Your first problem is to find the STD ( segment table designation ) Your first problem is to find the STD ( segment table designation )
of the program you wish to debug. of the program you wish to debug.
There are several ways you can do this here are a few There are several ways you can do this here are a few
1) objdump --syms <program to be debugged> | grep main 1) objdump --syms <program to be debugged> | grep main
To get the address of main in the program. To get the address of main in the program.
...@@ -1475,12 +1471,6 @@ Now display what gpr2 is pointing to ...@@ -1475,12 +1471,6 @@ Now display what gpr2 is pointing to
D 00014CB4.20 D 00014CB4.20
V00014CB4 2F646576 2F636F6E 736F6C65 00001BF5 V00014CB4 2F646576 2F636F6E 736F6C65 00001BF5
V00014CC4 FC00014C B4001001 E0001000 B8070707 V00014CC4 FC00014C B4001001 E0001000 B8070707
Alternatively you can do the more elegant
D 0.20;BASE2
BASE2 telling VM to use GPR2 as the base register.
Now copy the text till the first 00 hex ( which is the end of the string Now copy the text till the first 00 hex ( which is the end of the string
to an xterm & do hex2ascii on it. to an xterm & do hex2ascii on it.
hex2ascii 2F646576 2F636F6E 736F6C65 00 hex2ascii 2F646576 2F636F6E 736F6C65 00
...@@ -1517,7 +1507,7 @@ int main(int argc,char *argv[]) ...@@ -1517,7 +1507,7 @@ int main(int argc,char *argv[])
c=c-'0'; c=c-'0';
if(c>='A'&&c<='F') if(c>='A'&&c<='F')
c=c-'A'+10; c=c-'A'+10;
if(c>='a'&&c<='F') if(c>='a'&&c<='f')
c=c-'a'+10; c=c-'a'+10;
switch(toggle) switch(toggle)
{ {
...@@ -2131,12 +2121,6 @@ now do ...@@ -2131,12 +2121,6 @@ now do
p/x (*(**$sp+56))&0x7fffffff p/x (*(**$sp+56))&0x7fffffff
& so on. & so on.
Another good trick to look at addresses on the stack if you've somehow lost
the backchain is.
x/500xa $sp
This displays anything the name of any known functions above the stack pointer
for 500 bytes.
Disassembling instructions without debug info Disassembling instructions without debug info
--------------------------------------------- ---------------------------------------------
gdb typically compains if there is a lack of debugging gdb typically compains if there is a lack of debugging
...@@ -2472,12 +2456,48 @@ jdb <filename> another fully interactive gdb style debugger. ...@@ -2472,12 +2456,48 @@ jdb <filename> another fully interactive gdb style debugger.
Dumptool & Lcrash ( lkcd )
==========================
Michael Holzheu & others here at IBM have a fairly mature port of
SGI's lcrash tool which allows one to look at kernel structures in a
running kernel.
It also complements a tool called dumptool which dumps all the kernels
memory pages & registers to either a tape or a disk.
This can be used by tech support or an ambitous end user do
post mortem debugging of a machine like gdb core dumps.
Going into how to use this tool in detail will be explained
in other documentation supplied by IBM with the patches & the
lcrash homepage http://oss.sgi.com/projects/lkcd/ & the lcrash manpage.
How they work
-------------
Lcrash is a perfectly normal program,however, it requires 2
additional files, Kerntypes which is built using a patch to the
linux kernel sources in the linux root directory & the System.map.
Kerntypes is an an objectfile whose sole purpose in life
is to provide stabs debug info to lcrash, to do this
Kerntypes is built from kerntypes.c which just includes the most commonly
referenced header files used when debugging, lcrash can then read the
.stabs section of this file.
Debugging a live system it uses /dev/mem
alternatively for post mortem debugging it uses the data
collected by dumptool.
SysRq SysRq
===== =====
This is now supported by linux for s/390 & z/Architecture. This is now supported by linux for s/390 & z/Architecture.
To enable it do compile the kernel with To enable it do compile the kernel with
Kernel Hacking -> Magic SysRq Key Enabled Kernel Hacking -> Magic SysRq Key Enabled
echo "1" > /proc/sys/kernel/sysrq. echo "1" > /proc/sys/kernel/sysrq
also type
echo "8" >/proc/sys/kernel/printk
To make printk output go to console.
On 390 all commands are prefixed with On 390 all commands are prefixed with
^- ^-
e.g. e.g.
...@@ -2513,4 +2533,4 @@ Special Thanks ...@@ -2513,4 +2533,4 @@ Special Thanks
Special thanks to Neale Ferguson who maintains a much Special thanks to Neale Ferguson who maintains a much
prettier HTML version of this page at prettier HTML version of this page at
http://penguinvm.princeton.edu/notes.html#Debug390 http://penguinvm.princeton.edu/notes.html#Debug390
Bob Grainger Stefan Bader & others for reporting bugs
This diff is collapsed.
This diff is collapsed.
S/390 driver model interfaces
-----------------------------
1. CCW devices
--------------
All devices which can be addressed by means of ccws are called 'CCW devices' -
even if they aren't actually driven by ccws.
All ccw devices are accessed via a subchannel, this is reflected in the
structures under root/:
root/
- sys
- legacy
- css0/
- 0:0000/0:0815/
- 0:0001/0:4711/
- 0:0002/
...
In this example, device 0815 is accessed via subchannel 0, device 4711 via
subchannel 1, and subchannel 2 is a non-I/O subchannel.
You should address a ccw device via its bus id (e.g. 0:4711); the device can
be found under bus/ccw/devices/.
All ccw devices export some data via sysfs additional to the standard 'name'
and 'power' entries.
cutype: The control unit type / model.
devtype: The device type / model, if applicable.
online: An interface to set the device online and offline.
The device drivers can add entries to export per-device data and interfaces.
There is also some data exported on a per-subchannel basis (see under
bus/css/devices/):
chpids: Via which chpids the device is connected.
pimpampom: The path installed, path available and path operational masks.
There also might be additional data, for example for block devices.
1.1 Bringing up a ccw device
----------------------------
This is done in several steps.
a. Some drivers need several ccw devices to make up one device. This drivers
provide a 'chaining' interface (driver dependend) which allows to specify
which ccw devices form a device.
b. Each driver provides one or more parameter interfaces where parameters can
be specified. These interfaces are also in the driver's responsibility.
c. After a. and b. have been performed, if neccessary, the device is finally
brought up via the 'online' interface.
1.2 Writing a driver for ccw devices
------------------------------------
The basic struct ccw_device and struct ccw_driver data structures can be found
under include/asm/ccwdev.h.
struct ccw_device {
spinlock_t *ccwlock;
struct ccw_device_private *private;
struct ccw_device_id id;
struct ccw_driver *drv;
struct device dev;
int online;
void (*handler) (struct ccw_device *dev, unsigned long intparm,
struct irb *irb);
};
struct ccw_driver {
struct module *owner;
struct ccw_device_id *ids;
int (*probe) (struct ccw_device *);
int (*remove) (struct ccw_device *);
void (*release) (struct ccw_driver *);
int (*set_online) (struct ccw_device *);
int (*set_offline) (struct ccw_device *);
struct device_driver driver;
char *name;
};
The 'private' field contains data needed for internal i/o operation only, and
is not available to the device driver.
Each driver should declare in a MODULE_DEVICE_TABLE into which CU types/models
and/or device types/models it is interested. This information can later be found
found in the struct ccw_device_id fields:
struct ccw_device_id {
__u16 match_flags;
__u16 cu_type;
__u16 dev_type;
__u8 cu_model;
__u8 dev_model;
unsigned long driver_info;
};
The functions in ccw_driver should be used in the following way:
probe: This function is called by the device layer for each device the driver
is interested in. The driver should only allocate private structures
to put in dev->driver_data and create attributes (if needed). Also,
the interrupt handler (see below) should be set here.
int (*probe) (struct ccw_device *cdev);
Parameters: cdev - the device to be probed.
remove: This function is called by the device layer upon removal of the driver,
the device or the module. The driver should perform cleanups here.
int (*remove) (struct ccw_device *cdev);
Parameters: cdev - the device to be removed.
set_online: This function is called by the common I/O layer when the device is
activated via the 'online' attribute. The driver should finally
setup and activate the device here.
int (*set_online) (struct ccw_device *);
Parameters: cdev - the device to be activated. The common layer has
verified that the device is not already online.
set_offline: This function is called by the common I/O layer when the device is
de-activated via the 'online' attribute. The driver should shut
down the device, but not de-allocate its private data.
int (*set_offline) (struct ccw_device *);
Parameters: cdev - the device to be deactivated. The common layer has
verified that the device is online.
The handler field of the struct ccw_device is meant to be set to the interrupt
handler for the device. In order to accomodate drivers which use several
distinct handlers (e.g. multi subchannel devices), this is a member of ccw_device
instead of ccw_driver.
The handler is registered with the common layer during set_online() processing
before the driver is called, and is deregistered during set_offline() after the
driver has been called. Also, after registering / before deregistering, path
grouping resp. disbanding of the path group (if applicable) are performed.
void (*handler) (struct ccw_device *dev, unsigned long intparm, struct irb *irb);
Parameters: dev - the device the handler is called for
intparm - the intparm which allows the device driver to identify
the i/o the interrupt is associated with, or to recognize
the interrupt as unsolicited.
irb - interruption response block which contains the accumulated
status.
The device driver is called from the common ccw_device layer and can retrieve
information about the interrupt from the irb parameter.
2. System devices
-----------------
2.1 Channel paths
-----------------
Every channel path is represented under sys/ as channel_path<nr>. (Unfortunately,
<nr> is in decimal, which may look unfamiliar.)
status - Can be 'online', 'logically offline' or 'n/a'.
Piping 'on' or 'off' sets the chpid logically online/offline.
2.2 xpram
---------
xpram shows up under sys/ as 'xpram'.
3. 'Legacy' devices
-------------------
The 'legacy' bus is for devices not detected, but specified by the user.
3.1 Netiucv
-----------
Netiucv connections show up under legacy/ as "netiucv<ifnum>". The interface
number is assigned sequentially at module load.
user - the user the connection goes to.
buffer - maximum buffer size.
Pipe to it to change buffer size.
...@@ -789,8 +789,6 @@ endmenu ...@@ -789,8 +789,6 @@ endmenu
menu "Power management options (ACPI, APM)" menu "Power management options (ACPI, APM)"
source "drivers/acpi/Kconfig"
config PM config PM
bool "Power Management support" bool "Power Management support"
---help--- ---help---
...@@ -811,6 +809,37 @@ config PM ...@@ -811,6 +809,37 @@ config PM
will issue the hlt instruction if nothing is to be done, thereby will issue the hlt instruction if nothing is to be done, thereby
sending the processor to sleep and saving power. sending the processor to sleep and saving power.
config SOFTWARE_SUSPEND
bool "Software Suspend (EXPERIMENTAL)"
depends on EXPERIMENTAL && PM
---help---
Enable the possibilty of suspendig machine. It doesn't need APM.
You may suspend your machine by 'swsusp' or 'shutdown -z <time>'
(patch for sysvinit needed).
It creates an image which is saved in your active swaps. By the next
booting the, pass 'resume=/path/to/your/swap/file' and kernel will
detect the saved image, restore the memory from
it and then it continues to run as before you've suspended.
If you don't want the previous state to continue use the 'noresume'
kernel option. However note that your partitions will be fsck'd and
you must re-mkswap your swap partitions/files.
Right now you may boot without resuming and then later resume but
in meantime you cannot use those swap partitions/files which were
involved in suspending. Also in this case there is a risk that buffers
on disk won't match with saved ones.
SMP is supported ``as-is''. There's a code for it but doesn't work.
There have been problems reported relating SCSI.
This option is about getting stable. However there is still some
absence of features.
For more information take a look at Documentation/swsusp.txt.
source "drivers/acpi/Kconfig"
config APM config APM
tristate "Advanced Power Management BIOS support" tristate "Advanced Power Management BIOS support"
depends on PM depends on PM
...@@ -1516,35 +1545,6 @@ source "arch/i386/oprofile/Kconfig" ...@@ -1516,35 +1545,6 @@ source "arch/i386/oprofile/Kconfig"
menu "Kernel hacking" menu "Kernel hacking"
config SOFTWARE_SUSPEND
bool "Software Suspend (EXPERIMENTAL)"
depends on EXPERIMENTAL && PM
---help---
Enable the possibilty of suspendig machine. It doesn't need APM.
You may suspend your machine by 'swsusp' or 'shutdown -z <time>'
(patch for sysvinit needed).
It creates an image which is saved in your active swaps. By the next
booting the, pass 'resume=/path/to/your/swap/file' and kernel will
detect the saved image, restore the memory from
it and then it continues to run as before you've suspended.
If you don't want the previous state to continue use the 'noresume'
kernel option. However note that your partitions will be fsck'd and
you must re-mkswap your swap partitions/files.
Right now you may boot without resuming and then later resume but
in meantime you cannot use those swap partitions/files which were
involved in suspending. Also in this case there is a risk that buffers
on disk won't match with saved ones.
SMP is supported ``as-is''. There's a code for it but doesn't work.
There have been problems reported relating SCSI.
This option is about getting stable. However there is still some
absence of features.
For more information take a look at Documentation/swsusp.txt.
config DEBUG_KERNEL config DEBUG_KERNEL
bool "Kernel debugging" bool "Kernel debugging"
help help
......
...@@ -446,72 +446,19 @@ acpi_boot_init ( ...@@ -446,72 +446,19 @@ acpi_boot_init (
#ifdef CONFIG_ACPI_SLEEP #ifdef CONFIG_ACPI_SLEEP
#define DEBUG
#ifdef DEBUG
#include <linux/serial.h>
#endif
/* address in low memory of the wakeup routine. */ /* address in low memory of the wakeup routine. */
unsigned long acpi_wakeup_address = 0; unsigned long acpi_wakeup_address = 0;
/* new page directory that we will be using */
static pmd_t *pmd;
/* saved page directory */
static pmd_t saved_pmd;
/* page which we'll use for the new page directory */
static pte_t *ptep;
extern unsigned long FASTCALL(acpi_copy_wakeup_routine(unsigned long)); extern unsigned long FASTCALL(acpi_copy_wakeup_routine(unsigned long));
/* static void init_low_mapping(pgd_t *pgd, int pgd_ofs, int pgd_limit)
* acpi_create_identity_pmd
*
* Create a new, identity mapped pmd.
*
* Do this by creating new page directory, and marking all the pages as R/W
* Then set it as the new Page Middle Directory.
* And, of course, flush the TLB so it takes effect.
*
* We save the address of the old one, for later restoration.
*/
static void acpi_create_identity_pmd (void)
{ {
pgd_t *pgd; int pgd_ofs = 0;
int i;
ptep = (pte_t*)__get_free_page(GFP_KERNEL);
/* fill page with low mapping */
for (i = 0; i < PTRS_PER_PTE; i++)
set_pte(ptep + i, pfn_pte(i, PAGE_SHARED));
pgd = pgd_offset(current->active_mm, 0); while ((pgd_ofs < pgd_limit) && (pgd_ofs + USER_PTRS_PER_PGD < PTRS_PER_PGD)) {
pmd = pmd_alloc(current->mm,pgd, 0); set_pgd(pgd, *(pgd+USER_PTRS_PER_PGD));
pgd_ofs++, pgd++;
/* save the old pmd */ }
saved_pmd = *pmd;
/* set the new one */
set_pmd(pmd, __pmd(_PAGE_TABLE + __pa(ptep)));
/* flush the TLB */
local_flush_tlb();
}
/*
* acpi_restore_pmd
*
* Restore the old pmd saved by acpi_create_identity_pmd and
* free the page that said function alloc'd
*/
static void acpi_restore_pmd (void)
{
set_pmd(pmd, saved_pmd);
local_flush_tlb();
free_page((unsigned long)ptep);
} }
/** /**
...@@ -522,7 +469,11 @@ static void acpi_restore_pmd (void) ...@@ -522,7 +469,11 @@ static void acpi_restore_pmd (void)
*/ */
int acpi_save_state_mem (void) int acpi_save_state_mem (void)
{ {
acpi_create_identity_pmd(); #if CONFIG_X86_PAE
panic("S3 and PAE do not like each other for now.");
return 1;
#endif
init_low_mapping(swapper_pg_dir, 0, USER_PTRS_PER_PGD);
acpi_copy_wakeup_routine(acpi_wakeup_address); acpi_copy_wakeup_routine(acpi_wakeup_address);
return 0; return 0;
...@@ -542,7 +493,7 @@ int acpi_save_state_disk (void) ...@@ -542,7 +493,7 @@ int acpi_save_state_disk (void)
*/ */
void acpi_restore_state_mem (void) void acpi_restore_state_mem (void)
{ {
acpi_restore_pmd(); zap_low_mappings();
} }
/** /**
...@@ -555,7 +506,10 @@ void acpi_restore_state_mem (void) ...@@ -555,7 +506,10 @@ void acpi_restore_state_mem (void)
*/ */
void __init acpi_reserve_bootmem(void) void __init acpi_reserve_bootmem(void)
{ {
extern char wakeup_start, wakeup_end;
acpi_wakeup_address = (unsigned long)alloc_bootmem_low(PAGE_SIZE); acpi_wakeup_address = (unsigned long)alloc_bootmem_low(PAGE_SIZE);
if ((&wakeup_end - &wakeup_start) > PAGE_SIZE)
printk(KERN_CRIT "ACPI: Wakeup code way too big, will crash on attempt to suspend\n");
printk(KERN_DEBUG "ACPI: have wakeup address 0x%8.8lx\n", acpi_wakeup_address); printk(KERN_DEBUG "ACPI: have wakeup address 0x%8.8lx\n", acpi_wakeup_address);
} }
......
.text .text
#include <linux/linkage.h> #include <linux/linkage.h>
#include <asm/segment.h> #include <asm/segment.h>
#include <asm/page.h>
# Do we need to deal with A20? #
# wakeup_code runs in real mode, and at unknown address (determined at run-time).
# Therefore it must only use relative jumps/calls.
#
# Do we need to deal with A20? It is okay: ACPI specs says A20 must be enabled
#
# If physical address of wakeup_code is 0x12345, BIOS should call us with
# cs = 0x1234, eip = 0x05
#
ALIGN ALIGN
wakeup_start: .align 4096
ENTRY(wakeup_start)
wakeup_code: wakeup_code:
wakeup_code_start = . wakeup_code_start = .
.code16 .code16
...@@ -14,49 +23,70 @@ wakeup_code: ...@@ -14,49 +23,70 @@ wakeup_code:
movw $0xb800, %ax movw $0xb800, %ax
movw %ax,%fs movw %ax,%fs
movw $0x0e00 + 'L', %fs:(0x10) movw $0x0e00 + 'L', %fs:(0x10)
cli cli
cld cld
# setup data segment # setup data segment
movw %cs, %ax movw %cs, %ax
movw %ax, %ds # Make ds:0 point to wakeup_start
addw $(wakeup_data - wakeup_code) >> 4, %ax
movw %ax, %ds
movw %ax, %ss movw %ax, %ss
mov $(wakeup_stack - wakeup_data), %sp # Private stack is needed for ASUS board mov wakeup_stack - wakeup_code, %sp # Private stack is needed for ASUS board
movw $0x0e00 + 'S', %fs:(0x12) movw $0x0e00 + 'S', %fs:(0x12)
movl real_magic - wakeup_data, %eax pushl $0 # Kill any dangerous flags
popfl
movl real_magic - wakeup_code, %eax
cmpl $0x12345678, %eax cmpl $0x12345678, %eax
jne bogus_real_magic jne bogus_real_magic
mov video_mode - wakeup_data, %ax #if 1
lcall $0xc000,$3
#endif
#if 0
mov video_mode - wakeup_code, %ax
call mode_set call mode_set
#endif
# set up page table # set up page table
#if 1
movl $swapper_pg_dir-__PAGE_OFFSET, %eax
#else
movl (real_save_cr3 - wakeup_data), %eax movl (real_save_cr3 - wakeup_data), %eax
#endif
movl %eax, %cr3 movl %eax, %cr3
# make sure %cr4 is set correctly (features, etc) # make sure %cr4 is set correctly (features, etc)
movl (real_save_cr4 - wakeup_data), %eax movl real_save_cr4 - wakeup_code, %eax
movl %eax, %cr4 movl %eax, %cr4
movw $0xb800, %ax movw $0xb800, %ax
movw %ax,%fs movw %ax,%fs
movw $0x0e00 + 'i', %fs:(0x12) movw $0x0e00 + 'i', %fs:(0x12)
# need a gdt # need a gdt
lgdt real_save_gdt - wakeup_data lgdt real_save_gdt - wakeup_code
movl (real_save_cr0 - wakeup_data), %eax movl real_save_cr0 - wakeup_code, %eax
movl %eax, %cr0 movl %eax, %cr0
jmp 1f
1:
movw $0x0e00 + 'n', %fs:(0x14) movw $0x0e00 + 'n', %fs:(0x14)
movl real_magic - wakeup_data, %eax movl real_magic - wakeup_code, %eax
cmpl $0x12345678, %eax cmpl $0x12345678, %eax
jne bogus_real_magic jne bogus_real_magic
ljmpl $__KERNEL_CS,$wakeup_pmode_return ljmpl $__KERNEL_CS,$wakeup_pmode_return
real_save_gdt: .word 0
.long 0
real_save_cr0: .long 0
real_save_cr3: .long 0
real_save_cr4: .long 0
real_magic: .long 0
video_mode: .long 0
bogus_real_magic: bogus_real_magic:
movw $0x0e00 + 'B', %fs:(0x12) movw $0x0e00 + 'B', %fs:(0x12)
jmp bogus_real_magic jmp bogus_real_magic
...@@ -129,20 +159,12 @@ _setbad: jmp setbad ...@@ -129,20 +159,12 @@ _setbad: jmp setbad
.code32 .code32
ALIGN ALIGN
.org 0x300
wakeup_data:
.word 0
real_save_gdt: .word 0
.long 0
real_save_cr0: .long 0
real_save_cr3: .long 0
real_save_cr4: .long 0
real_magic: .long 0
video_mode: .long 0
.org 0x500 .org 0x2000
wakeup_stack: wakeup_stack:
wakeup_end: .org 0x3000
ENTRY(wakeup_end)
.org 0x4000
wakeup_pmode_return: wakeup_pmode_return:
movl $__KERNEL_DS, %eax movl $__KERNEL_DS, %eax
...@@ -205,7 +227,6 @@ bogus_magic2: ...@@ -205,7 +227,6 @@ bogus_magic2:
movw $0x0e00 + '2', %ds:(0xb8018) movw $0x0e00 + '2', %ds:(0xb8018)
jmp bogus_magic2 jmp bogus_magic2
## ##
# acpi_copy_wakeup_routine # acpi_copy_wakeup_routine
# #
...@@ -228,7 +249,7 @@ ENTRY(acpi_copy_wakeup_routine) ...@@ -228,7 +249,7 @@ ENTRY(acpi_copy_wakeup_routine)
movl %eax, %edi movl %eax, %edi
leal wakeup_start, %esi leal wakeup_start, %esi
movl $(wakeup_end - wakeup_start) >> 2, %ecx movl $(wakeup_end - wakeup_start + 3) >> 2, %ecx
rep ; movsl rep ; movsl
...@@ -290,8 +311,8 @@ ENTRY(do_suspend_lowlevel) ...@@ -290,8 +311,8 @@ ENTRY(do_suspend_lowlevel)
ret ret
.p2align 4,,7 .p2align 4,,7
.L1432: .L1432:
movl $104,%eax movl $__KERNEL_DS,%eax
movw %eax, %ds movw %ax, %ds
movl saved_context_esp, %esp movl saved_context_esp, %esp
movl saved_context_ebp, %ebp movl saved_context_ebp, %ebp
movl saved_context_eax, %eax movl saved_context_eax, %eax
...@@ -310,5 +331,4 @@ saved_gdt: .long 0,0 ...@@ -310,5 +331,4 @@ saved_gdt: .long 0,0
saved_idt: .long 0,0 saved_idt: .long 0,0
saved_ldt: .long 0 saved_ldt: .long 0
saved_tss: .long 0 saved_tss: .long 0
saved_cr0: .long 0
...@@ -3,8 +3,9 @@ ...@@ -3,8 +3,9 @@
#include <linux/string.h> #include <linux/string.h>
#include <linux/bitops.h> #include <linux/bitops.h>
#include <linux/smp.h> #include <linux/smp.h>
#include <linux/thread_info.h>
#include <asm/processor.h> #include <asm/processor.h>
#include <asm/thread_info.h>
#include <asm/msr.h> #include <asm/msr.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
......
...@@ -7,9 +7,10 @@ ...@@ -7,9 +7,10 @@
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/config.h> #include <linux/config.h>
#include <linux/smp.h> #include <linux/smp.h>
#include <linux/thread_info.h>
#include <asm/processor.h> #include <asm/processor.h>
#include <asm/system.h> #include <asm/system.h>
#include <asm/thread_info.h>
#include "mce.h" #include "mce.h"
......
...@@ -698,10 +698,9 @@ edd_match_scsidev(struct edd_device *edev, struct scsi_device *sd) ...@@ -698,10 +698,9 @@ edd_match_scsidev(struct edd_device *edev, struct scsi_device *sd)
static struct scsi_device * static struct scsi_device *
edd_find_matching_scsi_device(struct edd_device *edev) edd_find_matching_scsi_device(struct edd_device *edev)
{ {
struct list_head *shost_node, *sdev_node; struct list_head *sdev_node;
int rc = 1; int rc = 1;
struct scsi_device *sd = NULL; struct scsi_device *sd = NULL;
struct device *shost_dev, *sdev_dev;
struct pci_dev *pci_dev; struct pci_dev *pci_dev;
rc = edd_dev_is_type(edev, "SCSI"); rc = edd_dev_is_type(edev, "SCSI");
...@@ -714,12 +713,8 @@ edd_find_matching_scsi_device(struct edd_device *edev) ...@@ -714,12 +713,8 @@ edd_find_matching_scsi_device(struct edd_device *edev)
get_device(&pci_dev->dev); get_device(&pci_dev->dev);
list_for_each(shost_node, &pci_dev->dev.children) { list_for_each(sdev_node, &pci_dev->dev.children) {
shost_dev = children_to_dev(shost_node); struct device *sdev_dev = children_to_dev(sdev_node);
get_device(shost_dev);
list_for_each(sdev_node, &shost_dev->children) {
sdev_dev = children_to_dev(sdev_node);
get_device(sdev_dev); get_device(sdev_dev);
sd = to_scsi_device(sdev_dev); sd = to_scsi_device(sdev_dev);
rc = edd_match_scsidev(edev, sd); rc = edd_match_scsidev(edev, sd);
...@@ -727,15 +722,9 @@ edd_find_matching_scsi_device(struct edd_device *edev) ...@@ -727,15 +722,9 @@ edd_find_matching_scsi_device(struct edd_device *edev)
if (!rc) if (!rc)
break; break;
} }
put_device(shost_dev);
if (!rc)
break;
}
put_device(&pci_dev->dev); put_device(&pci_dev->dev);
if (!rc) return rc ? NULL : sd;
return sd;
return NULL;
} }
static int static int
......
...@@ -484,7 +484,7 @@ ENTRY(spurious_interrupt_bug) ...@@ -484,7 +484,7 @@ ENTRY(spurious_interrupt_bug)
.data .data
ENTRY(sys_call_table) ENTRY(sys_call_table)
.long sys_ni_syscall /* 0 - old "setup()" system call*/ .long sys_restart_syscall /* 0 - old "setup()" system call, used for restarting */
.long sys_exit .long sys_exit
.long sys_fork .long sys_fork
.long sys_read .long sys_read
......
/* /*
* linux/arch/i386/head.S -- the 32-bit startup code. * linux/arch/i386/kernel/head.S -- the 32-bit startup code.
* *
* Copyright (C) 1991, 1992 Linus Torvalds * Copyright (C) 1991, 1992 Linus Torvalds
* *
......
...@@ -139,6 +139,7 @@ static int __init microcode_init(void) ...@@ -139,6 +139,7 @@ static int __init microcode_init(void)
&microcode_fops, NULL); &microcode_fops, NULL);
if (devfs_handle == NULL && error) { if (devfs_handle == NULL && error) {
printk(KERN_ERR "microcode: failed to devfs_register()\n"); printk(KERN_ERR "microcode: failed to devfs_register()\n");
misc_deregister(&microcode_dev);
goto out; goto out;
} }
error = 0; error = 0;
......
...@@ -506,6 +506,8 @@ handle_signal(unsigned long sig, siginfo_t *info, sigset_t *oldset, ...@@ -506,6 +506,8 @@ handle_signal(unsigned long sig, siginfo_t *info, sigset_t *oldset,
if (regs->orig_eax >= 0) { if (regs->orig_eax >= 0) {
/* If so, check system call restarting.. */ /* If so, check system call restarting.. */
switch (regs->eax) { switch (regs->eax) {
case -ERESTART_RESTARTBLOCK:
current_thread_info()->restart_block.fn = do_no_restart_syscall;
case -ERESTARTNOHAND: case -ERESTARTNOHAND:
regs->eax = -EINTR; regs->eax = -EINTR;
break; break;
...@@ -591,6 +593,10 @@ int do_signal(struct pt_regs *regs, sigset_t *oldset) ...@@ -591,6 +593,10 @@ int do_signal(struct pt_regs *regs, sigset_t *oldset)
regs->eax = regs->orig_eax; regs->eax = regs->orig_eax;
regs->eip -= 2; regs->eip -= 2;
} }
if (regs->eax == -ERESTART_RESTARTBLOCK){
regs->eax = __NR_restart_syscall;
regs->eip -= 2;
}
} }
return 0; return 0;
} }
......
...@@ -125,10 +125,3 @@ void fix_processor_context(void) ...@@ -125,10 +125,3 @@ void fix_processor_context(void)
} }
} }
#ifdef CONFIG_SOFTWARE_SUSPEND
/* Local variables for do_magic */
int loop __nosavedata = 0;
int loop2 __nosavedata = 0;
#endif
.text .text
/* Originally gcc generated, modified by hand */
#include <linux/linkage.h> #include <linux/linkage.h>
#include <asm/segment.h> #include <asm/segment.h>
#include <asm/page.h> #include <asm/page.h>
...@@ -78,3 +81,11 @@ ENTRY(do_magic): ...@@ -78,3 +81,11 @@ ENTRY(do_magic):
.L1449: .L1449:
popl %ebx popl %ebx
ret ret
.section .data.nosave
loop:
.quad 0
loop2:
.quad 0
.previous
\ No newline at end of file
...@@ -299,7 +299,7 @@ static void __init pagetable_init (void) ...@@ -299,7 +299,7 @@ static void __init pagetable_init (void)
#endif #endif
} }
void __init zap_low_mappings (void) void zap_low_mappings (void)
{ {
int i; int i;
/* /*
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
#include <linux/smp.h> #include <linux/smp.h>
#include <linux/oprofile.h> #include <linux/oprofile.h>
#include <linux/pm.h> #include <linux/pm.h>
#include <asm/thread_info.h> #include <linux/thread_info.h>
#include <asm/nmi.h> #include <asm/nmi.h>
#include <asm/ptrace.h> #include <asm/ptrace.h>
#include <asm/msr.h> #include <asm/msr.h>
......
...@@ -42,7 +42,7 @@ MODEL := $(model-y) ...@@ -42,7 +42,7 @@ MODEL := $(model-y)
# #
# Some code support is grouped together for a common cpu-subclass (for # Some code support is grouped together for a common cpu-subclass (for
# example all ColdFire cpu's are very similar). Determine the sub-class # example all ColdFire cpu's are very similar). Determine the sub-class
# for the selected cpu. ONLY need to define this for the non-core member # for the selected cpu. ONLY need to define this for the non-base member
# of the family. # of the family.
# #
cpuclass-$(CONFIG_M5206) := 5307 cpuclass-$(CONFIG_M5206) := 5307
...@@ -53,7 +53,10 @@ cpuclass-$(CONFIG_M5407) := 5307 ...@@ -53,7 +53,10 @@ cpuclass-$(CONFIG_M5407) := 5307
cpuclass-$(CONFIG_M68EZ328) := 68328 cpuclass-$(CONFIG_M68EZ328) := 68328
cpuclass-$(CONFIG_M68VZ328) := 68328 cpuclass-$(CONFIG_M68VZ328) := 68328
CPUCLASS := $(cpuclass-y) CPUCLASS := $(cpuclass-y)
ifneq ($(CPUCLASS),)
CLASSDIR := arch/m68knommu/platform/$(cpuclass-y)/ CLASSDIR := arch/m68knommu/platform/$(cpuclass-y)/
endif
export PLATFORM BOARD MODEL CPUCLASS export PLATFORM BOARD MODEL CPUCLASS
...@@ -79,9 +82,11 @@ CFLAGS += -O2 -g ...@@ -79,9 +82,11 @@ CFLAGS += -O2 -g
CFLAGS += -D__linux__ CFLAGS += -D__linux__
CFLAGS += -DUTS_SYSNAME=\"uClinux\" CFLAGS += -DUTS_SYSNAME=\"uClinux\"
LDFLAGS_BLOB := --format binary --oformat elf32-m68k
HEAD := arch/m68knommu/platform/$(platform-y)/$(board-y)/crt0_$(model-y).o HEAD := arch/m68knommu/platform/$(platform-y)/$(board-y)/crt0_$(model-y).o
clean-files := include/asm-$(ARCH)/asm-offsets.h.tmp \ CLEAN_FILES := include/asm-$(ARCH)/asm-offsets.h.tmp \
include/asm-$(ARCH)/asm-offsets.h \ include/asm-$(ARCH)/asm-offsets.h \
arch/$(ARCH)/kernel/asm-offsets.s arch/$(ARCH)/kernel/asm-offsets.s
......
...@@ -32,6 +32,9 @@ int main(void) ...@@ -32,6 +32,9 @@ int main(void)
DEFINE(TASK_MM, offsetof(struct task_struct, mm)); DEFINE(TASK_MM, offsetof(struct task_struct, mm));
DEFINE(TASK_ACTIVE_MM, offsetof(struct task_struct, active_mm)); DEFINE(TASK_ACTIVE_MM, offsetof(struct task_struct, active_mm));
/* offsets into the kernel_stat struct */
DEFINE(STAT_IRQ, offsetof(struct kernel_stat, irqs));
/* offsets into the irq_cpustat_t struct */ /* offsets into the irq_cpustat_t struct */
DEFINE(CPUSTAT_SOFTIRQ_PENDING, offsetof(irq_cpustat_t, __softirq_pending)); DEFINE(CPUSTAT_SOFTIRQ_PENDING, offsetof(irq_cpustat_t, __softirq_pending));
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
#include <asm/current.h> #include <asm/current.h>
extern void dump_thread(struct pt_regs *, struct user *); extern void dump_thread(struct pt_regs *, struct user *);
extern int dump_fpu(elf_fpregset_t *); extern int dump_fpu(struct pt_regs *, elf_fpregset_t *);
/* platform dependent support */ /* platform dependent support */
......
...@@ -145,10 +145,10 @@ ENTRY(sys_call_table) ...@@ -145,10 +145,10 @@ ENTRY(sys_call_table)
.long sys_adjtimex .long sys_adjtimex
.long sys_ni_syscall /* 125 */ /* sys_mprotect */ .long sys_ni_syscall /* 125 */ /* sys_mprotect */
.long sys_sigprocmask .long sys_sigprocmask
.long sys_create_module .long sys_ni_syscall /* old "creat_module" */
.long sys_init_module .long sys_init_module
.long sys_delete_module .long sys_delete_module
.long sys_get_kernel_syms /* 130 */ .long sys_ni_syscall /* 130: old "get_kernel_syms" */
.long sys_quotactl .long sys_quotactl
.long sys_getpgid .long sys_getpgid
.long sys_fchdir .long sys_fchdir
...@@ -185,9 +185,9 @@ ENTRY(sys_call_table) ...@@ -185,9 +185,9 @@ ENTRY(sys_call_table)
.long sys_setresuid16 .long sys_setresuid16
.long sys_getresuid16 /* 165 */ .long sys_getresuid16 /* 165 */
.long sys_ni_syscall /* for vm86 */ .long sys_ni_syscall /* for vm86 */
.long sys_query_module .long sys_ni_syscall /* old "query_module" */
.long sys_poll .long sys_poll
.long sys_ni_syscall /*sys_nfsservctl*/ .long sys_ni_syscall /* sys_nfsservctl */
.long sys_setresgid16 /* 170 */ .long sys_setresgid16 /* 170 */
.long sys_getresgid16 .long sys_getresgid16
.long sys_prctl .long sys_prctl
...@@ -236,7 +236,7 @@ ENTRY(sys_call_table) ...@@ -236,7 +236,7 @@ ENTRY(sys_call_table)
.long sys_setfsuid /* 215 */ .long sys_setfsuid /* 215 */
.long sys_setfsgid .long sys_setfsgid
.long sys_pivot_root .long sys_pivot_root
.long sys_mincore .long sys_ni_syscall /* sys_mincore */
.long sys_ni_syscall /* sys_madvise */ .long sys_ni_syscall /* sys_madvise */
.long sys_getdents64 /* 220 */ .long sys_getdents64 /* 220 */
.long sys_fcntl64 .long sys_fcntl64
......
...@@ -7,7 +7,7 @@ obj-$(CONFIG_M68EZ328) += entry.o ints.o ...@@ -7,7 +7,7 @@ obj-$(CONFIG_M68EZ328) += entry.o ints.o
obj-$(CONFIG_M68VZ328) += entry.o ints.o obj-$(CONFIG_M68VZ328) += entry.o ints.o
ifeq ($(CONFIG_M68328),y) ifeq ($(CONFIG_M68328),y)
EXTRA_TARGETS := $(BOARD)/bootlogo.rh $(BOARD/crt0_$(MODEL).o EXTRA_TARGETS := $(BOARD)/bootlogo.rh $(BOARD)/crt0_$(MODEL).o
endif endif
include $(TOPDIR)/Rules.make include $(TOPDIR)/Rules.make
......
...@@ -287,11 +287,15 @@ source "fs/Kconfig" ...@@ -287,11 +287,15 @@ source "fs/Kconfig"
menu "Kernel hacking" menu "Kernel hacking"
#if [ "$CONFIG_CTC" = "y" ]; then config DEBUG_KERNEL
# bool 'Remote GDB kernel debugging' CONFIG_REMOTE_DEBUG bool "Kernel debugging"
#fi help
Say Y here if you are developing drivers or trying to debug and
identify kernel problems.
config MAGIC_SYSRQ config MAGIC_SYSRQ
bool "Magic SysRq key" bool "Magic SysRq key"
depends on DEBUG_KERNEL
help help
If you say Y here, you will have some control over the system even If you say Y here, you will have some control over the system even
if the system crashes for example during kernel debugging (e.g., you if the system crashes for example during kernel debugging (e.g., you
...@@ -303,6 +307,28 @@ config MAGIC_SYSRQ ...@@ -303,6 +307,28 @@ config MAGIC_SYSRQ
keys are documented in <file:Documentation/sysrq.txt>. Don't say Y keys are documented in <file:Documentation/sysrq.txt>. Don't say Y
unless you really know what this hack does. unless you really know what this hack does.
config DEBUG_SLAB
bool "Debug memory allocations"
depends on DEBUG_KERNEL
help
Say Y here to have the kernel do limited verification on memory
allocation as well as poisoning memory on free to catch use of freed
memory.
config KALLSYMS
bool "Load all symbols for debugging/kksymoops"
depends on DEBUG_KERNEL
help
Say Y here to let the kernel print out symbolic crash information and
symbolic stack backtraces. This increases the size of the kernel
somewhat, as all symbols have to be loaded into the kernel image.
config DEBUG_SPINLOCK_SLEEP
bool "Sleep-inside-spinlock checking"
help
If you say Y here, various routines which may sleep will become very
noisy if they are called with a spinlock held.
endmenu endmenu
source "security/Kconfig" source "security/Kconfig"
......
...@@ -11,7 +11,6 @@ CONFIG_ARCH_S390=y ...@@ -11,7 +11,6 @@ CONFIG_ARCH_S390=y
# Code maturity level options # Code maturity level options
# #
CONFIG_EXPERIMENTAL=y CONFIG_EXPERIMENTAL=y
CONFIG_CONFIDENTIAL=y
# #
# General setup # General setup
...@@ -80,6 +79,7 @@ CONFIG_BLK_DEV_XPRAM=m ...@@ -80,6 +79,7 @@ CONFIG_BLK_DEV_XPRAM=m
# S/390 block device drivers # S/390 block device drivers
# #
CONFIG_DASD=y CONFIG_DASD=y
# CONFIG_DASD_PROFILE is not set
CONFIG_DASD_ECKD=y CONFIG_DASD_ECKD=y
CONFIG_DASD_FBA=y CONFIG_DASD_FBA=y
CONFIG_DASD_DIAG=y CONFIG_DASD_DIAG=y
...@@ -108,6 +108,7 @@ CONFIG_UNIX98_PTY_COUNT=2048 ...@@ -108,6 +108,7 @@ CONFIG_UNIX98_PTY_COUNT=2048
# CONFIG_TN3270 is not set # CONFIG_TN3270 is not set
CONFIG_TN3215=y CONFIG_TN3215=y
CONFIG_TN3215_CONSOLE=y CONFIG_TN3215_CONSOLE=y
CONFIG_CCW_CONSOLE=y
CONFIG_SCLP=y CONFIG_SCLP=y
CONFIG_SCLP_TTY=y CONFIG_SCLP_TTY=y
CONFIG_SCLP_CONSOLE=y CONFIG_SCLP_CONSOLE=y
...@@ -143,6 +144,7 @@ CONFIG_HOTPLUG=y ...@@ -143,6 +144,7 @@ CONFIG_HOTPLUG=y
CONFIG_LCS=m CONFIG_LCS=m
CONFIG_CTC=m CONFIG_CTC=m
CONFIG_IUCV=m CONFIG_IUCV=m
CONFIG_CCWGROUP=m
# #
# Networking options # Networking options
...@@ -296,18 +298,23 @@ CONFIG_IBM_PARTITION=y ...@@ -296,18 +298,23 @@ CONFIG_IBM_PARTITION=y
# #
# Kernel hacking # Kernel hacking
# #
CONFIG_DEBUG_KERNEL=y
CONFIG_MAGIC_SYSRQ=y CONFIG_MAGIC_SYSRQ=y
# CONFIG_DEBUG_SLAB is not set
# CONFIG_KALLSYMS is not set
# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
# #
# Security options # Security options
# #
CONFIG_SECURITY_CAPABILITIES=y # CONFIG_SECURITY is not set
# #
# Cryptographic options # Cryptographic options
# #
CONFIG_CRYPTO=y CONFIG_CRYPTO=y
# CONFIG_CRYPTO_HMAC is not set # CONFIG_CRYPTO_HMAC is not set
# CONFIG_CRYPTO_NULL is not set
# CONFIG_CRYPTO_MD4 is not set # CONFIG_CRYPTO_MD4 is not set
# CONFIG_CRYPTO_MD5 is not set # CONFIG_CRYPTO_MD5 is not set
# CONFIG_CRYPTO_SHA1 is not set # CONFIG_CRYPTO_SHA1 is not set
......
...@@ -654,8 +654,10 @@ void debug_set_level(debug_info_t* id, int new_level) ...@@ -654,8 +654,10 @@ void debug_set_level(debug_info_t* id, int new_level)
id->name, new_level, 0, DEBUG_MAX_LEVEL); id->name, new_level, 0, DEBUG_MAX_LEVEL);
} else { } else {
id->level = new_level; id->level = new_level;
#ifdef DEBUG
printk(KERN_INFO printk(KERN_INFO
"debug: %s: new level %i\n",id->name,id->level); "debug: %s: new level %i\n",id->name,id->level);
#endif
} }
spin_unlock_irqrestore(&id->lock,flags); spin_unlock_irqrestore(&id->lock,flags);
} }
......
...@@ -465,6 +465,18 @@ startup:basr %r13,0 # get base ...@@ -465,6 +465,18 @@ startup:basr %r13,0 # get base
# move IPL device to lowcore # move IPL device to lowcore
mvc __LC_IPLDEV(4),IPL_DEVICE-PARMAREA(%r12) mvc __LC_IPLDEV(4),IPL_DEVICE-PARMAREA(%r12)
#
# clear bss memory
#
l %r2,.Lbss_bgn-.LPG1(%r13) # start of bss
l %r3,.Lbss_end-.LPG1(%r13) # end of bss
sr %r3,%r2 # length of bss
sr %r4,%r4 #
sr %r5,%r5 # set src,length and pad to zero
sr %r0,%r0 #
mvcle %r2,%r4,0 # clear mem
jo .-4 # branch back, if not finish
# #
# find memory chunks. # find memory chunks.
# #
...@@ -579,6 +591,8 @@ startup:basr %r13,0 # get base ...@@ -579,6 +591,8 @@ startup:basr %r13,0 # get base
.Lmemsize:.long memory_size .Lmemsize:.long memory_size
.Lmchunk:.long memory_chunk .Lmchunk:.long memory_chunk
.Lmflags:.long machine_flags .Lmflags:.long machine_flags
.Lbss_bgn: .long __bss_start
.Lbss_end: .long _end
.org PARMAREA-64 .org PARMAREA-64
.Lduct: .long 0,0,0,0,0,0,0,0 .Lduct: .long 0,0,0,0,0,0,0,0
...@@ -620,17 +634,6 @@ _stext: basr %r13,0 # get base ...@@ -620,17 +634,6 @@ _stext: basr %r13,0 # get base
ahi %r15,-96 ahi %r15,-96
xc 0(4,%r15),0(%r15) # set backchain to zero xc 0(4,%r15),0(%r15) # set backchain to zero
#
# clear bss memory
#
l %r2,.Lbss_bgn-.LPG2(%r13) # start of bss
l %r3,.Lbss_end-.LPG2(%r13) # end of bss
sr %r3,%r2 # length of bss
sr %r4,%r4 #
sr %r5,%r5 # set src,length and pad to zero
sr %r0,%r0 #
mvcle %r2,%r4,0 # clear mem
jo .-4 # branch back, if not finish
# check control registers # check control registers
stctl %c0,%c15,0(%r15) stctl %c0,%c15,0(%r15)
oi 2(%r15),0x20 # enable sigp external interrupts oi 2(%r15),0x20 # enable sigp external interrupts
...@@ -651,7 +654,5 @@ _stext: basr %r13,0 # get base ...@@ -651,7 +654,5 @@ _stext: basr %r13,0 # get base
.Ldw: .long 0x000a0000,0x00000000 .Ldw: .long 0x000a0000,0x00000000
.Linittu: .long init_thread_union .Linittu: .long init_thread_union
.Lstart: .long start_kernel .Lstart: .long start_kernel
.Lbss_bgn: .long __bss_start
.Lbss_end: .long _end
.Laregs: .long 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 .Laregs: .long 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
...@@ -146,7 +146,7 @@ int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags) ...@@ -146,7 +146,7 @@ int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
regs.orig_gpr2 = -1; regs.orig_gpr2 = -1;
/* Ok, create the new process.. */ /* Ok, create the new process.. */
p = do_fork(flags | CLONE_VM | CLONE_UNTRACED, 0, &regs, 0, NULL); p = do_fork(flags | CLONE_VM | CLONE_UNTRACED, 0, &regs, 0, NULL, NULL);
return IS_ERR(p) ? PTR_ERR(p) : p->pid; return IS_ERR(p) ? PTR_ERR(p) : p->pid;
} }
...@@ -188,6 +188,7 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long new_stackp, ...@@ -188,6 +188,7 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long new_stackp,
frame = ((struct stack_frame *) frame = ((struct stack_frame *)
(THREAD_SIZE + (unsigned long) p->thread_info)) - 1; (THREAD_SIZE + (unsigned long) p->thread_info)) - 1;
p->thread.ksp = (unsigned long) frame; p->thread.ksp = (unsigned long) frame;
p->set_child_tid = p->clear_child_tid = NULL;
frame->childregs = *regs; frame->childregs = *regs;
frame->childregs.gprs[2] = 0; /* child returns 0 on fork. */ frame->childregs.gprs[2] = 0; /* child returns 0 on fork. */
frame->childregs.gprs[15] = new_stackp; frame->childregs.gprs[15] = new_stackp;
...@@ -218,7 +219,7 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long new_stackp, ...@@ -218,7 +219,7 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long new_stackp,
asmlinkage int sys_fork(struct pt_regs regs) asmlinkage int sys_fork(struct pt_regs regs)
{ {
struct task_struct *p; struct task_struct *p;
p = do_fork(SIGCHLD, regs.gprs[15], &regs, 0, NULL); p = do_fork(SIGCHLD, regs.gprs[15], &regs, 0, NULL, NULL);
return IS_ERR(p) ? PTR_ERR(p) : p->pid; return IS_ERR(p) ? PTR_ERR(p) : p->pid;
} }
...@@ -227,14 +228,16 @@ asmlinkage int sys_clone(struct pt_regs regs) ...@@ -227,14 +228,16 @@ asmlinkage int sys_clone(struct pt_regs regs)
unsigned long clone_flags; unsigned long clone_flags;
unsigned long newsp; unsigned long newsp;
struct task_struct *p; struct task_struct *p;
int *user_tid; int *parent_tidptr, *child_tidptr;
clone_flags = regs.gprs[3]; clone_flags = regs.gprs[3];
newsp = regs.orig_gpr2; newsp = regs.orig_gpr2;
user_tid = (int *) regs.gprs[4]; parent_tidptr = (int *) regs.gprs[4];
child_tidptr = (int *) regs.gprs[5];
if (!newsp) if (!newsp)
newsp = regs.gprs[15]; newsp = regs.gprs[15];
p = do_fork(clone_flags & ~CLONE_IDLETASK, newsp, &regs, 0, user_tid); p = do_fork(clone_flags & ~CLONE_IDLETASK, newsp, &regs, 0,
parent_tidptr, child_tidptr);
return IS_ERR(p) ? PTR_ERR(p) : p->pid; return IS_ERR(p) ? PTR_ERR(p) : p->pid;
} }
...@@ -252,7 +255,7 @@ asmlinkage int sys_vfork(struct pt_regs regs) ...@@ -252,7 +255,7 @@ asmlinkage int sys_vfork(struct pt_regs regs)
{ {
struct task_struct *p; struct task_struct *p;
p = do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, p = do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD,
regs.gprs[15], &regs, 0, NULL); regs.gprs[15], &regs, 0, NULL, NULL);
return IS_ERR(p) ? PTR_ERR(p) : p->pid; return IS_ERR(p) ? PTR_ERR(p) : p->pid;
} }
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/ptrace.h> #include <linux/ptrace.h>
#include <linux/user.h> #include <linux/user.h>
#include <linux/security.h>
#include <asm/segment.h> #include <asm/segment.h>
#include <asm/page.h> #include <asm/page.h>
......
...@@ -47,6 +47,7 @@ ...@@ -47,6 +47,7 @@
*/ */
unsigned int console_mode = 0; unsigned int console_mode = 0;
unsigned int console_device = -1; unsigned int console_device = -1;
unsigned int console_irq = -1;
unsigned long memory_size = 0; unsigned long memory_size = 0;
unsigned long machine_flags = 0; unsigned long machine_flags = 0;
struct { unsigned long addr, size, type; } memory_chunk[16] = { { 0 } }; struct { unsigned long addr, size, type; } memory_chunk[16] = { { 0 } };
...@@ -187,6 +188,10 @@ static void __init conmode_default(void) ...@@ -187,6 +188,10 @@ static void __init conmode_default(void)
char *ptr; char *ptr;
if (MACHINE_IS_VM) { if (MACHINE_IS_VM) {
cpcmd("QUERY CONSOLE", query_buffer, 1024);
console_device = simple_strtoul(query_buffer + 5, NULL, 16);
ptr = strstr(query_buffer, "SUBCHANNEL =");
console_irq = simple_strtoul(ptr + 13, NULL, 16);
cpcmd("QUERY TERM", query_buffer, 1024); cpcmd("QUERY TERM", query_buffer, 1024);
ptr = strstr(query_buffer, "CONMODE"); ptr = strstr(query_buffer, "CONMODE");
/* /*
...@@ -245,9 +250,13 @@ void (*_machine_power_off)(void) = machine_power_off_smp; ...@@ -245,9 +250,13 @@ void (*_machine_power_off)(void) = machine_power_off_smp;
/* /*
* Reboot, halt and power_off routines for non SMP. * Reboot, halt and power_off routines for non SMP.
*/ */
extern void do_reipl(unsigned long devno);
static void do_machine_restart_nonsmp(char * __unused) static void do_machine_restart_nonsmp(char * __unused)
{ {
reipl(S390_lowcore.ipl_device); if (MACHINE_IS_VM)
cpcmd ("IPL", NULL, 0);
else
do_reipl (0x10000 | S390_lowcore.ipl_device);
} }
static void do_machine_halt_nonsmp(void) static void do_machine_halt_nonsmp(void)
......
...@@ -61,7 +61,7 @@ unsigned long cache_decay_ticks = 0; ...@@ -61,7 +61,7 @@ unsigned long cache_decay_ticks = 0;
extern char vmhalt_cmd[]; extern char vmhalt_cmd[];
extern char vmpoff_cmd[]; extern char vmpoff_cmd[];
extern void reipl(unsigned long devno); extern void do_reipl(unsigned long devno);
static sigp_ccode smp_ext_bitcall(int, ec_bit_sig); static sigp_ccode smp_ext_bitcall(int, ec_bit_sig);
static void smp_ext_bitcall_others(ec_bit_sig); static void smp_ext_bitcall_others(ec_bit_sig);
...@@ -217,7 +217,10 @@ static void do_machine_restart(void * __unused) ...@@ -217,7 +217,10 @@ static void do_machine_restart(void * __unused)
* interrupted by an external interrupt and s390irq * interrupted by an external interrupt and s390irq
* locks are always held disabled). * locks are always held disabled).
*/ */
reipl(S390_lowcore.ipl_device); if (MACHINE_IS_VM)
cpcmd ("IPL", NULL, 0);
else
do_reipl (0x10000 | S390_lowcore.ipl_device);
} }
signal_processor(smp_processor_id(), sigp_stop); signal_processor(smp_processor_id(), sigp_stop);
} }
...@@ -477,7 +480,7 @@ static struct task_struct *__devinit fork_by_hand(void) ...@@ -477,7 +480,7 @@ static struct task_struct *__devinit fork_by_hand(void)
/* don't care about the psw and regs settings since we'll never /* don't care about the psw and regs settings since we'll never
reschedule the forked task. */ reschedule the forked task. */
memset(&regs,0,sizeof(struct pt_regs)); memset(&regs,0,sizeof(struct pt_regs));
return do_fork(CLONE_VM|CLONE_IDLETASK, 0, &regs, 0, NULL); return do_fork(CLONE_VM|CLONE_IDLETASK, 0, &regs, 0, NULL, NULL);
} }
int __cpu_up(unsigned int cpu) int __cpu_up(unsigned int cpu)
......
...@@ -296,11 +296,15 @@ source "fs/Kconfig" ...@@ -296,11 +296,15 @@ source "fs/Kconfig"
menu "Kernel hacking" menu "Kernel hacking"
#if [ "$CONFIG_CTC" = "y" ]; then config DEBUG_KERNEL
# bool 'Remote GDB kernel debugging' CONFIG_REMOTE_DEBUG bool "Kernel debugging"
#fi help
Say Y here if you are developing drivers or trying to debug and
identify kernel problems.
config MAGIC_SYSRQ config MAGIC_SYSRQ
bool "Magic SysRq key" bool "Magic SysRq key"
depends on DEBUG_KERNEL
help help
If you say Y here, you will have some control over the system even If you say Y here, you will have some control over the system even
if the system crashes for example during kernel debugging (e.g., you if the system crashes for example during kernel debugging (e.g., you
...@@ -312,6 +316,28 @@ config MAGIC_SYSRQ ...@@ -312,6 +316,28 @@ config MAGIC_SYSRQ
keys are documented in <file:Documentation/sysrq.txt>. Don't say Y keys are documented in <file:Documentation/sysrq.txt>. Don't say Y
unless you really know what this hack does. unless you really know what this hack does.
config DEBUG_SLAB
bool "Debug memory allocations"
depends on DEBUG_KERNEL
help
Say Y here to have the kernel do limited verification on memory
allocation as well as poisoning memory on free to catch use of freed
memory.
config KALLSYMS
bool "Load all symbols for debugging/kksymoops"
depends on DEBUG_KERNEL
help
Say Y here to let the kernel print out symbolic crash information and
symbolic stack backtraces. This increases the size of the kernel
somewhat, as all symbols have to be loaded into the kernel image.
config DEBUG_SPINLOCK_SLEEP
bool "Sleep-inside-spinlock checking"
help
If you say Y here, various routines which may sleep will become very
noisy if they are called with a spinlock held.
endmenu endmenu
source "security/Kconfig" source "security/Kconfig"
......
...@@ -11,7 +11,6 @@ CONFIG_ARCH_S390X=y ...@@ -11,7 +11,6 @@ CONFIG_ARCH_S390X=y
# Code maturity level options # Code maturity level options
# #
CONFIG_EXPERIMENTAL=y CONFIG_EXPERIMENTAL=y
CONFIG_CONFIDENTIAL=y
# #
# General setup # General setup
...@@ -138,6 +137,7 @@ CONFIG_BLK_DEV_XPRAM=m ...@@ -138,6 +137,7 @@ CONFIG_BLK_DEV_XPRAM=m
# S/390 block device drivers # S/390 block device drivers
# #
CONFIG_DASD=y CONFIG_DASD=y
# CONFIG_DASD_PROFILE is not set
CONFIG_DASD_ECKD=y CONFIG_DASD_ECKD=y
CONFIG_DASD_FBA=y CONFIG_DASD_FBA=y
# CONFIG_DASD_DIAG is not set # CONFIG_DASD_DIAG is not set
...@@ -166,6 +166,7 @@ CONFIG_UNIX98_PTY_COUNT=2048 ...@@ -166,6 +166,7 @@ CONFIG_UNIX98_PTY_COUNT=2048
# CONFIG_TN3270 is not set # CONFIG_TN3270 is not set
CONFIG_TN3215=y CONFIG_TN3215=y
CONFIG_TN3215_CONSOLE=y CONFIG_TN3215_CONSOLE=y
CONFIG_CCW_CONSOLE=y
CONFIG_SCLP=y CONFIG_SCLP=y
CONFIG_SCLP_TTY=y CONFIG_SCLP_TTY=y
CONFIG_SCLP_CONSOLE=y CONFIG_SCLP_CONSOLE=y
...@@ -201,6 +202,7 @@ CONFIG_HOTPLUG=y ...@@ -201,6 +202,7 @@ CONFIG_HOTPLUG=y
CONFIG_LCS=m CONFIG_LCS=m
CONFIG_CTC=m CONFIG_CTC=m
CONFIG_IUCV=m CONFIG_IUCV=m
CONFIG_CCWGROUP=m
# #
# Networking options # Networking options
...@@ -357,18 +359,23 @@ CONFIG_IBM_PARTITION=y ...@@ -357,18 +359,23 @@ CONFIG_IBM_PARTITION=y
# #
# Kernel hacking # Kernel hacking
# #
CONFIG_DEBUG_KERNEL=y
CONFIG_MAGIC_SYSRQ=y CONFIG_MAGIC_SYSRQ=y
# CONFIG_DEBUG_SLAB is not set
# CONFIG_KALLSYMS is not set
# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
# #
# Security options # Security options
# #
CONFIG_SECURITY_CAPABILITIES=y # CONFIG_SECURITY is not set
# #
# Cryptographic options # Cryptographic options
# #
CONFIG_CRYPTO=y CONFIG_CRYPTO=y
# CONFIG_CRYPTO_HMAC is not set # CONFIG_CRYPTO_HMAC is not set
# CONFIG_CRYPTO_NULL is not set
# CONFIG_CRYPTO_MD4 is not set # CONFIG_CRYPTO_MD4 is not set
# CONFIG_CRYPTO_MD5 is not set # CONFIG_CRYPTO_MD5 is not set
# CONFIG_CRYPTO_SHA1 is not set # CONFIG_CRYPTO_SHA1 is not set
......
...@@ -654,8 +654,10 @@ void debug_set_level(debug_info_t* id, int new_level) ...@@ -654,8 +654,10 @@ void debug_set_level(debug_info_t* id, int new_level)
id->name, new_level, 0, DEBUG_MAX_LEVEL); id->name, new_level, 0, DEBUG_MAX_LEVEL);
} else { } else {
id->level = new_level; id->level = new_level;
#ifdef DEBUG
printk(KERN_INFO printk(KERN_INFO
"debug: %s: new level %i\n",id->name,id->level); "debug: %s: new level %i\n",id->name,id->level);
#endif
} }
spin_unlock_irqrestore(&id->lock,flags); spin_unlock_irqrestore(&id->lock,flags);
} }
......
...@@ -467,10 +467,21 @@ startup:basr %r13,0 # get base ...@@ -467,10 +467,21 @@ startup:basr %r13,0 # get base
larl %r12,_pstart # pointer to parameter area larl %r12,_pstart # pointer to parameter area
# move IPL device to lowcore # move IPL device to lowcore
mvc __LC_IPLDEV(4),IPL_DEVICE+4-PARMAREA(%r12) mvc __LC_IPLDEV(4),IPL_DEVICE+4-PARMAREA(%r12)
#
# clear bss memory
#
larl %r2,__bss_start # start of bss segment
larl %r3,_end # end of bss segment
sgr %r3,%r2 # length of bss
sgr %r4,%r4 #
sgr %r5,%r5 # set src,length and pad to zero
mvcle %r2,%r4,0 # clear mem
jo .-4 # branch back, if not finish
# set program check new psw mask # set program check new psw mask
mvc __LC_PGM_NEW_PSW(8),.Lpcmsk-.LPG1(%r13) mvc __LC_PGM_NEW_PSW(8),.Lpcmsk-.LPG1(%r13)
# #
# find memory chunks. # find memory chunks.
# #
...@@ -631,16 +642,7 @@ _stext: basr %r13,0 # get base ...@@ -631,16 +642,7 @@ _stext: basr %r13,0 # get base
stg %r15,__LC_KERNEL_STACK # set end of kernel stack stg %r15,__LC_KERNEL_STACK # set end of kernel stack
aghi %r15,-160 aghi %r15,-160
xc 0(8,%r15),0(%r15) # set backchain to zero xc 0(8,%r15),0(%r15) # set backchain to zero
#
# clear bss memory
#
larl %r2,__bss_start # start of bss segment
larl %r3,_end # end of bss segment
sgr %r3,%r2 # length of bss
sgr %r4,%r4 #
sgr %r5,%r5 # set src,length and pad to zero
mvcle %r2,%r4,0 # clear mem
jo .-4 # branch back, if not finish
# check control registers # check control registers
stctg %c0,%c15,0(%r15) stctg %c0,%c15,0(%r15)
oi 6(%r15),0x20 # enable sigp external interrupts oi 6(%r15),0x20 # enable sigp external interrupts
......
...@@ -143,7 +143,7 @@ int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags) ...@@ -143,7 +143,7 @@ int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
regs.orig_gpr2 = -1; regs.orig_gpr2 = -1;
/* Ok, create the new process.. */ /* Ok, create the new process.. */
p = do_fork(flags | CLONE_VM | CLONE_UNTRACED, 0, &regs, 0, NULL); p = do_fork(flags | CLONE_VM | CLONE_UNTRACED, 0, &regs, 0, NULL, NULL);
return IS_ERR(p) ? PTR_ERR(p) : p->pid; return IS_ERR(p) ? PTR_ERR(p) : p->pid;
} }
...@@ -185,6 +185,7 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long new_stackp, ...@@ -185,6 +185,7 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long new_stackp,
frame = ((struct stack_frame *) frame = ((struct stack_frame *)
(THREAD_SIZE + (unsigned long) p->thread_info)) - 1; (THREAD_SIZE + (unsigned long) p->thread_info)) - 1;
p->thread.ksp = (unsigned long) frame; p->thread.ksp = (unsigned long) frame;
p->set_child_tid = p->clear_child_tid = NULL;
frame->childregs = *regs; frame->childregs = *regs;
frame->childregs.gprs[2] = 0; /* child returns 0 on fork. */ frame->childregs.gprs[2] = 0; /* child returns 0 on fork. */
frame->childregs.gprs[15] = new_stackp; frame->childregs.gprs[15] = new_stackp;
...@@ -208,7 +209,7 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long new_stackp, ...@@ -208,7 +209,7 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long new_stackp,
asmlinkage int sys_fork(struct pt_regs regs) asmlinkage int sys_fork(struct pt_regs regs)
{ {
struct task_struct *p; struct task_struct *p;
p = do_fork(SIGCHLD, regs.gprs[15], &regs, 0, NULL); p = do_fork(SIGCHLD, regs.gprs[15], &regs, 0, NULL, NULL);
return IS_ERR(p) ? PTR_ERR(p) : p->pid; return IS_ERR(p) ? PTR_ERR(p) : p->pid;
} }
...@@ -217,14 +218,16 @@ asmlinkage int sys_clone(struct pt_regs regs) ...@@ -217,14 +218,16 @@ asmlinkage int sys_clone(struct pt_regs regs)
unsigned long clone_flags; unsigned long clone_flags;
unsigned long newsp; unsigned long newsp;
struct task_struct *p; struct task_struct *p;
int *user_tid; int *parent_tidptr, *child_tidptr;
clone_flags = regs.gprs[3]; clone_flags = regs.gprs[3];
newsp = regs.orig_gpr2; newsp = regs.orig_gpr2;
user_tid = (int *) regs.gprs[4]; parent_tidptr = (int *) regs.gprs[4];
child_tidptr = (int *) regs.gprs[5];
if (!newsp) if (!newsp)
newsp = regs.gprs[15]; newsp = regs.gprs[15];
p = do_fork(clone_flags & ~CLONE_IDLETASK, newsp, &regs, 0, user_tid); p = do_fork(clone_flags & ~CLONE_IDLETASK, newsp, &regs, 0,
parent_tidptr, child_tidptr);
return IS_ERR(p) ? PTR_ERR(p) : p->pid; return IS_ERR(p) ? PTR_ERR(p) : p->pid;
} }
...@@ -242,7 +245,7 @@ asmlinkage int sys_vfork(struct pt_regs regs) ...@@ -242,7 +245,7 @@ asmlinkage int sys_vfork(struct pt_regs regs)
{ {
struct task_struct *p; struct task_struct *p;
p = do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, p = do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD,
regs.gprs[15], &regs, 0, NULL); regs.gprs[15], &regs, 0, NULL, NULL);
return IS_ERR(p) ? PTR_ERR(p) : p->pid; return IS_ERR(p) ? PTR_ERR(p) : p->pid;
} }
......
...@@ -47,6 +47,7 @@ ...@@ -47,6 +47,7 @@
*/ */
unsigned int console_mode = 0; unsigned int console_mode = 0;
unsigned int console_device = -1; unsigned int console_device = -1;
unsigned int console_irq = -1;
unsigned long memory_size = 0; unsigned long memory_size = 0;
unsigned long machine_flags = 0; unsigned long machine_flags = 0;
struct { unsigned long addr, size, type; } memory_chunk[16] = { { 0 } }; struct { unsigned long addr, size, type; } memory_chunk[16] = { { 0 } };
...@@ -187,6 +188,10 @@ static void __init conmode_default(void) ...@@ -187,6 +188,10 @@ static void __init conmode_default(void)
char *ptr; char *ptr;
if (MACHINE_IS_VM) { if (MACHINE_IS_VM) {
cpcmd("QUERY CONSOLE", query_buffer, 1024);
console_device = simple_strtoul(query_buffer + 5, NULL, 16);
ptr = strstr(query_buffer, "SUBCHANNEL =");
console_irq = simple_strtoul(ptr + 13, NULL, 16);
cpcmd("QUERY TERM", query_buffer, 1024); cpcmd("QUERY TERM", query_buffer, 1024);
ptr = strstr(query_buffer, "CONMODE"); ptr = strstr(query_buffer, "CONMODE");
/* /*
...@@ -245,9 +250,13 @@ void (*_machine_power_off)(void) = machine_power_off_smp; ...@@ -245,9 +250,13 @@ void (*_machine_power_off)(void) = machine_power_off_smp;
/* /*
* Reboot, halt and power_off routines for non SMP. * Reboot, halt and power_off routines for non SMP.
*/ */
extern void do_reipl(unsigned long devno);
static void do_machine_restart_nonsmp(char * __unused) static void do_machine_restart_nonsmp(char * __unused)
{ {
reipl(S390_lowcore.ipl_device); if (MACHINE_IS_VM)
cpcmd ("IPL", NULL, 0);
else
do_reipl (0x10000 | S390_lowcore.ipl_device);
} }
static void do_machine_halt_nonsmp(void) static void do_machine_halt_nonsmp(void)
......
...@@ -60,7 +60,7 @@ unsigned long cache_decay_ticks = 0; ...@@ -60,7 +60,7 @@ unsigned long cache_decay_ticks = 0;
extern char vmhalt_cmd[]; extern char vmhalt_cmd[];
extern char vmpoff_cmd[]; extern char vmpoff_cmd[];
extern void reipl(unsigned long devno); extern void do_reipl(unsigned long devno);
static sigp_ccode smp_ext_bitcall(int, ec_bit_sig); static sigp_ccode smp_ext_bitcall(int, ec_bit_sig);
static void smp_ext_bitcall_others(ec_bit_sig); static void smp_ext_bitcall_others(ec_bit_sig);
...@@ -216,7 +216,10 @@ static void do_machine_restart(void * __unused) ...@@ -216,7 +216,10 @@ static void do_machine_restart(void * __unused)
* interrupted by an external interrupt and s390irq * interrupted by an external interrupt and s390irq
* locks are always held disabled). * locks are always held disabled).
*/ */
reipl(S390_lowcore.ipl_device); if (MACHINE_IS_VM)
cpcmd ("IPL", NULL, 0);
else
do_reipl (0x10000 | S390_lowcore.ipl_device);
} }
signal_processor(smp_processor_id(), sigp_stop); signal_processor(smp_processor_id(), sigp_stop);
} }
...@@ -461,7 +464,7 @@ static struct task_struct * __devinit fork_by_hand(void) ...@@ -461,7 +464,7 @@ static struct task_struct * __devinit fork_by_hand(void)
/* don't care about the psw and regs settings since we'll never /* don't care about the psw and regs settings since we'll never
reschedule the forked task. */ reschedule the forked task. */
memset(&regs,0,sizeof(struct pt_regs)); memset(&regs,0,sizeof(struct pt_regs));
return do_fork(CLONE_VM|CLONE_IDLETASK, 0, &regs, 0, NULL); return do_fork(CLONE_VM|CLONE_IDLETASK, 0, &regs, 0, NULL, NULL);
} }
int __cpu_up(unsigned int cpu) int __cpu_up(unsigned int cpu)
......
...@@ -401,7 +401,7 @@ void unexpected_irq(int irq, void *dev_id, struct pt_regs * regs) ...@@ -401,7 +401,7 @@ void unexpected_irq(int irq, void *dev_id, struct pt_regs * regs)
printk("Expecting: "); printk("Expecting: ");
for (i = 0; i < 16; i++) for (i = 0; i < 16; i++)
if (action->handler) if (action->handler)
prom_printf("[%s:%d:0x%x] ", action->name, printk("[%s:%d:0x%x] ", action->name,
(int) i, (unsigned int) action->handler); (int) i, (unsigned int) action->handler);
} }
printk("AIEEE\n"); printk("AIEEE\n");
......
...@@ -38,7 +38,7 @@ void *kmap_atomic(struct page *page, enum km_type type) ...@@ -38,7 +38,7 @@ void *kmap_atomic(struct page *page, enum km_type type)
return page_address(page); return page_address(page);
idx = type + KM_TYPE_NR*smp_processor_id(); idx = type + KM_TYPE_NR*smp_processor_id();
vaddr = FIX_KMAP_BEGIN + idx * PAGE_SIZE; vaddr = fix_kmap_begin + idx * PAGE_SIZE;
/* XXX Fix - Anton */ /* XXX Fix - Anton */
#if 0 #if 0
...@@ -67,12 +67,12 @@ void kunmap_atomic(void *kvaddr, enum km_type type) ...@@ -67,12 +67,12 @@ void kunmap_atomic(void *kvaddr, enum km_type type)
unsigned long vaddr = (unsigned long) kvaddr; unsigned long vaddr = (unsigned long) kvaddr;
unsigned long idx = type + KM_TYPE_NR*smp_processor_id(); unsigned long idx = type + KM_TYPE_NR*smp_processor_id();
if (vaddr < FIX_KMAP_BEGIN) { // FIXME if (vaddr < fix_kmap_begin) { // FIXME
dec_preempt_count(); dec_preempt_count();
return; return;
} }
if (vaddr != FIX_KMAP_BEGIN + idx * PAGE_SIZE) if (vaddr != fix_kmap_begin + idx * PAGE_SIZE)
BUG(); BUG();
/* XXX Fix - Anton */ /* XXX Fix - Anton */
......
...@@ -59,13 +59,17 @@ unsigned long highstart_pfn, highend_pfn; ...@@ -59,13 +59,17 @@ unsigned long highstart_pfn, highend_pfn;
pte_t *kmap_pte; pte_t *kmap_pte;
pgprot_t kmap_prot; pgprot_t kmap_prot;
/* These are set in {srmmu,sun4c}_paging_init() */
unsigned long fix_kmap_begin;
unsigned long fix_kmap_end;
#define kmap_get_fixed_pte(vaddr) \ #define kmap_get_fixed_pte(vaddr) \
pte_offset_kernel(pmd_offset(pgd_offset_k(vaddr), (vaddr)), (vaddr)) pte_offset_kernel(pmd_offset(pgd_offset_k(vaddr), (vaddr)), (vaddr))
void __init kmap_init(void) void __init kmap_init(void)
{ {
/* cache the first kmap pte */ /* cache the first kmap pte */
kmap_pte = kmap_get_fixed_pte(FIX_KMAP_BEGIN); kmap_pte = kmap_get_fixed_pte(fix_kmap_begin);
kmap_prot = __pgprot(SRMMU_ET_PTE | SRMMU_PRIV | SRMMU_CACHE); kmap_prot = __pgprot(SRMMU_ET_PTE | SRMMU_PRIV | SRMMU_CACHE);
} }
......
...@@ -136,8 +136,16 @@ static inline int srmmu_device_memory(unsigned long x) ...@@ -136,8 +136,16 @@ static inline int srmmu_device_memory(unsigned long x)
int srmmu_cache_pagetables; int srmmu_cache_pagetables;
/* XXX Make this dynamic based on ram size - Anton */ /* these will be initialized in srmmu_nocache_calcsize() */
#define SRMMU_NOCACHE_BITMAP_SIZE (SRMMU_NOCACHE_NPAGES * 16) int srmmu_nocache_npages;
unsigned long srmmu_nocache_size;
unsigned long srmmu_nocache_end;
unsigned long pkmap_base;
unsigned long pkmap_base_end;
unsigned long srmmu_nocache_bitmap_size;
extern unsigned long fix_kmap_begin;
extern unsigned long fix_kmap_end;
#define SRMMU_NOCACHE_BITMAP_SHIFT (PAGE_SHIFT - 4) #define SRMMU_NOCACHE_BITMAP_SHIFT (PAGE_SHIFT - 4)
void *srmmu_nocache_pool; void *srmmu_nocache_pool;
...@@ -331,7 +339,7 @@ static unsigned long __srmmu_get_nocache(int size, int align) ...@@ -331,7 +339,7 @@ static unsigned long __srmmu_get_nocache(int size, int align)
spin_lock(&srmmu_nocache_spinlock); spin_lock(&srmmu_nocache_spinlock);
repeat: repeat:
offset = find_next_zero_bit(srmmu_nocache_bitmap, SRMMU_NOCACHE_BITMAP_SIZE, offset); offset = find_next_zero_bit(srmmu_nocache_bitmap, srmmu_nocache_bitmap_size, offset);
/* we align on physical address */ /* we align on physical address */
if (align) { if (align) {
...@@ -341,7 +349,7 @@ static unsigned long __srmmu_get_nocache(int size, int align) ...@@ -341,7 +349,7 @@ static unsigned long __srmmu_get_nocache(int size, int align)
offset = (va_tmp - SRMMU_NOCACHE_VADDR) >> SRMMU_NOCACHE_BITMAP_SHIFT; offset = (va_tmp - SRMMU_NOCACHE_VADDR) >> SRMMU_NOCACHE_BITMAP_SHIFT;
} }
if ((SRMMU_NOCACHE_BITMAP_SIZE - offset) < size) { if ((srmmu_nocache_bitmap_size - offset) < size) {
printk("Run out of nocached RAM!\n"); printk("Run out of nocached RAM!\n");
spin_unlock(&srmmu_nocache_spinlock); spin_unlock(&srmmu_nocache_spinlock);
return 0; return 0;
...@@ -393,9 +401,9 @@ void srmmu_free_nocache(unsigned long vaddr, int size) ...@@ -393,9 +401,9 @@ void srmmu_free_nocache(unsigned long vaddr, int size)
vaddr, (unsigned long)SRMMU_NOCACHE_VADDR); vaddr, (unsigned long)SRMMU_NOCACHE_VADDR);
BUG(); BUG();
} }
if (vaddr >= SRMMU_NOCACHE_END) { if (vaddr >= srmmu_nocache_end) {
printk("Vaddr %lx is bigger than nocache end 0x%lx\n", printk("Vaddr %lx is bigger than nocache end 0x%lx\n",
vaddr, (unsigned long)SRMMU_NOCACHE_END); vaddr, srmmu_nocache_end);
BUG(); BUG();
} }
if (size & (size-1)) { if (size & (size-1)) {
...@@ -429,6 +437,35 @@ void srmmu_free_nocache(unsigned long vaddr, int size) ...@@ -429,6 +437,35 @@ void srmmu_free_nocache(unsigned long vaddr, int size)
void srmmu_early_allocate_ptable_skeleton(unsigned long start, unsigned long end); void srmmu_early_allocate_ptable_skeleton(unsigned long start, unsigned long end);
extern unsigned long probe_memory(void); /* in fault.c */
/* Reserve nocache dynamically proportionally to the amount of
* system RAM. -- Tomas Szepe <szepe@pinerecords.com>, June 2002
*/
void srmmu_nocache_calcsize(void)
{
unsigned long sysmemavail = probe_memory() / 1024;
srmmu_nocache_npages =
sysmemavail / SRMMU_NOCACHE_ALCRATIO / 1024 * 256;
if (sysmemavail % (SRMMU_NOCACHE_ALCRATIO * 1024))
srmmu_nocache_npages += 256;
/* anything above 1280 blows up */
if (srmmu_nocache_npages > 1280) srmmu_nocache_npages = 1280;
srmmu_nocache_size = srmmu_nocache_npages * PAGE_SIZE;
srmmu_nocache_bitmap_size = srmmu_nocache_npages * 16;
srmmu_nocache_end = SRMMU_NOCACHE_VADDR + srmmu_nocache_size;
fix_kmap_begin = srmmu_nocache_end;
fix_kmap_end = fix_kmap_begin + (KM_TYPE_NR * NR_CPUS - 1) * PAGE_SIZE;
pkmap_base = SRMMU_NOCACHE_VADDR + srmmu_nocache_size + 0x40000;
pkmap_base_end = pkmap_base + LAST_PKMAP * PAGE_SIZE;
/* printk("system memory available = %luk\nnocache ram size = %luk\n",
sysmemavail, srmmu_nocache_size / 1024); */
}
void srmmu_nocache_init(void) void srmmu_nocache_init(void)
{ {
pgd_t *pgd; pgd_t *pgd;
...@@ -437,24 +474,24 @@ void srmmu_nocache_init(void) ...@@ -437,24 +474,24 @@ void srmmu_nocache_init(void)
unsigned long paddr, vaddr; unsigned long paddr, vaddr;
unsigned long pteval; unsigned long pteval;
srmmu_nocache_pool = __alloc_bootmem(SRMMU_NOCACHE_SIZE, PAGE_SIZE, 0UL); srmmu_nocache_pool = __alloc_bootmem(srmmu_nocache_size, PAGE_SIZE, 0UL);
memset(srmmu_nocache_pool, 0, SRMMU_NOCACHE_SIZE); memset(srmmu_nocache_pool, 0, srmmu_nocache_size);
srmmu_nocache_bitmap = __alloc_bootmem(SRMMU_NOCACHE_BITMAP_SIZE, SMP_CACHE_BYTES, 0UL); srmmu_nocache_bitmap = __alloc_bootmem(srmmu_nocache_bitmap_size, SMP_CACHE_BYTES, 0UL);
memset(srmmu_nocache_bitmap, 0, SRMMU_NOCACHE_BITMAP_SIZE); memset(srmmu_nocache_bitmap, 0, srmmu_nocache_bitmap_size);
srmmu_swapper_pg_dir = (pgd_t *)__srmmu_get_nocache(SRMMU_PGD_TABLE_SIZE, SRMMU_PGD_TABLE_SIZE); srmmu_swapper_pg_dir = (pgd_t *)__srmmu_get_nocache(SRMMU_PGD_TABLE_SIZE, SRMMU_PGD_TABLE_SIZE);
memset(__nocache_fix(srmmu_swapper_pg_dir), 0, SRMMU_PGD_TABLE_SIZE); memset(__nocache_fix(srmmu_swapper_pg_dir), 0, SRMMU_PGD_TABLE_SIZE);
init_mm.pgd = srmmu_swapper_pg_dir; init_mm.pgd = srmmu_swapper_pg_dir;
srmmu_early_allocate_ptable_skeleton(SRMMU_NOCACHE_VADDR, SRMMU_NOCACHE_END); srmmu_early_allocate_ptable_skeleton(SRMMU_NOCACHE_VADDR, srmmu_nocache_end);
spin_lock_init(&srmmu_nocache_spinlock); spin_lock_init(&srmmu_nocache_spinlock);
paddr = __pa((unsigned long)srmmu_nocache_pool); paddr = __pa((unsigned long)srmmu_nocache_pool);
vaddr = SRMMU_NOCACHE_VADDR; vaddr = SRMMU_NOCACHE_VADDR;
while (vaddr < SRMMU_NOCACHE_END) { while (vaddr < srmmu_nocache_end) {
pgd = pgd_offset_k(vaddr); pgd = pgd_offset_k(vaddr);
pmd = srmmu_pmd_offset(__nocache_fix(pgd), vaddr); pmd = srmmu_pmd_offset(__nocache_fix(pgd), vaddr);
pte = srmmu_pte_offset(__nocache_fix(pmd), vaddr); pte = srmmu_pte_offset(__nocache_fix(pmd), vaddr);
...@@ -1286,6 +1323,7 @@ void __init srmmu_paging_init(void) ...@@ -1286,6 +1323,7 @@ void __init srmmu_paging_init(void)
pages_avail = 0; pages_avail = 0;
last_valid_pfn = bootmem_init(&pages_avail); last_valid_pfn = bootmem_init(&pages_avail);
srmmu_nocache_calcsize();
srmmu_nocache_init(); srmmu_nocache_init();
srmmu_inherit_prom_mappings(0xfe400000,(LINUX_OPPROM_ENDVM-PAGE_SIZE)); srmmu_inherit_prom_mappings(0xfe400000,(LINUX_OPPROM_ENDVM-PAGE_SIZE));
map_kernel(); map_kernel();
...@@ -1307,12 +1345,12 @@ void __init srmmu_paging_init(void) ...@@ -1307,12 +1345,12 @@ void __init srmmu_paging_init(void)
srmmu_allocate_ptable_skeleton(DVMA_VADDR, DVMA_END); srmmu_allocate_ptable_skeleton(DVMA_VADDR, DVMA_END);
#endif #endif
srmmu_allocate_ptable_skeleton(FIX_KMAP_BEGIN, FIX_KMAP_END); srmmu_allocate_ptable_skeleton(fix_kmap_begin, fix_kmap_end);
srmmu_allocate_ptable_skeleton(PKMAP_BASE, PKMAP_BASE_END); srmmu_allocate_ptable_skeleton(pkmap_base, pkmap_base_end);
pgd = pgd_offset_k(PKMAP_BASE); pgd = pgd_offset_k(pkmap_base);
pmd = srmmu_pmd_offset(pgd, PKMAP_BASE); pmd = srmmu_pmd_offset(pgd, pkmap_base);
pte = srmmu_pte_offset(pmd, PKMAP_BASE); pte = srmmu_pte_offset(pmd, pkmap_base);
pkmap_page_table = pte; pkmap_page_table = pte;
flush_cache_all(); flush_cache_all();
...@@ -1359,7 +1397,7 @@ static void srmmu_mmu_info(struct seq_file *m) ...@@ -1359,7 +1397,7 @@ static void srmmu_mmu_info(struct seq_file *m)
"nocache used\t: %d\n", "nocache used\t: %d\n",
srmmu_name, srmmu_name,
num_contexts, num_contexts,
SRMMU_NOCACHE_SIZE, srmmu_nocache_size,
(srmmu_nocache_used << SRMMU_NOCACHE_BITMAP_SHIFT)); (srmmu_nocache_used << SRMMU_NOCACHE_BITMAP_SHIFT));
} }
......
...@@ -2002,6 +2002,9 @@ extern unsigned long end; ...@@ -2002,6 +2002,9 @@ extern unsigned long end;
extern unsigned long bootmem_init(unsigned long *pages_avail); extern unsigned long bootmem_init(unsigned long *pages_avail);
extern unsigned long last_valid_pfn; extern unsigned long last_valid_pfn;
extern unsigned long fix_kmap_begin;
extern unsigned long fix_kmap_end;
void __init sun4c_paging_init(void) void __init sun4c_paging_init(void)
{ {
int i, cnt; int i, cnt;
...@@ -2009,6 +2012,9 @@ void __init sun4c_paging_init(void) ...@@ -2009,6 +2012,9 @@ void __init sun4c_paging_init(void)
extern struct resource sparc_iomap; extern struct resource sparc_iomap;
unsigned long end_pfn, pages_avail; unsigned long end_pfn, pages_avail;
fix_kmap_begin = KERNBASE + SRMMU_MAXMEM; /* Why bother with SRMMU_MAXMEM? */
fix_kmap_end = fix_kmap_begin + ((KM_TYPE_NR*NR_CPUS)-1)*PAGE_SIZE;
kernel_end = (unsigned long) &end; kernel_end = (unsigned long) &end;
kernel_end += (SUN4C_REAL_PGDIR_SIZE * 4); kernel_end += (SUN4C_REAL_PGDIR_SIZE * 4);
kernel_end = SUN4C_REAL_PGDIR_ALIGN(kernel_end); kernel_end = SUN4C_REAL_PGDIR_ALIGN(kernel_end);
......
This diff is collapsed.
...@@ -82,6 +82,18 @@ config CRYPTO_TWOFISH ...@@ -82,6 +82,18 @@ config CRYPTO_TWOFISH
See also: See also:
http://www.counterpane.com/twofish.html http://www.counterpane.com/twofish.html
config CRYPTO_SERPENT
tristate "Serpent cipher algorithm"
depends on CRYPTO
help
Serpent cipher algorithm, by Anderson, Biham & Knudsen.
Keys are allowed to be from 0 to 256 bits in length, in steps
of 8 bits.
See also:
http://www.cl.cam.ac.uk/~rja14/serpent.html
config CRYPTO_TEST config CRYPTO_TEST
tristate "Testing module" tristate "Testing module"
depends on CRYPTO depends on CRYPTO
......
...@@ -17,6 +17,7 @@ obj-$(CONFIG_CRYPTO_SHA256) += sha256.o ...@@ -17,6 +17,7 @@ obj-$(CONFIG_CRYPTO_SHA256) += sha256.o
obj-$(CONFIG_CRYPTO_DES) += des.o obj-$(CONFIG_CRYPTO_DES) += des.o
obj-$(CONFIG_CRYPTO_BLOWFISH) += blowfish.o obj-$(CONFIG_CRYPTO_BLOWFISH) += blowfish.o
obj-$(CONFIG_CRYPTO_TWOFISH) += twofish.o obj-$(CONFIG_CRYPTO_TWOFISH) += twofish.o
obj-$(CONFIG_CRYPTO_SERPENT) += serpent.o
obj-$(CONFIG_CRYPTO_TEST) += tcrypt.o obj-$(CONFIG_CRYPTO_TEST) += tcrypt.o
......
This diff is collapsed.
...@@ -48,7 +48,7 @@ static char *tvmem; ...@@ -48,7 +48,7 @@ static char *tvmem;
static char *check[] = { static char *check[] = {
"des", "md5", "des3_ede", "rot13", "sha1", "sha256", "blowfish", "des", "md5", "des3_ede", "rot13", "sha1", "sha256", "blowfish",
"twofish", "twofish", "serpent",
NULL NULL
}; };
...@@ -1884,6 +1884,105 @@ test_twofish(void) ...@@ -1884,6 +1884,105 @@ test_twofish(void)
crypto_free_tfm(tfm); crypto_free_tfm(tfm);
} }
void
test_serpent(void)
{
unsigned int ret, i, tsize;
u8 *p, *q, *key;
struct crypto_tfm *tfm;
struct serpent_tv *serp_tv;
struct scatterlist sg[1];
printk("\ntesting serpent encryption\n");
tfm = crypto_alloc_tfm("serpent", 0);
if (tfm == NULL) {
printk("failed to load transform for serpent (default ecb)\n");
return;
}
tsize = sizeof (serpent_enc_tv_template);
if (tsize > TVMEMSIZE) {
printk("template (%u) too big for tvmem (%u)\n", tsize,
TVMEMSIZE);
return;
}
memcpy(tvmem, serpent_enc_tv_template, tsize);
serp_tv = (void *) tvmem;
for (i = 0; i < SERPENT_ENC_TEST_VECTORS; i++) {
printk("test %u (%d bit key):\n", i + 1, serp_tv[i].keylen * 8);
key = serp_tv[i].key;
ret = crypto_cipher_setkey(tfm, key, serp_tv[i].keylen);
if (ret) {
printk("setkey() failed flags=%x\n", tfm->crt_flags);
if (!serp_tv[i].fail)
goto out;
}
p = serp_tv[i].plaintext;
sg[0].page = virt_to_page(p);
sg[0].offset = ((long) p & ~PAGE_MASK);
sg[0].length = sizeof(serp_tv[i].plaintext);
ret = crypto_cipher_encrypt(tfm, sg, 1);
if (ret) {
printk("encrypt() failed flags=%x\n", tfm->crt_flags);
goto out;
}
q = kmap(sg[0].page) + sg[0].offset;
hexdump(q, sizeof(serp_tv[i].result));
printk("%s\n", memcmp(q, serp_tv[i].result,
sizeof(serp_tv[i].result)) ? "fail" : "pass");
}
printk("\ntesting serpent decryption\n");
tsize = sizeof (serpent_dec_tv_template);
if (tsize > TVMEMSIZE) {
printk("template (%u) too big for tvmem (%u)\n", tsize,
TVMEMSIZE);
return;
}
memcpy(tvmem, serpent_dec_tv_template, tsize);
serp_tv = (void *) tvmem;
for (i = 0; i < SERPENT_DEC_TEST_VECTORS; i++) {
printk("test %u (%d bit key):\n", i + 1, serp_tv[i].keylen * 8);
key = serp_tv[i].key;
ret = crypto_cipher_setkey(tfm, key, serp_tv[i].keylen);
if (ret) {
printk("setkey() failed flags=%x\n", tfm->crt_flags);
if (!serp_tv[i].fail)
goto out;
}
p = serp_tv[i].plaintext;
sg[0].page = virt_to_page(p);
sg[0].offset = ((long) p & ~PAGE_MASK);
sg[0].length = sizeof(serp_tv[i].plaintext);
ret = crypto_cipher_decrypt(tfm, sg, 1);
if (ret) {
printk("decrypt() failed flags=%x\n", tfm->crt_flags);
goto out;
}
q = kmap(sg[0].page) + sg[0].offset;
hexdump(q, sizeof(serp_tv[i].result));
printk("%s\n", memcmp(q, serp_tv[i].result,
sizeof(serp_tv[i].result)) ? "fail" : "pass");
}
out:
crypto_free_tfm(tfm);
}
static void static void
test_available(void) test_available(void)
{ {
...@@ -1911,6 +2010,7 @@ do_test(void) ...@@ -1911,6 +2010,7 @@ do_test(void)
test_sha256(); test_sha256();
test_blowfish(); test_blowfish();
test_twofish(); test_twofish();
test_serpent();
#ifdef CONFIG_CRYPTO_HMAC #ifdef CONFIG_CRYPTO_HMAC
test_hmac_md5(); test_hmac_md5();
test_hmac_sha1(); test_hmac_sha1();
...@@ -1950,6 +2050,10 @@ do_test(void) ...@@ -1950,6 +2050,10 @@ do_test(void)
test_twofish(); test_twofish();
break; break;
case 9:
test_serpent();
break;
#ifdef CONFIG_CRYPTO_HMAC #ifdef CONFIG_CRYPTO_HMAC
case 100: case 100:
test_hmac_md5(); test_hmac_md5();
......
...@@ -1384,4 +1384,100 @@ struct tf_tv tf_cbc_dec_tv_template[] = { ...@@ -1384,4 +1384,100 @@ struct tf_tv tf_cbc_dec_tv_template[] = {
}, },
}; };
/*
* Serpent test vectors. These are backwards because Serpent writes
* octect sequences in right-to-left mode.
*/
#define SERPENT_ENC_TEST_VECTORS 4
#define SERPENT_DEC_TEST_VECTORS 4
struct serpent_tv {
unsigned int keylen, fail;
u8 key[32], plaintext[16], result[16];
};
struct serpent_tv serpent_enc_tv_template[] =
{
{
0, 0,
{ 0 },
{ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f },
{ 0x12, 0x07, 0xfc, 0xce, 0x9b, 0xd0, 0xd6, 0x47,
0x6a, 0xe9, 0x8f, 0xbe, 0xd1, 0x43, 0xa0, 0xe2 }
},
{
16, 0,
{ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f },
{ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f },
{ 0x4c, 0x7d, 0x8a, 0x32, 0x80, 0x72, 0xa2, 0x2c,
0x82, 0x3e, 0x4a, 0x1f, 0x3a, 0xcd, 0xa1, 0x6d }
},
{
32, 0,
{ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f },
{ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f },
{ 0xde, 0x26, 0x9f, 0xf8, 0x33, 0xe4, 0x32, 0xb8,
0x5b, 0x2e, 0x88, 0xd2, 0x70, 0x1c, 0xe7, 0x5c }
},
{
16, 0,
{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80 },
{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
{ 0xdd, 0xd2, 0x6b, 0x98, 0xa5, 0xff, 0xd8, 0x2c,
0x05, 0x34, 0x5a, 0x9d, 0xad, 0xbf, 0xaf, 0x49}
}
};
struct serpent_tv serpent_dec_tv_template[] =
{
{
0, 0,
{ 0 },
{ 0x12, 0x07, 0xfc, 0xce, 0x9b, 0xd0, 0xd6, 0x47,
0x6a, 0xe9, 0x8f, 0xbe, 0xd1, 0x43, 0xa0, 0xe2 },
{ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f },
},
{
16, 0,
{ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f },
{ 0x4c, 0x7d, 0x8a, 0x32, 0x80, 0x72, 0xa2, 0x2c,
0x82, 0x3e, 0x4a, 0x1f, 0x3a, 0xcd, 0xa1, 0x6d },
{ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f },
},
{
32, 0,
{ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f },
{ 0xde, 0x26, 0x9f, 0xf8, 0x33, 0xe4, 0x32, 0xb8,
0x5b, 0x2e, 0x88, 0xd2, 0x70, 0x1c, 0xe7, 0x5c },
{ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f },
},
{
16, 0,
{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80 },
{ 0xdd, 0xd2, 0x6b, 0x98, 0xa5, 0xff, 0xd8, 0x2c,
0x05, 0x34, 0x5a, 0x9d, 0xad, 0xbf, 0xaf, 0x49},
{ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
}
};
#endif /* _CRYPTO_TCRYPT_H */ #endif /* _CRYPTO_TCRYPT_H */
...@@ -318,8 +318,11 @@ static int __init i2c_ioc_init(void) ...@@ -318,8 +318,11 @@ static int __init i2c_ioc_init(void)
ret = i2c_bit_add_bus(&ioc_ops); ret = i2c_bit_add_bus(&ioc_ops);
if (ret >= 0) if (ret >= 0){
misc_register(&rtc_dev); ret = misc_register(&rtc_dev);
if(ret < 0)
i2c_bit_del_bus(&ioc_ops);
}
return ret; return ret;
} }
......
...@@ -58,8 +58,7 @@ config ACPI_BOOT ...@@ -58,8 +58,7 @@ config ACPI_BOOT
config ACPI_SLEEP config ACPI_SLEEP
bool "Sleep States" bool "Sleep States"
depends on X86 && ACPI && !ACPI_HT_ONLY depends on X86 && ACPI && !ACPI_HT_ONLY && SOFTWARE_SUSPEND
default SOFTWARE_SUSPEND
---help--- ---help---
This option adds support for ACPI suspend states. This option adds support for ACPI suspend states.
......
...@@ -142,7 +142,7 @@ acpi_set_debug ( ...@@ -142,7 +142,7 @@ acpi_set_debug (
switch (flag) { switch (flag) {
case ACPI_DEBUG_LOW: case ACPI_DEBUG_LOW:
acpi_dbg_layer = ACPI_COMPONENT_DEFAULT | ACPI_ALL_DRIVERS; acpi_dbg_layer = ACPI_COMPONENT_DEFAULT | ACPI_ALL_DRIVERS;
acpi_dbg_level = DEBUG_DEFAULT; acpi_dbg_level = ACPI_DEBUG_DEFAULT;
break; break;
case ACPI_DEBUG_MEDIUM: case ACPI_DEBUG_MEDIUM:
acpi_dbg_layer = ACPI_COMPONENT_DEFAULT | ACPI_ALL_DRIVERS; acpi_dbg_layer = ACPI_COMPONENT_DEFAULT | ACPI_ALL_DRIVERS;
......
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
# #
obj-y := dsfield.o dsmthdat.o dsopcode.o dswexec.o dswscope.o \ obj-y := dsfield.o dsmthdat.o dsopcode.o dswexec.o dswscope.o \
dsmethod.o dsobject.o dsutils.o dswload.o dswstate.o dsmethod.o dsobject.o dsutils.o dswload.o dswstate.o \
dsinit.o
EXTRA_CFLAGS += $(ACPI_CFLAGS) EXTRA_CFLAGS += $(ACPI_CFLAGS)
......
/******************************************************************************
*
* Module Name: dsinit - Object initialization namespace walk
* $Revision: 2 $
*
*****************************************************************************/
/*
* Copyright (C) 2000 - 2002, R. Byron Moore
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "acpi.h"
#include "acparser.h"
#include "amlcode.h"
#include "acdispat.h"
#include "acnamesp.h"
#include "acinterp.h"
#define _COMPONENT ACPI_DISPATCHER
ACPI_MODULE_NAME ("dsinit")
/*******************************************************************************
*
* FUNCTION: Acpi_ds_init_one_object
*
* PARAMETERS: Obj_handle - Node
* Level - Current nesting level
* Context - Points to a init info struct
* Return_value - Not used
*
* RETURN: Status
*
* DESCRIPTION: Callback from Acpi_walk_namespace. Invoked for every object
* within the namespace.
*
* Currently, the only objects that require initialization are:
* 1) Methods
* 2) Operation Regions
*
******************************************************************************/
acpi_status
acpi_ds_init_one_object (
acpi_handle obj_handle,
u32 level,
void *context,
void **return_value)
{
acpi_object_type type;
acpi_status status;
acpi_init_walk_info *info = (acpi_init_walk_info *) context;
ACPI_FUNCTION_NAME ("Ds_init_one_object");
/*
* We are only interested in objects owned by the table that
* was just loaded
*/
if (((acpi_namespace_node *) obj_handle)->owner_id !=
info->table_desc->table_id) {
return (AE_OK);
}
info->object_count++;
/* And even then, we are only interested in a few object types */
type = acpi_ns_get_type (obj_handle);
switch (type) {
case ACPI_TYPE_REGION:
status = acpi_ds_initialize_region (obj_handle);
if (ACPI_FAILURE (status)) {
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Region %p [%4.4s] - Init failure, %s\n",
obj_handle, ((acpi_namespace_node *) obj_handle)->name.ascii,
acpi_format_exception (status)));
}
info->op_region_count++;
break;
case ACPI_TYPE_METHOD:
info->method_count++;
/* Print a dot for each method unless we are going to print the entire pathname */
if (!(acpi_dbg_level & ACPI_LV_INIT_NAMES)) {
acpi_os_printf (".");
}
/*
* Set the execution data width (32 or 64) based upon the
* revision number of the parent ACPI table.
* TBD: This is really for possible future support of integer width
* on a per-table basis. Currently, we just use a global for the width.
*/
if (info->table_desc->pointer->revision == 1) {
((acpi_namespace_node *) obj_handle)->flags |= ANOBJ_DATA_WIDTH_32;
}
/*
* Always parse methods to detect errors, we may delete
* the parse tree below
*/
status = acpi_ds_parse_method (obj_handle);
if (ACPI_FAILURE (status)) {
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Method %p [%4.4s] - parse failure, %s\n",
obj_handle, ((acpi_namespace_node *) obj_handle)->name.ascii,
acpi_format_exception (status)));
/* This parse failed, but we will continue parsing more methods */
break;
}
/*
* Delete the parse tree. We simple re-parse the method
* for every execution since there isn't much overhead
*/
acpi_ns_delete_namespace_subtree (obj_handle);
acpi_ns_delete_namespace_by_owner (((acpi_namespace_node *) obj_handle)->object->method.owning_id);
break;
case ACPI_TYPE_DEVICE:
info->device_count++;
break;
default:
break;
}
/*
* We ignore errors from above, and always return OK, since
* we don't want to abort the walk on a single error.
*/
return (AE_OK);
}
/*******************************************************************************
*
* FUNCTION: Acpi_ds_initialize_objects
*
* PARAMETERS: Table_desc - Descriptor for parent ACPI table
* Start_node - Root of subtree to be initialized.
*
* RETURN: Status
*
* DESCRIPTION: Walk the namespace starting at "Start_node" and perform any
* necessary initialization on the objects found therein
*
******************************************************************************/
acpi_status
acpi_ds_initialize_objects (
acpi_table_desc *table_desc,
acpi_namespace_node *start_node)
{
acpi_status status;
acpi_init_walk_info info;
ACPI_FUNCTION_TRACE ("Ds_initialize_objects");
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
"**** Starting initialization of namespace objects ****\n"));
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INIT, "Parsing all Control Methods:"));
info.method_count = 0;
info.op_region_count = 0;
info.object_count = 0;
info.device_count = 0;
info.table_desc = table_desc;
/* Walk entire namespace from the supplied root */
status = acpi_walk_namespace (ACPI_TYPE_ANY, start_node, ACPI_UINT32_MAX,
acpi_ds_init_one_object, &info, NULL);
if (ACPI_FAILURE (status)) {
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Walk_namespace failed, %s\n",
acpi_format_exception (status)));
}
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INIT,
"\nTable [%4.4s] - %hd Objects with %hd Devices %hd Methods %hd Regions\n",
table_desc->pointer->signature, info.object_count,
info.device_count, info.method_count, info.op_region_count));
ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
"%hd Methods, %hd Regions\n", info.method_count, info.op_region_count));
return_ACPI_STATUS (AE_OK);
}
/******************************************************************************* /*******************************************************************************
* *
* Module Name: dsmthdat - control method arguments and local variables * Module Name: dsmthdat - control method arguments and local variables
* $Revision: 66 $ * $Revision: 67 $
* *
******************************************************************************/ ******************************************************************************/
...@@ -68,7 +68,7 @@ acpi_ds_method_data_init ( ...@@ -68,7 +68,7 @@ acpi_ds_method_data_init (
/* Init the method arguments */ /* Init the method arguments */
for (i = 0; i < MTH_NUM_ARGS; i++) { for (i = 0; i < ACPI_METHOD_NUM_ARGS; i++) {
ACPI_MOVE_UNALIGNED32_TO_32 (&walk_state->arguments[i].name, ACPI_MOVE_UNALIGNED32_TO_32 (&walk_state->arguments[i].name,
NAMEOF_ARG_NTE); NAMEOF_ARG_NTE);
walk_state->arguments[i].name.integer |= (i << 24); walk_state->arguments[i].name.integer |= (i << 24);
...@@ -79,7 +79,7 @@ acpi_ds_method_data_init ( ...@@ -79,7 +79,7 @@ acpi_ds_method_data_init (
/* Init the method locals */ /* Init the method locals */
for (i = 0; i < MTH_NUM_LOCALS; i++) { for (i = 0; i < ACPI_METHOD_NUM_LOCALS; i++) {
ACPI_MOVE_UNALIGNED32_TO_32 (&walk_state->local_variables[i].name, ACPI_MOVE_UNALIGNED32_TO_32 (&walk_state->local_variables[i].name,
NAMEOF_LOCAL_NTE); NAMEOF_LOCAL_NTE);
...@@ -118,7 +118,7 @@ acpi_ds_method_data_delete_all ( ...@@ -118,7 +118,7 @@ acpi_ds_method_data_delete_all (
/* Detach the locals */ /* Detach the locals */
for (index = 0; index < MTH_NUM_LOCALS; index++) { for (index = 0; index < ACPI_METHOD_NUM_LOCALS; index++) {
if (walk_state->local_variables[index].object) { if (walk_state->local_variables[index].object) {
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Deleting Local%d=%p\n", ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Deleting Local%d=%p\n",
index, walk_state->local_variables[index].object)); index, walk_state->local_variables[index].object));
...@@ -131,7 +131,7 @@ acpi_ds_method_data_delete_all ( ...@@ -131,7 +131,7 @@ acpi_ds_method_data_delete_all (
/* Detach the arguments */ /* Detach the arguments */
for (index = 0; index < MTH_NUM_ARGS; index++) { for (index = 0; index < ACPI_METHOD_NUM_ARGS; index++) {
if (walk_state->arguments[index].object) { if (walk_state->arguments[index].object) {
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Deleting Arg%d=%p\n", ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Deleting Arg%d=%p\n",
index, walk_state->arguments[index].object)); index, walk_state->arguments[index].object));
...@@ -182,7 +182,7 @@ acpi_ds_method_data_init_args ( ...@@ -182,7 +182,7 @@ acpi_ds_method_data_init_args (
/* Copy passed parameters into the new method stack frame */ /* Copy passed parameters into the new method stack frame */
while ((index < MTH_NUM_ARGS) && (index < max_param_count) && params[index]) { while ((index < ACPI_METHOD_NUM_ARGS) && (index < max_param_count) && params[index]) {
/* /*
* A valid parameter. * A valid parameter.
* Store the argument in the method/walk descriptor * Store the argument in the method/walk descriptor
...@@ -230,9 +230,9 @@ acpi_ds_method_data_get_node ( ...@@ -230,9 +230,9 @@ acpi_ds_method_data_get_node (
switch (opcode) { switch (opcode) {
case AML_LOCAL_OP: case AML_LOCAL_OP:
if (index > MTH_MAX_LOCAL) { if (index > ACPI_METHOD_MAX_LOCAL) {
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Local index %d is invalid (max %d)\n", ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Local index %d is invalid (max %d)\n",
index, MTH_MAX_LOCAL)); index, ACPI_METHOD_MAX_LOCAL));
return_ACPI_STATUS (AE_AML_INVALID_INDEX); return_ACPI_STATUS (AE_AML_INVALID_INDEX);
} }
...@@ -243,9 +243,9 @@ acpi_ds_method_data_get_node ( ...@@ -243,9 +243,9 @@ acpi_ds_method_data_get_node (
case AML_ARG_OP: case AML_ARG_OP:
if (index > MTH_MAX_ARG) { if (index > ACPI_METHOD_MAX_ARG) {
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Arg index %d is invalid (max %d)\n", ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, "Arg index %d is invalid (max %d)\n",
index, MTH_MAX_ARG)); index, ACPI_METHOD_MAX_ARG));
return_ACPI_STATUS (AE_AML_INVALID_INDEX); return_ACPI_STATUS (AE_AML_INVALID_INDEX);
} }
......
This diff is collapsed.
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* *
* Module Name: dsopcode - Dispatcher Op Region support and handling of * Module Name: dsopcode - Dispatcher Op Region support and handling of
* "control" opcodes * "control" opcodes
* $Revision: 83 $ * $Revision: 84 $
* *
*****************************************************************************/ *****************************************************************************/
...@@ -173,7 +173,7 @@ acpi_ds_get_buffer_field_arguments ( ...@@ -173,7 +173,7 @@ acpi_ds_get_buffer_field_arguments (
extra_desc = acpi_ns_get_secondary_object (obj_desc); extra_desc = acpi_ns_get_secondary_object (obj_desc);
node = obj_desc->buffer_field.node; node = obj_desc->buffer_field.node;
ACPI_DEBUG_EXEC(acpi_ut_display_init_pathname (node, " [Field]")); ACPI_DEBUG_EXEC(acpi_ut_display_init_pathname (ACPI_TYPE_BUFFER_FIELD, node, NULL));
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "[%4.4s] Buffer_field JIT Init\n", ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "[%4.4s] Buffer_field JIT Init\n",
node->name.ascii)); node->name.ascii));
...@@ -317,7 +317,7 @@ acpi_ds_get_region_arguments ( ...@@ -317,7 +317,7 @@ acpi_ds_get_region_arguments (
node = obj_desc->region.node; node = obj_desc->region.node;
ACPI_DEBUG_EXEC(acpi_ut_display_init_pathname (node, " [Operation Region]")); ACPI_DEBUG_EXEC(acpi_ut_display_init_pathname (ACPI_TYPE_REGION, node, NULL));
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "[%4.4s] Op_region Init at AML %p\n", ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "[%4.4s] Op_region Init at AML %p\n",
node->name.ascii, extra_desc->extra.aml_start)); node->name.ascii, extra_desc->extra.aml_start));
......
This diff is collapsed.
/****************************************************************************** /******************************************************************************
* *
* Module Name: dswstate - Dispatcher parse tree walk management routines * Module Name: dswstate - Dispatcher parse tree walk management routines
* $Revision: 70 $ * $Revision: 71 $
* *
*****************************************************************************/ *****************************************************************************/
...@@ -65,7 +65,7 @@ acpi_ds_result_insert ( ...@@ -65,7 +65,7 @@ acpi_ds_result_insert (
return (AE_NOT_EXIST); return (AE_NOT_EXIST);
} }
if (index >= OBJ_NUM_OPERANDS) { if (index >= ACPI_OBJ_NUM_OPERANDS) {
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
"Index out of range: %X Obj=%p State=%p Num=%X\n", "Index out of range: %X Obj=%p State=%p Num=%X\n",
index, object, walk_state, state->results.num_results)); index, object, walk_state, state->results.num_results));
...@@ -124,7 +124,7 @@ acpi_ds_result_remove ( ...@@ -124,7 +124,7 @@ acpi_ds_result_remove (
return (AE_NOT_EXIST); return (AE_NOT_EXIST);
} }
if (index >= OBJ_MAX_OPERAND) { if (index >= ACPI_OBJ_MAX_OPERAND) {
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
"Index out of range: %X State=%p Num=%X\n", "Index out of range: %X State=%p Num=%X\n",
index, walk_state, state->results.num_results)); index, walk_state, state->results.num_results));
...@@ -196,7 +196,7 @@ acpi_ds_result_pop ( ...@@ -196,7 +196,7 @@ acpi_ds_result_pop (
state->results.num_results--; state->results.num_results--;
for (index = OBJ_NUM_OPERANDS; index; index--) { for (index = ACPI_OBJ_NUM_OPERANDS; index; index--) {
/* Check for a valid result object */ /* Check for a valid result object */
if (state->results.obj_desc [index -1]) { if (state->results.obj_desc [index -1]) {
...@@ -312,7 +312,7 @@ acpi_ds_result_push ( ...@@ -312,7 +312,7 @@ acpi_ds_result_push (
return (AE_AML_INTERNAL); return (AE_AML_INTERNAL);
} }
if (state->results.num_results == OBJ_NUM_OPERANDS) { if (state->results.num_results == ACPI_OBJ_NUM_OPERANDS) {
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
"Result stack overflow: Obj=%p State=%p Num=%X\n", "Result stack overflow: Obj=%p State=%p Num=%X\n",
object, walk_state, state->results.num_results)); object, walk_state, state->results.num_results));
...@@ -440,7 +440,7 @@ acpi_ds_obj_stack_delete_all ( ...@@ -440,7 +440,7 @@ acpi_ds_obj_stack_delete_all (
/* The stack size is configurable, but fixed */ /* The stack size is configurable, but fixed */
for (i = 0; i < OBJ_NUM_OPERANDS; i++) { for (i = 0; i < ACPI_OBJ_NUM_OPERANDS; i++) {
if (walk_state->operands[i]) { if (walk_state->operands[i]) {
acpi_ut_remove_reference (walk_state->operands[i]); acpi_ut_remove_reference (walk_state->operands[i]);
walk_state->operands[i] = NULL; walk_state->operands[i] = NULL;
...@@ -474,7 +474,7 @@ acpi_ds_obj_stack_push ( ...@@ -474,7 +474,7 @@ acpi_ds_obj_stack_push (
/* Check for stack overflow */ /* Check for stack overflow */
if (walk_state->num_operands >= OBJ_NUM_OPERANDS) { if (walk_state->num_operands >= ACPI_OBJ_NUM_OPERANDS) {
ACPI_DEBUG_PRINT ((ACPI_DB_ERROR, ACPI_DEBUG_PRINT ((ACPI_DB_ERROR,
"overflow! Obj=%p State=%p #Ops=%X\n", "overflow! Obj=%p State=%p #Ops=%X\n",
object, walk_state, walk_state->num_operands)); object, walk_state, walk_state->num_operands));
...@@ -922,7 +922,7 @@ acpi_ds_init_aml_walk ( ...@@ -922,7 +922,7 @@ acpi_ds_init_aml_walk (
/* Init the method arguments */ /* Init the method arguments */
status = acpi_ds_method_data_init_args (params, MTH_NUM_ARGS, walk_state); status = acpi_ds_method_data_init_args (params, ACPI_METHOD_NUM_ARGS, walk_state);
if (ACPI_FAILURE (status)) { if (ACPI_FAILURE (status)) {
return_ACPI_STATUS (status); return_ACPI_STATUS (status);
} }
......
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
# #
obj-y := evevent.o evregion.o evsci.o evxfevnt.o \ obj-y := evevent.o evregion.o evsci.o evxfevnt.o \
evmisc.o evrgnini.o evxface.o evxfregn.o evmisc.o evrgnini.o evxface.o evxfregn.o \
evgpe.o
EXTRA_CFLAGS += $(ACPI_CFLAGS) EXTRA_CFLAGS += $(ACPI_CFLAGS)
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment