Commit 4823db34 authored by Dave Jones's avatar Dave Jones

Merge tetrachloride.(none):/mnt/stuff/kernel/2.5/bk-linus

into tetrachloride.(none):/mnt/stuff/kernel/2.5/agpgart
parents 9eaa2bf5 60e7fd5e
......@@ -186,6 +186,7 @@ Original developers of the crypto algorithms:
Kazunori Miyazawa / USAGI (HMAC)
Matthew Skala (Twofish)
Dag Arne Osvik (Serpent)
Brian Gladman (AES)
DES algorithm contributors:
Raimar Falke
......@@ -203,6 +204,10 @@ Twofish algorithm contributors:
SHA256 algorithm contributors:
Andrew McDonald
AES algorithm contributors:
Alexander Kjeldaas
Adam J. Richter
Please send any credits updates or corrections to:
James Morris <jmorris@intercode.com.au>
......@@ -1462,10 +1462,14 @@ routing issues.
error_burst and error_cost
--------------------------
These parameters are used to limit the warning messages written to the kernel
log from the routing code. The higher the error_cost factor is, the fewer
messages will be written. Error_burst controls when messages will be dropped.
The default settings limit warning messages to one every five seconds.
These parameters are used to limit how many ICMP destination unreachable to
send from the host in question. ICMP destination unreachable messages are
sent when we can not reach the next hop, while trying to transmit a packet.
It will also print some error messages to kernel logs if someone is ignoring
our ICMP redirects. The higher the error_cost factor is, the fewer
destination unreachable and error messages will be let through. Error_burst
controls when destination unreachable messages and error messages will be
dropped. The default settings limit warning messages to five every second.
flush
-----
......
......@@ -176,11 +176,11 @@ hardware.
Locking: port_sem taken.
Interrupts: caller dependent.
change_speed(port,cflag,iflag,quot)
set_termios(port,termios,oldtermios)
Change the port parameters, including word length, parity, stop
bits. Update read_status_mask and ignore_status_mask to indicate
the types of events we are interested in receiving. Relevant
cflag bits are:
termios->c_cflag bits are:
CSIZE - word size
CSTOPB - 2 stop bits
PARENB - parity enable
......@@ -191,7 +191,7 @@ hardware.
CRTSCTS - if set, enable CTS status change reporting
CLOCAL - if not set, enable modem status change
reporting.
Relevant iflag bits are:
Relevant termios->c_iflag bits are:
INPCK - enable frame and parity error events to be
passed to the TTY layer.
BRKINT
......@@ -278,6 +278,35 @@ hardware.
Locking: none.
Interrupts: caller dependent.
Other functions
---------------
uart_update_timeout(port,cflag,quot)
Update the FIFO drain timeout, port->timeout, according to the
number of bits, parity, stop bits and quotient.
Locking: caller is expected to take port->lock
Interrupts: n/a
uart_get_baud_rate(port,termios)
Return the numeric baud rate for the specified termios, taking
account of the special 38400 baud "kludge". The B0 baud rate
is mapped to 9600 baud.
Locking: caller dependent.
Interrupts: n/a
uart_get_divisor(port,termios,oldtermios)
Return the divsor (baud_base / baud) for the selected baud rate
specified by termios. If the baud rate is out of range, try
the original baud rate specified by oldtermios (if non-NULL).
If that fails, try 9600 baud.
If 38400 baud and custom divisor is selected, return the
custom divisor instead.
Locking: caller dependent.
Interrupts: n/a
Other notes
-----------
......@@ -292,10 +321,3 @@ thus:
struct uart_port port;
int my_stuff;
};
Todo
----
Please see the BUGS file in CVS at
http://cvs.arm.linux.org.uk/cgi/viewcvs.cgi/serial/BUGS
Copyright (C) 1999, 2000 David E. Nelson
April 26, 2000
CHANGES
- Amended for Linux-2.3.99-pre6-3
- Updated for multiple scanner support
INTRODUCTION
This document will hopefully provide enough info on how to get SANE
working with a Hewlett Packard USB capable scanner using the USB
interface. The majority of HP Scanners support the Scanner Control
Language (SCL) which is both published by HP and supported by SANE.
The only HP Scanners that I'm aware of that do not support SCL are the
4200C ,3300C, and the PhotoSmart S20. All other HP scanners with USB
interfaces should work (4100C, 5200C, 6200C, and 6300C) as do models
that are derived from the models above. ie the 6350C which is a 6300C
with a transparency adaptor included with the scanner at time of
purchase. Of course as HP releases new scanners this information may
change.
REQUIREMENTS
In order to get this running you'll need USB support in your kernel in
addition to USB Scanner support. Please refer to scanner.txt for
issues pertaining to Linux USB and USB Scanner support.
An installed version of SANE which is available from
http://www.mostang.com/sane/. Testing has been performed using
version SANE-1.0.1. For instructions on building and installing SANE,
refer to the various README files within the SANE distribution.
The latest SANE HP backend is available from http://www.kirchgessner.net.
At the time of this writing, version 0.83 was available.
OK, I'VE INSTALLED SANE. SO WHAT DO I DO NOW?
NOTE: $INSTALL_DIR is the location where SANE is installed. It may be
/usr/local, /usr, /opt or somewhere else. If you don't know, ask your
system administrator.
1) Make sure that you have the libsane-hp.* libraries under the
$INSTALL_DIR/lib/sane/ directory. If you don't, then the HP backend
was either not compiled or installed properly.
2) Under the directory $INSTALL_DIR/etc/sane.d/ edit the following
files: dll.conf, hp.conf.
dll.conf: Make sure that the 'hp' entry is present and uncommented.
hp.conf: This should contain two lines:
/dev/usbscanner
option connect-device
NOTE: If you are using multiple scanners, make sure to have the correct
device, ie /dev/usbscanner0. See scanner.txt for more info.
3) You should now be able to use SANE (xscanimage or scanimage).
Don't forget to read any relevant man pages regarding the usage of
SANE. If you have other entries uncommented in 'dll.conf', you may
have to specify the device to (x)scanimage. Again, `man` is your
friend. The xscanimage (1) man page has info on how to get 'The Gimp'
to work with xscanimage. Note that Gimp support must be compiled into
SANE for it to work. If you are dealing with a RedHat system, this
means that you'll also need to install the gimp-devel rpm package
prior to compiling SANE.
NOTE: The issues regarding core dumping by (x)scanimage have (or seem
to be thus far) been resolved with version 0.2+ of the USB scanner
driver which should be available in linux-2.3.23. If you notice
otherwise, please contact me.
David /\/elson
dnelson@jump.net
http://www.jump.net/~dnelson
This diff is collapsed.
......@@ -145,16 +145,16 @@ ENTRY(lcall7)
# gates, which has to be cleaned up later..
pushl %eax
SAVE_ALL
movl %esp, %ebx
pushl %ebx
movl %esp, %ebp
pushl %ebp
pushl $0x7
do_lcall:
movl EIP(%ebx), %eax # due to call gates, this is eflags, not eip..
movl CS(%ebx), %edx # this is eip..
movl EFLAGS(%ebx), %ecx # and this is cs..
movl %eax,EFLAGS(%ebx) #
movl %edx,EIP(%ebx) # Now we move them to their "normal" places
movl %ecx,CS(%ebx) #
movl EIP(%ebp), %eax # due to call gates, this is eflags, not eip..
movl CS(%ebp), %edx # this is eip..
movl EFLAGS(%ebp), %ecx # and this is cs..
movl %eax,EFLAGS(%ebp) #
movl %edx,EIP(%ebp) # Now we move them to their "normal" places
movl %ecx,CS(%ebp) #
#
# Call gates don't clear TF and NT in eflags like
......@@ -166,8 +166,8 @@ do_lcall:
pushl %eax
popfl
andl $-8192, %ebx # GET_THREAD_INFO
movl TI_EXEC_DOMAIN(%ebx), %edx # Get the execution domain
andl $-8192, %ebp # GET_THREAD_INFO
movl TI_EXEC_DOMAIN(%ebp), %edx # Get the execution domain
call *4(%edx) # Call the lcall7 handler for the domain
addl $4, %esp
popl %eax
......@@ -178,8 +178,8 @@ ENTRY(lcall27)
# gates, which has to be cleaned up later..
pushl %eax
SAVE_ALL
movl %esp, %ebx
pushl %ebx
movl %esp, %ebp
pushl %ebp
pushl $0x27
jmp do_lcall
......@@ -187,7 +187,7 @@ ENTRY(lcall27)
ENTRY(ret_from_fork)
# NOTE: this function takes a parameter but it's unused on x86.
call schedule_tail
GET_THREAD_INFO(%ebx)
GET_THREAD_INFO(%ebp)
jmp syscall_exit
/*
......@@ -202,7 +202,7 @@ ENTRY(ret_from_fork)
ret_from_exception:
preempt_stop
ret_from_intr:
GET_THREAD_INFO(%ebx)
GET_THREAD_INFO(%ebp)
movl EFLAGS(%esp), %eax # mix EFLAGS and CS
movb CS(%esp), %al
testl $(VM_MASK | 3), %eax
......@@ -211,7 +211,7 @@ ENTRY(resume_userspace)
cli # make sure we don't miss an interrupt
# setting need_resched or sigpending
# between sampling and the iret
movl TI_FLAGS(%ebx), %ecx
movl TI_FLAGS(%ebp), %ecx
andl $_TIF_WORK_MASK, %ecx # is there any work to be done on
# int/exception return?
jne work_pending
......@@ -219,18 +219,18 @@ ENTRY(resume_userspace)
#ifdef CONFIG_PREEMPT
ENTRY(resume_kernel)
cmpl $0,TI_PRE_COUNT(%ebx) # non-zero preempt_count ?
cmpl $0,TI_PRE_COUNT(%ebp) # non-zero preempt_count ?
jnz restore_all
need_resched:
movl TI_FLAGS(%ebx), %ecx # need_resched set ?
movl TI_FLAGS(%ebp), %ecx # need_resched set ?
testb $_TIF_NEED_RESCHED, %cl
jz restore_all
testl $IF_MASK,EFLAGS(%esp) # interrupts off (execption path) ?
jz restore_all
movl $PREEMPT_ACTIVE,TI_PRE_COUNT(%ebx)
movl $PREEMPT_ACTIVE,TI_PRE_COUNT(%ebp)
sti
call schedule
movl $0,TI_PRE_COUNT(%ebx)
movl $0,TI_PRE_COUNT(%ebp)
cli
jmp need_resched
#endif
......@@ -262,21 +262,21 @@ ENTRY(sysenter_entry)
pushl %eax
SAVE_ALL
GET_THREAD_INFO(%ebx)
GET_THREAD_INFO(%ebp)
cmpl $(NR_syscalls), %eax
jae syscall_badsys
testb $_TIF_SYSCALL_TRACE,TI_FLAGS(%ebx)
testb $_TIF_SYSCALL_TRACE,TI_FLAGS(%ebp)
jnz syscall_trace_entry
call *sys_call_table(,%eax,4)
movl %eax,EAX(%esp)
cli
movl TI_FLAGS(%ebx), %ecx
movl TI_FLAGS(%ebp), %ecx
testw $_TIF_ALLWORK_MASK, %cx
jne syscall_exit_work
RESTORE_INT_REGS
movl 12(%esp),%edx
movl 24(%esp),%ecx
/* if something modifies registers it must also disable sysexit */
movl EIP(%esp), %edx
movl OLDESP(%esp), %ecx
sti
sysexit
......@@ -286,11 +286,11 @@ ENTRY(sysenter_entry)
ENTRY(system_call)
pushl %eax # save orig_eax
SAVE_ALL
GET_THREAD_INFO(%ebx)
GET_THREAD_INFO(%ebp)
cmpl $(NR_syscalls), %eax
jae syscall_badsys
# system call tracing in operation
testb $_TIF_SYSCALL_TRACE,TI_FLAGS(%ebx)
testb $_TIF_SYSCALL_TRACE,TI_FLAGS(%ebp)
jnz syscall_trace_entry
syscall_call:
call *sys_call_table(,%eax,4)
......@@ -299,7 +299,7 @@ syscall_exit:
cli # make sure we don't miss an interrupt
# setting need_resched or sigpending
# between sampling and the iret
movl TI_FLAGS(%ebx), %ecx
movl TI_FLAGS(%ebp), %ecx
testw $_TIF_ALLWORK_MASK, %cx # current->work
jne syscall_exit_work
restore_all:
......@@ -315,7 +315,7 @@ work_resched:
cli # make sure we don't miss an interrupt
# setting need_resched or sigpending
# between sampling and the iret
movl TI_FLAGS(%ebx), %ecx
movl TI_FLAGS(%ebp), %ecx
andl $_TIF_WORK_MASK, %ecx # is there any work to be done other
# than syscall tracing?
jz restore_all
......@@ -370,7 +370,7 @@ syscall_exit_work:
syscall_fault:
pushl %eax # save orig_eax
SAVE_ALL
GET_THREAD_INFO(%ebx)
GET_THREAD_INFO(%ebp)
movl $-EFAULT,EAX(%esp)
jmp resume_userspace
......
......@@ -1017,7 +1017,7 @@ void __init mp_config_ioapic_for_sci(int irq)
* walking the MADT again.
*/
status = acpi_get_firmware_table("APIC", 1, ACPI_LOGICAL_ADDRESSING,
(acpi_table_header **) &madt);
(struct acpi_table_header **) &madt);
if (ACPI_SUCCESS(status)) {
madt_end = (void *) (unsigned long)madt + madt->header.length;
......
......@@ -298,9 +298,10 @@ static void do_sys_vm86(struct kernel_vm86_struct *info, struct task_struct *tsk
__asm__ __volatile__(
"xorl %%eax,%%eax; movl %%eax,%%fs; movl %%eax,%%gs\n\t"
"movl %0,%%esp\n\t"
"movl %1,%%ebp\n\t"
"jmp resume_userspace"
: /* no outputs */
:"r" (&info->regs), "b" (tsk->thread_info) : "ax");
:"r" (&info->regs), "r" (tsk->thread_info) : "ax");
/* we never return here */
}
......@@ -311,8 +312,9 @@ static inline void return_to_32bit(struct kernel_vm86_regs * regs16, int retval)
regs32 = save_v86_state(regs16);
regs32->eax = retval;
__asm__ __volatile__("movl %0,%%esp\n\t"
"movl %1,%%ebp\n\t"
"jmp resume_userspace"
: : "r" (regs32), "b" (current_thread_info()));
: : "r" (regs32), "r" (current_thread_info()));
}
static inline void set_IF(struct kernel_vm86_regs * regs)
......
......@@ -1077,7 +1077,7 @@ config LOWMEM_SIZE_BOOL
config LOWMEM_SIZE
hex "Maximum low memory size (in bytes)" if LOWMEM_SIZE_BOOL
default "0x20000000"
default "0x30000000"
config KERNEL_START_BOOL
bool "Set custom kernel base address"
......
This diff is collapsed.
This diff is collapsed.
......@@ -112,42 +112,23 @@ _exception(int signr, struct pt_regs *regs)
force_sig(signr, current);
}
void
MachineCheckException(struct pt_regs *regs)
/*
* I/O accesses can cause machine checks on powermacs.
* Check if the NIP corresponds to the address of a sync
* instruction for which there is an entry in the exception
* table.
* Note that the 601 only takes a machine check on TEA
* (transfer error ack) signal assertion, and does not
* set any of the top 16 bits of SRR1.
* -- paulus.
*/
static inline int check_io_access(struct pt_regs *regs)
{
#ifdef CONFIG_ALL_PPC
const struct exception_table_entry *entry;
#endif /* CONFIG_ALL_PPC */
unsigned long msr = regs->msr;
const struct exception_table_entry *entry;
unsigned int *nip = (unsigned int *)regs->nip;
if (user_mode(regs)) {
regs->msr |= MSR_RI;
_exception(SIGSEGV, regs);
return;
}
#if defined(CONFIG_8xx) && defined(CONFIG_PCI)
/* the qspan pci read routines can cause machine checks -- Cort */
bad_page_fault(regs, regs->dar, SIGBUS);
return;
#endif
if (debugger_fault_handler) {
debugger_fault_handler(regs);
regs->msr |= MSR_RI;
return;
}
#ifdef CONFIG_ALL_PPC
/*
* I/O accesses can cause machine checks on powermacs.
* Check if the NIP corresponds to the address of a sync
* instruction for which there is an entry in the exception
* table.
* Note that the 601 only takes a machine check on TEA
* (transfer error ack) signal assertion, and does not
* set any of the top 16 bits of SRR1.
* -- paulus.
*/
if (((msr & 0xffff0000) == 0 || (msr & (0x80000 | 0x40000)))
&& (entry = search_exception_tables(regs->nip)) != NULL) {
/*
......@@ -158,7 +139,6 @@ MachineCheckException(struct pt_regs *regs)
* For the debug message, we look at the preceding
* load or store.
*/
unsigned int *nip = (unsigned int *)regs->nip;
if (*nip == 0x60000000) /* nop */
nip -= 2;
else if (*nip == 0x4c00012c) /* isync */
......@@ -173,14 +153,42 @@ MachineCheckException(struct pt_regs *regs)
(*nip & 0x100)? "OUT to": "IN from",
regs->gpr[rb] - _IO_BASE, nip);
regs->msr |= MSR_RI;
regs->nip = fixup;
return;
regs->nip = entry->fixup;
return 1;
}
}
#endif /* CONFIG_ALL_PPC */
printk("Machine check in kernel mode.\n");
printk("Caused by (from SRR1=%lx): ", msr);
switch (msr & 0x601F0000) {
return 0;
}
void
MachineCheckException(struct pt_regs *regs)
{
if (user_mode(regs)) {
regs->msr |= MSR_RI;
_exception(SIGSEGV, regs);
return;
}
#if defined(CONFIG_8xx) && defined(CONFIG_PCI)
/* the qspan pci read routines can cause machine checks -- Cort */
bad_page_fault(regs, regs->dar, SIGBUS);
return;
#endif
if (debugger_fault_handler) {
debugger_fault_handler(regs);
regs->msr |= MSR_RI;
return;
}
if (check_io_access(regs))
return;
#ifndef CONFIG_4xx
printk(KERN_CRIT "Machine check in kernel mode.\n");
printk(KERN_CRIT "Caused by (from SRR1=%lx): ", regs->msr);
switch (regs->msr & 0x601F0000) {
case 0x80000:
printk("Machine check signal\n");
break;
......@@ -207,6 +215,17 @@ MachineCheckException(struct pt_regs *regs)
default:
printk("Unknown values in msr\n");
}
#else /* CONFIG_4xx */
/* Note that the ESR gets stored in regs->dsisr on 4xx. */
if (regs->dsisr & ESR_MCI) {
printk(KERN_CRIT "Instruction");
mtspr(SPRN_ESR, regs->dsisr & ~ESR_MCI);
} else
printk(KERN_CRIT "Data");
printk(" machine check in kernel mode.\n");
#endif /* CONFIG_4xx */
debugger(regs);
die("machine check", regs, SIGBUS);
}
......
......@@ -44,6 +44,9 @@ config REDWOOD_5
config REDWOOD_6
bool "Redwood-6"
config SYCAMORE
bool "Sycamore"
config TIVO
bool "Tivo"
......@@ -81,7 +84,7 @@ config IBM405_ERR51
config IBM_OCP
bool
depends on ASH || BEECH || CEDAR || CPCI405 || EP405 || REDWOOD_4 || REDWOOD_5 || REDWOOD_6 || WALNUT
depends on ASH || BEECH || CEDAR || CPCI405 || EP405 || REDWOOD_4 || REDWOOD_5 || REDWOOD_6 || SYCAMORE || WALNUT
default y
config NP405L
......@@ -91,7 +94,7 @@ config NP405L
config BIOS_FIXUP
bool
depends on CEDAR || EP405 || WALNUT
depends on CEDAR || EP405 || SYCAMORE || WALNUT
default y
config 403GCX
......@@ -104,6 +107,14 @@ config 405GP
depends on CPCI405 || EP405 || WALNUT
default y
config 405GPR
bool
depends on SYCAMORE
config 405LP
bool
depends on CEDAR
config STB03xxx
bool
depends on REDWOOD_5 || REDWOOD_4 || REDWOOD_6
......@@ -116,7 +127,7 @@ config EMBEDDEDBOOT
config IBM_OPENBIOS
bool
depends on ASH || BEECH || CEDAR || REDWOOD_4 || REDWOOD_5 || REDWOOD_6 || WALNUT
depends on ASH || BEECH || CEDAR || REDWOOD_4 || REDWOOD_5 || REDWOOD_6 || SYCAMORE || WALNUT
default y
config 405_DMA
......
......@@ -12,6 +12,7 @@ obj-$(CONFIG_OAK) += oak.o
obj-$(CONFIG_REDWOOD_4) += redwood.o
obj-$(CONFIG_REDWOOD_5) += redwood5.o
obj-$(CONFIG_REDWOOD_6) += redwood6.o
obj-$(CONFIG_SYCAMORE) += sycamore.o
obj-$(CONFIG_WALNUT) += walnut.o
obj-$(CONFIG_NP405L) += ibmnp405l.o
......
/*
*
* Copyright 2000-2002 MontaVista Software Inc.
* Author: Armin Kuster <akuster@mvista.com>
* MontaVista Software, Inc. <source@mvista.com>
*
* Module name: sycamore.c
*
* Description:
* Architecture- / platform-specific boot-time initialization code for
* IBM PowerPC 4xx based boards.
*
*/
#include <linux/config.h>
#include <linux/init.h>
#include <linux/smp.h>
#include <linux/threads.h>
#include <linux/param.h>
#include <linux/string.h>
#include <linux/blk.h>
#include <linux/pci.h>
#include <linux/rtc.h>
#include <asm/ocp.h>
#include <asm/ppc4xx_pic.h>
#include <asm/system.h>
#include <asm/pci-bridge.h>
#include <asm/processor.h>
#include <asm/machdep.h>
#include <asm/page.h>
#include <asm/time.h>
#include <asm/io.h>
#include <asm/todc.h>
#undef DEBUG
#ifdef DEBUG
#define DBG(x...) printk(x)
#else
#define DBG(x...)
#endif
void *kb_cs;
void *kb_data;
void *sycamore_rtc_base;
/*
* Define all of the IRQ senses and polarities.
*/
static u_char Sycamore_IRQ_initsenses[] __initdata = {
(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* 0: Uart 0*/
(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* 1: Uart 1*/
(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* 2: IIC */
(IRQ_SENSE_EDGE | IRQ_POLARITY_POSITIVE), /* 3: External Master */
(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* 4: PCI ext cmd write*/
(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* 5: DMA Chan 0 */
(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* 6: DMA Chan 1 */
(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* 7: DMA Chan 2 */
(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* 8: DMA Chan 3 */
(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* 9: Ethernet wakeup (WOL)*/
(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* 10: Mal (SEER) */
(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* 11: Mal TXEOB */
(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* 12: Mal RXEOB */
(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* 13: Mal TXDE*/
(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* 14: Mal RXDE*/
(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* 15: Ethernet */
(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* 16: Ext PCI SERR */
(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* 17: ECC */
(IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* 18: PCI PM*/
(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* 19: Ext Int 7 */
(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* 20: Ext Int 8 */
(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* 21: Ext Int 9 */
(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* 22: Ext Int 10 */
(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* 23: Ext Int 11 */
(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* 24: Ext Int 12 */
(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* 25: Ext Int 0 */
(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* 26: Ext Int 1 */
(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* 27: Ext Int 2 */
(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* 28: Ext Int 3 */
(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* 29: Ext Int 4 */
(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* 30: Ext Int 5 */
(IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* 31: Ext Int 6 */
};
/* Some IRQs unique to Sycamore.
* Used by the generic 405 PCI setup functions in ppc4xx_pci.c
*/
int __init
ppc405_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin)
{
static char pci_irq_table[][4] =
/*
* PCI IDSEL/INTPIN->INTLINE
* A B C D
*/
{
{28, 28, 28, 28}, /* IDSEL 1 - PCI slot 1 */
{29, 29, 29, 29}, /* IDSEL 2 - PCI slot 2 */
{30, 30, 30, 30}, /* IDSEL 3 - PCI slot 3 */
{31, 31, 31, 31}, /* IDSEL 4 - PCI slot 4 */
};
const long min_idsel = 1, max_idsel = 4, irqs_per_slot = 4;
return PCI_IRQ_TABLE_LOOKUP;
};
void __init
sycamore_setup_arch(void)
{
#define SYCAMORE_PS2_BASE 0xF0100000
#define SYCAMORE_FPGA_BASE 0xF0300000
void *fpga_brdc;
unsigned char fpga_brdc_data;
void *fpga_enable;
void *fpga_polarity;
void *fpga_status;
void *fpga_trigger;
ppc4xx_setup_arch();
kb_data = ioremap(SYCAMORE_PS2_BASE, 8);
if (!kb_data) {
printk(KERN_CRIT
"sycamore_setup_arch() kb_data ioremap failed\n");
return;
}
kb_cs = kb_data + 1;
fpga_status = ioremap(SYCAMORE_FPGA_BASE, 8);
if (!fpga_status) {
printk(KERN_CRIT
"sycamore_setup_arch() fpga_status ioremap failed\n");
return;
}
fpga_enable = fpga_status + 1;
fpga_polarity = fpga_status + 2;
fpga_trigger = fpga_status + 3;
fpga_brdc = fpga_status + 4;
/* split the keyboard and mouse interrupts */
fpga_brdc_data = readb(fpga_brdc);
fpga_brdc_data |= 0x80;
writeb(fpga_brdc_data, fpga_brdc);
writeb(0x3, fpga_enable);
writeb(0x3, fpga_polarity);
writeb(0x3, fpga_trigger);
/* RTC step for the sycamore */
sycamore_rtc_base = (void *) SYCAMORE_RTC_VADDR;
TODC_INIT(TODC_TYPE_DS1743, sycamore_rtc_base, sycamore_rtc_base,
sycamore_rtc_base, 8);
ibm4xxPIC_InitSenses = Sycamore_IRQ_initsenses;
ibm4xxPIC_NumInitSenses = sizeof(Sycamore_IRQ_initsenses);
/* Identify the system */
printk(KERN_INFO "IBM Sycamore (IBM405GPr) Platform\n");
printk(KERN_INFO
"Port by MontaVista Software, Inc. (source@mvista.com)\n");
}
void __init
bios_fixup(struct pci_controller *hose, struct pcil0_regs *pcip)
{
#ifdef CONFIG_PCI
unsigned int bar_response, bar;
/*
* Expected PCI mapping:
*
* PLB addr PCI memory addr
* --------------------- ---------------------
* 0000'0000 - 7fff'ffff <--- 0000'0000 - 7fff'ffff
* 8000'0000 - Bfff'ffff ---> 8000'0000 - Bfff'ffff
*
* PLB addr PCI io addr
* --------------------- ---------------------
* e800'0000 - e800'ffff ---> 0000'0000 - 0001'0000
*
* The following code is simplified by assuming that the bootrom
* has been well behaved in following this mapping.
*/
#ifdef DEBUG
int i;
printk("ioremap PCLIO_BASE = 0x%x\n", pcip);
printk("PCI bridge regs before fixup \n");
for (i = 0; i <= 3; i++) {
printk(" pmm%dma\t0x%x\n", i, in_le32(&(pcip->pmm[i].ma)));
printk(" pmm%dma\t0x%x\n", i, in_le32(&(pcip->pmm[i].la)));
printk(" pmm%dma\t0x%x\n", i, in_le32(&(pcip->pmm[i].pcila)));
printk(" pmm%dma\t0x%x\n", i, in_le32(&(pcip->pmm[i].pciha)));
}
printk(" ptm1ms\t0x%x\n", in_le32(&(pcip->ptm1ms)));
printk(" ptm1la\t0x%x\n", in_le32(&(pcip->ptm1la)));
printk(" ptm2ms\t0x%x\n", in_le32(&(pcip->ptm2ms)));
printk(" ptm2la\t0x%x\n", in_le32(&(pcip->ptm2la)));
#endif
/* added for IBM boot rom version 1.15 bios bar changes -AK */
/* Disable region first */
out_le32((void *) &(pcip->pmm[0].ma), 0x00000000);
/* PLB starting addr, PCI: 0x80000000 */
out_le32((void *) &(pcip->pmm[0].la), 0x80000000);
/* PCI start addr, 0x80000000 */
out_le32((void *) &(pcip->pmm[0].pcila), PPC405_PCI_MEM_BASE);
/* 512MB range of PLB to PCI */
out_le32((void *) &(pcip->pmm[0].pciha), 0x00000000);
/* Enable no pre-fetch, enable region */
out_le32((void *) &(pcip->pmm[0].ma), ((0xffffffff -
(PPC405_PCI_UPPER_MEM -
PPC405_PCI_MEM_BASE)) | 0x01));
/* Disable region one */
out_le32((void *) &(pcip->pmm[1].ma), 0x00000000);
out_le32((void *) &(pcip->pmm[1].la), 0x00000000);
out_le32((void *) &(pcip->pmm[1].pcila), 0x00000000);
out_le32((void *) &(pcip->pmm[1].pciha), 0x00000000);
out_le32((void *) &(pcip->pmm[1].ma), 0x00000000);
out_le32((void *) &(pcip->ptm1ms), 0x00000000);
/* Disable region two */
out_le32((void *) &(pcip->pmm[2].ma), 0x00000000);
out_le32((void *) &(pcip->pmm[2].la), 0x00000000);
out_le32((void *) &(pcip->pmm[2].pcila), 0x00000000);
out_le32((void *) &(pcip->pmm[2].pciha), 0x00000000);
out_le32((void *) &(pcip->pmm[2].ma), 0x00000000);
out_le32((void *) &(pcip->ptm2ms), 0x00000000);
/* Zero config bars */
for (bar = PCI_BASE_ADDRESS_1; bar <= PCI_BASE_ADDRESS_2; bar += 4) {
early_write_config_dword(hose, hose->first_busno,
PCI_FUNC(hose->first_busno), bar,
0x00000000);
early_read_config_dword(hose, hose->first_busno,
PCI_FUNC(hose->first_busno), bar,
&bar_response);
DBG("BUS %d, device %d, Function %d bar 0x%8.8x is 0x%8.8x\n",
hose->first_busno, PCI_SLOT(hose->first_busno),
PCI_FUNC(hose->first_busno), bar, bar_response);
}
/* end work arround */
#ifdef DEBUG
printk("PCI bridge regs after fixup \n");
for (i = 0; i <= 3; i++) {
printk(" pmm%dma\t0x%x\n", i, in_le32(&(pcip->pmm[i].ma)));
printk(" pmm%dma\t0x%x\n", i, in_le32(&(pcip->pmm[i].la)));
printk(" pmm%dma\t0x%x\n", i, in_le32(&(pcip->pmm[i].pcila)));
printk(" pmm%dma\t0x%x\n", i, in_le32(&(pcip->pmm[i].pciha)));
}
printk(" ptm1ms\t0x%x\n", in_le32(&(pcip->ptm1ms)));
printk(" ptm1la\t0x%x\n", in_le32(&(pcip->ptm1la)));
printk(" ptm2ms\t0x%x\n", in_le32(&(pcip->ptm2ms)));
printk(" ptm2la\t0x%x\n", in_le32(&(pcip->ptm2la)));
#endif
#endif
}
void __init
sycamore_map_io(void)
{
ppc4xx_map_io();
io_block_mapping(SYCAMORE_RTC_VADDR,
SYCAMORE_RTC_PADDR, SYCAMORE_RTC_SIZE, _PAGE_IO);
}
void __init
platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
unsigned long r6, unsigned long r7)
{
ppc4xx_init(r3, r4, r5, r6, r7);
ppc_md.setup_arch = sycamore_setup_arch;
ppc_md.setup_io_mappings = sycamore_map_io;
ppc_md.time_init = todc_time_init;
ppc_md.set_rtc_time = todc_set_rtc_time;
ppc_md.get_rtc_time = todc_get_rtc_time;
ppc_md.nvram_read_val = todc_direct_read_val;
ppc_md.nvram_write_val = todc_direct_write_val;
}
/*
*
* Copyright 2000 MontaVista Software Inc.
* Author: Armin Kuster <akuster@mvista.com>
* MontaVista Software, Inc.
*
* Module name: sycamore.h
*
* Description:
* Macros, definitions, and data structures specific to the IBM PowerPC
* based boards.
*
* This includes:
*
* 405GP "Sycamore" evaluation board
*
*/
#ifdef __KERNEL__
#ifndef __ASM_SYCAMORE_H__
#define __ASM_SYCAMORE_H__
#include <platforms/4xx/ibm405gpr.h>
#ifndef __ASSEMBLY__
/*
* Data structure defining board information maintained by the boot
* ROM on IBM's "Sycamore" evaluation board. An effort has been made to
* keep the field names consistent with the 8xx 'bd_t' board info
* structures.
*/
typedef struct board_info {
unsigned char bi_s_version[4]; /* Version of this structure */
unsigned char bi_r_version[30]; /* Version of the IBM ROM */
unsigned int bi_memsize; /* DRAM installed, in bytes */
unsigned char bi_enetaddr[6]; /* Local Ethernet MAC address */
unsigned char bi_pci_enetaddr[6]; /* PCI Ethernet MAC address */
unsigned int bi_intfreq; /* Processor speed, in Hz */
unsigned int bi_busfreq; /* PLB Bus speed, in Hz */
unsigned int bi_pci_busfreq; /* PCI Bus speed, in Hz */
} bd_t;
/* Some 4xx parts use a different timebase frequency from the internal clock.
*/
#define bi_tbfreq bi_intfreq
/* Memory map for the IBM "Sycamore" 405GP evaluation board.
* Generic 4xx plus RTC.
*/
extern void *sycamore_rtc_base;
#define SYCAMORE_RTC_PADDR ((uint)0xf0000000)
#define SYCAMORE_RTC_VADDR SYCAMORE_RTC_PADDR
#define SYCAMORE_RTC_SIZE ((uint)8*1024)
#ifdef CONFIG_PPC405GP_INTERNAL_CLOCK
#define BASE_BAUD 201600
#else
#define BASE_BAUD 691200
#endif
#define SYCAMORE_PS2_BASE 0xF0100000
#define SYCAMORE_FPGA_BASE 0xF0300000
#define PPC4xx_MACHINE_NAME "IBM Sycamore"
#endif /* !__ASSEMBLY__ */
#endif /* __ASM_SYCAMORE_H__ */
#endif /* __KERNEL__ */
......@@ -94,6 +94,26 @@ config CRYPTO_SERPENT
See also:
http://www.cl.cam.ac.uk/~rja14/serpent.html
config CRYPTO_AES
tristate "AES cipher algorithms"
depends on CRYPTO
help
AES cipher algorithms (FIPS-197). AES uses the Rijndael
algorithm.
Rijndael appears to be consistently a very good performer in
both hardware and software across a wide range of computing
environments regardless of its use in feedback or non-feedback
modes. Its key setup time is excellent, and its key agility is
good. Rijndael's very low memory requirements make it very well
suited for restricted-space environments, in which it also
demonstrates excellent performance. Rijndael's operations are
among the easiest to defend against power and timing attacks.
The AES specifies three key sizes: 128, 192 and 256 bits
See http://csrc.nist.gov/encryption/aes/ for more information.
config CRYPTO_TEST
tristate "Testing module"
depends on CRYPTO
......
......@@ -20,5 +20,6 @@ obj-$(CONFIG_CRYPTO_DES) += des.o
obj-$(CONFIG_CRYPTO_BLOWFISH) += blowfish.o
obj-$(CONFIG_CRYPTO_TWOFISH) += twofish.o
obj-$(CONFIG_CRYPTO_SERPENT) += serpent.o
obj-$(CONFIG_CRYPTO_AES) += aes.o
obj-$(CONFIG_CRYPTO_TEST) += tcrypt.o
This diff is collapsed.
......@@ -1983,6 +1983,111 @@ test_serpent(void)
crypto_free_tfm(tfm);
}
void
test_aes(void)
{
unsigned int ret, i;
unsigned int tsize;
char *p, *q;
struct crypto_tfm *tfm;
char *key;
struct aes_tv *aes_tv;
struct scatterlist sg[1];
printk("\ntesting aes encryption\n");
tsize = sizeof (aes_enc_tv_template);
if (tsize > TVMEMSIZE) {
printk("template (%u) too big for tvmem (%u)\n", tsize,
TVMEMSIZE);
return;
}
memcpy(tvmem, aes_enc_tv_template, tsize);
aes_tv = (void *) tvmem;
tfm = crypto_alloc_tfm("aes", 0);
if (tfm == NULL) {
printk("failed to load transform for aes (default ecb)\n");
return;
}
for (i = 0; i < AES_ENC_TEST_VECTORS; i++) {
printk("test %u (%d bit key):\n",
i + 1, aes_tv[i].keylen * 8);
key = aes_tv[i].key;
ret = crypto_cipher_setkey(tfm, key, aes_tv[i].keylen);
if (ret) {
printk("setkey() failed flags=%x\n", tfm->crt_flags);
if (!aes_tv[i].fail)
goto out;
}
p = aes_tv[i].plaintext;
sg[0].page = virt_to_page(p);
sg[0].offset = ((long) p & ~PAGE_MASK);
sg[0].length = aes_tv[i].plen;
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, aes_tv[i].rlen);
printk("%s\n", memcmp(q, aes_tv[i].result, aes_tv[i].rlen) ?
"fail" : "pass");
}
printk("\ntesting aes decryption\n");
tsize = sizeof (aes_dec_tv_template);
if (tsize > TVMEMSIZE) {
printk("template (%u) too big for tvmem (%u)\n", tsize,
TVMEMSIZE);
return;
}
memcpy(tvmem, aes_dec_tv_template, tsize);
aes_tv = (void *) tvmem;
for (i = 0; i < AES_DEC_TEST_VECTORS; i++) {
printk("test %u (%d bit key):\n",
i + 1, aes_tv[i].keylen * 8);
key = aes_tv[i].key;
ret = crypto_cipher_setkey(tfm, key, aes_tv[i].keylen);
if (ret) {
printk("setkey() failed flags=%x\n", tfm->crt_flags);
if (!aes_tv[i].fail)
goto out;
}
p = aes_tv[i].plaintext;
sg[0].page = virt_to_page(p);
sg[0].offset = ((long) p & ~PAGE_MASK);
sg[0].length = aes_tv[i].plen;
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, aes_tv[i].rlen);
printk("%s\n", memcmp(q, aes_tv[i].result, aes_tv[i].rlen) ?
"fail" : "pass");
}
out:
crypto_free_tfm(tfm);
}
static void
test_available(void)
{
......@@ -2011,6 +2116,7 @@ do_test(void)
test_blowfish();
test_twofish();
test_serpent();
test_aes();
#ifdef CONFIG_CRYPTO_HMAC
test_hmac_md5();
test_hmac_sha1();
......@@ -2054,6 +2160,10 @@ do_test(void)
test_serpent();
break;
case 10:
test_aes();
break;
#ifdef CONFIG_CRYPTO_HMAC
case 100:
test_hmac_md5();
......
......@@ -1480,4 +1480,97 @@ struct serpent_tv serpent_dec_tv_template[] =
}
};
/*
* AES test vectors.
*/
#define AES_ENC_TEST_VECTORS 3
#define AES_DEC_TEST_VECTORS 3
struct aes_tv {
unsigned int keylen;
unsigned int plen;
unsigned int rlen;
int fail;
char key[32];
char iv[8];
char plaintext[16];
char result[16];
};
struct aes_tv aes_enc_tv_template[] = {
/* From FIPS-197 */
{
16, 16, 16, 0,
{ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f },
{ 0 },
{ 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff },
{ 0x69, 0xc4, 0xe0, 0xd8, 0x6a, 0x7b, 0x04, 0x30,
0xd8, 0xcd, 0xb7, 0x80, 0x70, 0xb4, 0xc5, 0x5a },
},
{
24, 16, 16, 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 },
{ 0 },
{ 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff },
{ 0xdd, 0xa9, 0x7c, 0xa4, 0x86, 0x4c, 0xdf, 0xe0,
0x6e, 0xaf, 0x70, 0xa0, 0xec, 0x0d, 0x71, 0x91 },
},
{
32, 16, 16, 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 },
{ 0 },
{ 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff },
{ 0x8e, 0xa2, 0xb7, 0xca, 0x51, 0x67, 0x45, 0xbf,
0xea, 0xfc, 0x49, 0x90, 0x4b, 0x49, 0x60, 0x89 },
},
};
struct aes_tv aes_dec_tv_template[] = {
/* From FIPS-197 */
{
16, 16, 16, 0,
{ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f },
{ 0 },
{ 0x69, 0xc4, 0xe0, 0xd8, 0x6a, 0x7b, 0x04, 0x30,
0xd8, 0xcd, 0xb7, 0x80, 0x70, 0xb4, 0xc5, 0x5a },
{ 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff },
},
{
24, 16, 16, 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 },
{ 0 },
{ 0xdd, 0xa9, 0x7c, 0xa4, 0x86, 0x4c, 0xdf, 0xe0,
0x6e, 0xaf, 0x70, 0xa0, 0xec, 0x0d, 0x71, 0x91 },
{ 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff },
},
{
32, 16, 16, 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 },
{ 0 },
{ 0x8e, 0xa2, 0xb7, 0xca, 0x51, 0x67, 0x45, 0xbf,
0xea, 0xfc, 0x49, 0x90, 0x4b, 0x49, 0x60, 0x89 },
{ 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff },
},
};
#endif /* _CRYPTO_TCRYPT_H */
......@@ -44,9 +44,24 @@ struct acpi_handle_list {
/* acpi_utils.h */
acpi_status acpi_extract_package (acpi_object *, acpi_buffer *, acpi_buffer *);
acpi_status acpi_evaluate_integer (acpi_handle, acpi_string, acpi_object_list *, unsigned long *);
acpi_status acpi_evaluate_reference (acpi_handle, acpi_string, acpi_object_list *, struct acpi_handle_list *);
acpi_status
acpi_extract_package (
union acpi_object *package,
struct acpi_buffer *format,
struct acpi_buffer *buffer);
acpi_status
acpi_evaluate_integer (
acpi_handle handle,
acpi_string pathname,
struct acpi_object_list *arguments,
unsigned long *data);
acpi_status
acpi_evaluate_reference (
acpi_handle handle,
acpi_string pathname,
struct acpi_object_list *arguments,
struct acpi_handle_list *list);
#ifdef CONFIG_ACPI_BUS
......
......@@ -55,7 +55,7 @@
/* ACPI PCI Root Bridge (pci_root.c) */
void acpi_pci_get_translations (acpi_pci_id* id, u64* mem_tra, u64* io_tra);
void acpi_pci_get_translations (struct acpi_pci_id* id, u64* mem_tra, u64* io_tra);
/* ACPI PCI Interrupt Link (pci_link.c) */
......@@ -71,7 +71,7 @@ int acpi_pci_irq_add_prt (acpi_handle handle, int segment, int bus);
struct pci_bus;
int acpi_pci_bind (struct acpi_device *device);
int acpi_pci_bind_root (struct acpi_device *device, acpi_pci_id *id, struct pci_bus *bus);
int acpi_pci_bind_root (struct acpi_device *device, struct acpi_pci_id *id, struct pci_bus *bus);
#endif /*CONFIG_ACPI_PCI*/
......
......@@ -127,11 +127,11 @@ acpi_battery_get_info (
{
int result = 0;
acpi_status status = 0;
acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
acpi_buffer format = {sizeof(ACPI_BATTERY_FORMAT_BIF),
struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
struct acpi_buffer format = {sizeof(ACPI_BATTERY_FORMAT_BIF),
ACPI_BATTERY_FORMAT_BIF};
acpi_buffer data = {0, NULL};
acpi_object *package = NULL;
struct acpi_buffer data = {0, NULL};
union acpi_object *package = NULL;
ACPI_FUNCTION_TRACE("acpi_battery_get_info");
......@@ -146,7 +146,7 @@ acpi_battery_get_info (
return_VALUE(-ENODEV);
}
package = (acpi_object *) buffer.pointer;
package = (union acpi_object *) buffer.pointer;
/* Extract Package Data */
......@@ -188,11 +188,11 @@ acpi_battery_get_status (
{
int result = 0;
acpi_status status = 0;
acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
acpi_buffer format = {sizeof(ACPI_BATTERY_FORMAT_BST),
struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
struct acpi_buffer format = {sizeof(ACPI_BATTERY_FORMAT_BST),
ACPI_BATTERY_FORMAT_BST};
acpi_buffer data = {0, NULL};
acpi_object *package = NULL;
struct acpi_buffer data = {0, NULL};
union acpi_object *package = NULL;
ACPI_FUNCTION_TRACE("acpi_battery_get_status");
......@@ -207,7 +207,7 @@ acpi_battery_get_status (
return_VALUE(-ENODEV);
}
package = (acpi_object *) buffer.pointer;
package = (union acpi_object *) buffer.pointer;
/* Extract Package Data */
......@@ -249,8 +249,8 @@ acpi_battery_set_alarm (
unsigned long alarm)
{
acpi_status status = 0;
acpi_object arg0 = {ACPI_TYPE_INTEGER};
acpi_object_list arg_list = {1, &arg0};
union acpi_object arg0 = {ACPI_TYPE_INTEGER};
struct acpi_object_list arg_list = {1, &arg0};
ACPI_FUNCTION_TRACE("acpi_battery_set_alarm");
......
......@@ -540,8 +540,8 @@ static int __init
acpi_bus_init_irq (void)
{
acpi_status status = AE_OK;
acpi_object arg = {ACPI_TYPE_INTEGER};
acpi_object_list arg_list = {1, &arg};
union acpi_object arg = {ACPI_TYPE_INTEGER};
struct acpi_object_list arg_list = {1, &arg};
char *message = NULL;
ACPI_FUNCTION_TRACE("acpi_bus_init_irq");
......@@ -585,7 +585,7 @@ acpi_bus_init (void)
{
int result = 0;
acpi_status status = AE_OK;
acpi_buffer buffer = {sizeof(acpi_fadt), &acpi_fadt};
struct acpi_buffer buffer = {sizeof(acpi_fadt), &acpi_fadt};
ACPI_FUNCTION_TRACE("acpi_bus_init");
......
......@@ -38,6 +38,7 @@
#define ACPI_BUTTON_DRIVER_NAME "ACPI Button Driver"
#define ACPI_BUTTON_CLASS "button"
#define ACPI_BUTTON_FILE_INFO "info"
#define ACPI_BUTTON_FILE_STATE "state"
#define ACPI_BUTTON_TYPE_UNKNOWN 0x00
#define ACPI_BUTTON_NOTIFY_STATUS 0x80
......@@ -68,9 +69,10 @@ MODULE_DESCRIPTION(ACPI_BUTTON_DRIVER_NAME);
MODULE_LICENSE("GPL");
int acpi_button_add (struct acpi_device *device);
int acpi_button_remove (struct acpi_device *device, int type);
static int acpi_button_open_fs(struct inode *inode, struct file *file);
static int acpi_button_add (struct acpi_device *device);
static int acpi_button_remove (struct acpi_device *device, int type);
static int acpi_button_info_open_fs(struct inode *inode, struct file *file);
static int acpi_button_state_open_fs(struct inode *inode, struct file *file);
static struct acpi_driver acpi_button_driver = {
.name = ACPI_BUTTON_DRIVER_NAME,
......@@ -89,24 +91,30 @@ struct acpi_button {
unsigned long pushed;
};
static struct file_operations acpi_button_fops = {
.open = acpi_button_open_fs,
static struct file_operations acpi_button_info_fops = {
.open = acpi_button_info_open_fs,
.read = seq_read,
.llseek = seq_lseek,
.release = single_release,
};
static struct file_operations acpi_button_state_fops = {
.open = acpi_button_state_open_fs,
.read = seq_read,
.llseek = seq_lseek,
.release = single_release,
};
/* --------------------------------------------------------------------------
FS Interface (/proc)
-------------------------------------------------------------------------- */
static struct proc_dir_entry *acpi_button_dir = NULL;
static int acpi_button_seq_show(struct seq_file *seq, void *offset)
static int acpi_button_info_seq_show(struct seq_file *seq, void *offset)
{
struct acpi_button *button = (struct acpi_button *) seq->private;
ACPI_FUNCTION_TRACE("acpi_button_seq_show");
ACPI_FUNCTION_TRACE("acpi_button_info_seq_show");
if (!button || !button->device)
return 0;
......@@ -117,11 +125,38 @@ static int acpi_button_seq_show(struct seq_file *seq, void *offset)
return 0;
}
static int acpi_button_open_fs(struct inode *inode, struct file *file)
static int acpi_button_info_open_fs(struct inode *inode, struct file *file)
{
return single_open(file, acpi_button_seq_show, PDE(inode)->data);
return single_open(file, acpi_button_info_seq_show, PDE(inode)->data);
}
static int acpi_button_state_seq_show(struct seq_file *seq, void *offset)
{
struct acpi_button *button = (struct acpi_button *) seq->private;
acpi_status status;
unsigned long state;
ACPI_FUNCTION_TRACE("acpi_button_state_seq_show");
if (!button || !button->device)
return 0;
status = acpi_evaluate_integer(button->handle,"_LID",NULL,&state);
if (ACPI_FAILURE(status)) {
seq_printf(seq, "state: unsupported\n");
}
else{
seq_printf(seq, "state: %s\n", (state ? "open" : "closed"));
}
return 0;
}
static int acpi_button_state_open_fs(struct inode *inode, struct file *file)
{
return single_open(file, acpi_button_state_seq_show, PDE(inode)->data);
}
static int
acpi_button_add_fs (
struct acpi_device *device)
......@@ -165,10 +200,24 @@ acpi_button_add_fs (
"Unable to create '%s' fs entry\n",
ACPI_BUTTON_FILE_INFO));
else {
entry->proc_fops = &acpi_button_fops;
entry->proc_fops = &acpi_button_info_fops;
entry->data = acpi_driver_data(device);
}
/* show lid state [R] */
if (button->type == ACPI_BUTTON_TYPE_LID) {
entry = create_proc_entry(ACPI_BUTTON_FILE_STATE,
S_IRUGO, acpi_device_dir(device));
if (!entry)
ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
"Unable to create '%s' fs entry\n",
ACPI_BUTTON_FILE_INFO));
else {
entry->proc_fops = &acpi_button_state_fops;
entry->data = acpi_driver_data(device);
}
}
return_VALUE(0);
}
......@@ -236,7 +285,7 @@ acpi_button_notify_fixed (
}
int
static int
acpi_button_add (
struct acpi_device *device)
{
......@@ -386,7 +435,7 @@ acpi_button_add (
}
int
static int
acpi_button_remove (struct acpi_device *device, int type)
{
acpi_status status = 0;
......
......@@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2002, R. Byron Moore
* Copyright (C) 2000 - 2003, 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
......@@ -57,15 +57,15 @@
acpi_status
acpi_ds_create_buffer_field (
acpi_parse_object *op,
acpi_walk_state *walk_state)
union acpi_parse_object *op,
struct acpi_walk_state *walk_state)
{
acpi_parse_object *arg;
acpi_namespace_node *node;
acpi_status status;
acpi_operand_object *obj_desc;
acpi_operand_object *second_desc = NULL;
u32 flags;
union acpi_parse_object *arg;
struct acpi_namespace_node *node;
acpi_status status;
union acpi_operand_object *obj_desc;
union acpi_operand_object *second_desc = NULL;
u32 flags;
ACPI_FUNCTION_TRACE ("ds_create_buffer_field");
......@@ -182,12 +182,12 @@ acpi_ds_create_buffer_field (
acpi_status
acpi_ds_get_field_names (
acpi_create_field_info *info,
acpi_walk_state *walk_state,
acpi_parse_object *arg)
struct acpi_create_field_info *info,
struct acpi_walk_state *walk_state,
union acpi_parse_object *arg)
{
acpi_status status;
acpi_integer position;
acpi_status status;
acpi_integer position;
ACPI_FUNCTION_TRACE_PTR ("ds_get_field_names", info);
......@@ -309,13 +309,13 @@ acpi_ds_get_field_names (
acpi_status
acpi_ds_create_field (
acpi_parse_object *op,
acpi_namespace_node *region_node,
acpi_walk_state *walk_state)
union acpi_parse_object *op,
struct acpi_namespace_node *region_node,
struct acpi_walk_state *walk_state)
{
acpi_status status;
acpi_parse_object *arg;
acpi_create_field_info info;
acpi_status status;
union acpi_parse_object *arg;
struct acpi_create_field_info info;
ACPI_FUNCTION_TRACE_PTR ("ds_create_field", op);
......@@ -368,13 +368,13 @@ acpi_ds_create_field (
acpi_status
acpi_ds_init_field_objects (
acpi_parse_object *op,
acpi_walk_state *walk_state)
union acpi_parse_object *op,
struct acpi_walk_state *walk_state)
{
acpi_status status;
acpi_parse_object *arg = NULL;
acpi_namespace_node *node;
u8 type = 0;
acpi_status status;
union acpi_parse_object *arg = NULL;
struct acpi_namespace_node *node;
u8 type = 0;
ACPI_FUNCTION_TRACE_PTR ("ds_init_field_objects", op);
......@@ -451,13 +451,13 @@ acpi_ds_init_field_objects (
acpi_status
acpi_ds_create_bank_field (
acpi_parse_object *op,
acpi_namespace_node *region_node,
acpi_walk_state *walk_state)
union acpi_parse_object *op,
struct acpi_namespace_node *region_node,
struct acpi_walk_state *walk_state)
{
acpi_status status;
acpi_parse_object *arg;
acpi_create_field_info info;
acpi_status status;
union acpi_parse_object *arg;
struct acpi_create_field_info info;
ACPI_FUNCTION_TRACE_PTR ("ds_create_bank_field", op);
......@@ -524,13 +524,13 @@ acpi_ds_create_bank_field (
acpi_status
acpi_ds_create_index_field (
acpi_parse_object *op,
acpi_namespace_node *region_node,
acpi_walk_state *walk_state)
union acpi_parse_object *op,
struct acpi_namespace_node *region_node,
struct acpi_walk_state *walk_state)
{
acpi_status status;
acpi_parse_object *arg;
acpi_create_field_info info;
acpi_status status;
union acpi_parse_object *arg;
struct acpi_create_field_info info;
ACPI_FUNCTION_TRACE_PTR ("ds_create_index_field", op);
......
......@@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2002, R. Byron Moore
* Copyright (C) 2000 - 2003, 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
......@@ -56,14 +56,14 @@
acpi_status
acpi_ds_init_one_object (
acpi_handle obj_handle,
u32 level,
void *context,
void **return_value)
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_object_type type;
acpi_status status;
struct acpi_init_walk_info *info = (struct acpi_init_walk_info *) context;
ACPI_FUNCTION_NAME ("ds_init_one_object");
......@@ -73,7 +73,7 @@ acpi_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 !=
if (((struct acpi_namespace_node *) obj_handle)->owner_id !=
info->table_desc->table_id) {
return (AE_OK);
}
......@@ -90,7 +90,7 @@ acpi_ds_init_one_object (
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,
obj_handle, ((struct acpi_namespace_node *) obj_handle)->name.ascii,
acpi_format_exception (status)));
}
......@@ -115,7 +115,7 @@ acpi_ds_init_one_object (
* 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;
((struct acpi_namespace_node *) obj_handle)->flags |= ANOBJ_DATA_WIDTH_32;
}
/*
......@@ -125,7 +125,7 @@ acpi_ds_init_one_object (
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,
obj_handle, ((struct acpi_namespace_node *) obj_handle)->name.ascii,
acpi_format_exception (status)));
/* This parse failed, but we will continue parsing more methods */
......@@ -138,7 +138,7 @@ acpi_ds_init_one_object (
* 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);
acpi_ns_delete_namespace_by_owner (((struct acpi_namespace_node *) obj_handle)->object->method.owning_id);
break;
......@@ -176,11 +176,11 @@ acpi_ds_init_one_object (
acpi_status
acpi_ds_initialize_objects (
acpi_table_desc *table_desc,
acpi_namespace_node *start_node)
struct acpi_table_desc *table_desc,
struct acpi_namespace_node *start_node)
{
acpi_status status;
acpi_init_walk_info info;
acpi_status status;
struct acpi_init_walk_info info;
ACPI_FUNCTION_TRACE ("ds_initialize_objects");
......
......@@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2002, R. Byron Moore
* Copyright (C) 2000 - 2003, 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
......@@ -55,14 +55,14 @@
acpi_status
acpi_ds_parse_method (
acpi_handle obj_handle)
acpi_handle obj_handle)
{
acpi_status status;
acpi_operand_object *obj_desc;
acpi_parse_object *op;
acpi_namespace_node *node;
acpi_owner_id owner_id;
acpi_walk_state *walk_state;
acpi_status status;
union acpi_operand_object *obj_desc;
union acpi_parse_object *op;
struct acpi_namespace_node *node;
acpi_owner_id owner_id;
struct acpi_walk_state *walk_state;
ACPI_FUNCTION_TRACE_PTR ("ds_parse_method", obj_handle);
......@@ -75,11 +75,11 @@ acpi_ds_parse_method (
}
ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, "**** Parsing [%4.4s] **** named_obj=%p\n",
((acpi_namespace_node *) obj_handle)->name.ascii, obj_handle));
((struct acpi_namespace_node *) obj_handle)->name.ascii, obj_handle));
/* Extract the method object from the method Node */
node = (acpi_namespace_node *) obj_handle;
node = (struct acpi_namespace_node *) obj_handle;
obj_desc = acpi_ns_get_attached_object (node);
if (!obj_desc) {
return_ACPI_STATUS (AE_NULL_OBJECT);
......@@ -150,7 +150,7 @@ acpi_ds_parse_method (
ACPI_DEBUG_PRINT ((ACPI_DB_PARSE,
"**** [%4.4s] Parsed **** named_obj=%p Op=%p\n",
((acpi_namespace_node *) obj_handle)->name.ascii, obj_handle, op));
((struct acpi_namespace_node *) obj_handle)->name.ascii, obj_handle, op));
acpi_ps_delete_parse_tree (op);
return_ACPI_STATUS (status);
......@@ -177,11 +177,11 @@ acpi_ds_parse_method (
acpi_status
acpi_ds_begin_method_execution (
acpi_namespace_node *method_node,
acpi_operand_object *obj_desc,
acpi_namespace_node *calling_method_node)
struct acpi_namespace_node *method_node,
union acpi_operand_object *obj_desc,
struct acpi_namespace_node *calling_method_node)
{
acpi_status status = AE_OK;
acpi_status status = AE_OK;
ACPI_FUNCTION_TRACE_PTR ("ds_begin_method_execution", method_node);
......@@ -242,15 +242,15 @@ acpi_ds_begin_method_execution (
acpi_status
acpi_ds_call_control_method (
acpi_thread_state *thread,
acpi_walk_state *this_walk_state,
acpi_parse_object *op)
struct acpi_thread_state *thread,
struct acpi_walk_state *this_walk_state,
union acpi_parse_object *op)
{
acpi_status status;
acpi_namespace_node *method_node;
acpi_operand_object *obj_desc;
acpi_walk_state *next_walk_state;
u32 i;
acpi_status status;
struct acpi_namespace_node *method_node;
union acpi_operand_object *obj_desc;
struct acpi_walk_state *next_walk_state;
u32 i;
ACPI_FUNCTION_TRACE_PTR ("ds_call_control_method", this_walk_state);
......@@ -376,10 +376,10 @@ acpi_ds_call_control_method (
acpi_status
acpi_ds_restart_control_method (
acpi_walk_state *walk_state,
acpi_operand_object *return_desc)
struct acpi_walk_state *walk_state,
union acpi_operand_object *return_desc)
{
acpi_status status;
acpi_status status;
ACPI_FUNCTION_TRACE_PTR ("ds_restart_control_method", walk_state);
......@@ -431,11 +431,11 @@ acpi_ds_restart_control_method (
acpi_status
acpi_ds_terminate_control_method (
acpi_walk_state *walk_state)
struct acpi_walk_state *walk_state)
{
acpi_operand_object *obj_desc;
acpi_namespace_node *method_node;
acpi_status status;
union acpi_operand_object *obj_desc;
struct acpi_namespace_node *method_node;
acpi_status status;
ACPI_FUNCTION_TRACE_PTR ("ds_terminate_control_method", walk_state);
......
......@@ -5,7 +5,7 @@
******************************************************************************/
/*
* Copyright (C) 2000 - 2002, R. Byron Moore
* Copyright (C) 2000 - 2003, 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
......@@ -57,9 +57,9 @@
void
acpi_ds_method_data_init (
acpi_walk_state *walk_state)
struct acpi_walk_state *walk_state)
{
u32 i;
u32 i;
ACPI_FUNCTION_TRACE ("ds_method_data_init");
......@@ -107,9 +107,9 @@ acpi_ds_method_data_init (
void
acpi_ds_method_data_delete_all (
acpi_walk_state *walk_state)
struct acpi_walk_state *walk_state)
{
u32 index;
u32 index;
ACPI_FUNCTION_TRACE ("ds_method_data_delete_all");
......@@ -163,12 +163,12 @@ acpi_ds_method_data_delete_all (
acpi_status
acpi_ds_method_data_init_args (
acpi_operand_object **params,
u32 max_param_count,
acpi_walk_state *walk_state)
union acpi_operand_object **params,
u32 max_param_count,
struct acpi_walk_state *walk_state)
{
acpi_status status;
u32 index = 0;
acpi_status status;
u32 index = 0;
ACPI_FUNCTION_TRACE_PTR ("ds_method_data_init_args", params);
......@@ -215,10 +215,10 @@ acpi_ds_method_data_init_args (
acpi_status
acpi_ds_method_data_get_node (
u16 opcode,
u32 index,
acpi_walk_state *walk_state,
acpi_namespace_node **node)
u16 opcode,
u32 index,
struct acpi_walk_state *walk_state,
struct acpi_namespace_node **node)
{
ACPI_FUNCTION_TRACE ("ds_method_data_get_node");
......@@ -280,14 +280,14 @@ acpi_ds_method_data_get_node (
acpi_status
acpi_ds_method_data_set_value (
u16 opcode,
u32 index,
acpi_operand_object *object,
acpi_walk_state *walk_state)
u16 opcode,
u32 index,
union acpi_operand_object *object,
struct acpi_walk_state *walk_state)
{
acpi_status status;
acpi_namespace_node *node;
acpi_operand_object *new_desc = object;
acpi_status status;
struct acpi_namespace_node *node;
union acpi_operand_object *new_desc = object;
ACPI_FUNCTION_TRACE ("ds_method_data_set_value");
......@@ -347,13 +347,13 @@ acpi_ds_method_data_set_value (
acpi_object_type
acpi_ds_method_data_get_type (
u16 opcode,
u32 index,
acpi_walk_state *walk_state)
u16 opcode,
u32 index,
struct acpi_walk_state *walk_state)
{
acpi_status status;
acpi_namespace_node *node;
acpi_operand_object *object;
acpi_status status;
struct acpi_namespace_node *node;
union acpi_operand_object *object;
ACPI_FUNCTION_TRACE ("ds_method_data_get_type");
......@@ -401,14 +401,14 @@ acpi_ds_method_data_get_type (
acpi_status
acpi_ds_method_data_get_value (
u16 opcode,
u32 index,
acpi_walk_state *walk_state,
acpi_operand_object **dest_desc)
u16 opcode,
u32 index,
struct acpi_walk_state *walk_state,
union acpi_operand_object **dest_desc)
{
acpi_status status;
acpi_namespace_node *node;
acpi_operand_object *object;
acpi_status status;
struct acpi_namespace_node *node;
union acpi_operand_object *object;
ACPI_FUNCTION_TRACE ("ds_method_data_get_value");
......@@ -490,13 +490,13 @@ acpi_ds_method_data_get_value (
void
acpi_ds_method_data_delete_value (
u16 opcode,
u32 index,
acpi_walk_state *walk_state)
u16 opcode,
u32 index,
struct acpi_walk_state *walk_state)
{
acpi_status status;
acpi_namespace_node *node;
acpi_operand_object *object;
acpi_status status;
struct acpi_namespace_node *node;
union acpi_operand_object *object;
ACPI_FUNCTION_TRACE ("ds_method_data_delete_value");
......@@ -553,14 +553,14 @@ acpi_ds_method_data_delete_value (
acpi_status
acpi_ds_store_object_to_local (
u16 opcode,
u32 index,
acpi_operand_object *obj_desc,
acpi_walk_state *walk_state)
u16 opcode,
u32 index,
union acpi_operand_object *obj_desc,
struct acpi_walk_state *walk_state)
{
acpi_status status;
acpi_namespace_node *node;
acpi_operand_object *current_obj_desc;
acpi_status status;
struct acpi_namespace_node *node;
union acpi_operand_object *current_obj_desc;
ACPI_FUNCTION_TRACE ("ds_store_object_to_local");
......
......@@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2002, R. Byron Moore
* Copyright (C) 2000 - 2003, 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
......@@ -52,12 +52,12 @@
acpi_status
acpi_ds_build_internal_object (
acpi_walk_state *walk_state,
acpi_parse_object *op,
acpi_operand_object **obj_desc_ptr)
struct acpi_walk_state *walk_state,
union acpi_parse_object *op,
union acpi_operand_object **obj_desc_ptr)
{
acpi_operand_object *obj_desc;
acpi_status status;
union acpi_operand_object *obj_desc;
acpi_status status;
ACPI_FUNCTION_TRACE ("ds_build_internal_object");
......@@ -74,7 +74,7 @@ acpi_ds_build_internal_object (
status = acpi_ns_lookup (walk_state->scope_info, op->common.value.string,
ACPI_TYPE_ANY, ACPI_IMODE_EXECUTE,
ACPI_NS_SEARCH_PARENT | ACPI_NS_DONT_OPEN_SCOPE, NULL,
(acpi_namespace_node **) &(op->common.node));
(struct acpi_namespace_node **) &(op->common.node));
if (ACPI_FAILURE (status)) {
ACPI_REPORT_NSERROR (op->common.value.string, status);
......@@ -119,15 +119,15 @@ acpi_ds_build_internal_object (
acpi_status
acpi_ds_build_internal_buffer_obj (
acpi_walk_state *walk_state,
acpi_parse_object *op,
u32 buffer_length,
acpi_operand_object **obj_desc_ptr)
struct acpi_walk_state *walk_state,
union acpi_parse_object *op,
u32 buffer_length,
union acpi_operand_object **obj_desc_ptr)
{
acpi_parse_object *arg;
acpi_operand_object *obj_desc;
acpi_parse_object *byte_list;
u32 byte_list_length = 0;
union acpi_parse_object *arg;
union acpi_operand_object *obj_desc;
union acpi_parse_object *byte_list;
u32 byte_list_length = 0;
ACPI_FUNCTION_TRACE ("ds_build_internal_buffer_obj");
......@@ -204,7 +204,7 @@ acpi_ds_build_internal_buffer_obj (
}
obj_desc->buffer.flags |= AOPOBJ_DATA_VALID;
op->common.node = (acpi_namespace_node *) obj_desc;
op->common.node = (struct acpi_namespace_node *) obj_desc;
return_ACPI_STATUS (AE_OK);
}
......@@ -227,17 +227,17 @@ acpi_ds_build_internal_buffer_obj (
acpi_status
acpi_ds_build_internal_package_obj (
acpi_walk_state *walk_state,
acpi_parse_object *op,
u32 package_length,
acpi_operand_object **obj_desc_ptr)
struct acpi_walk_state *walk_state,
union acpi_parse_object *op,
u32 package_length,
union acpi_operand_object **obj_desc_ptr)
{
acpi_parse_object *arg;
acpi_parse_object *parent;
acpi_operand_object *obj_desc = NULL;
u32 package_list_length;
acpi_status status = AE_OK;
u32 i;
union acpi_parse_object *arg;
union acpi_parse_object *parent;
union acpi_operand_object *obj_desc = NULL;
u32 package_list_length;
acpi_status status = AE_OK;
u32 i;
ACPI_FUNCTION_TRACE ("ds_build_internal_package_obj");
......@@ -311,7 +311,7 @@ acpi_ds_build_internal_package_obj (
if (arg->common.aml_opcode == AML_INT_RETURN_VALUE_OP) {
/* Object (package or buffer) is already built */
obj_desc->package.elements[i] = ACPI_CAST_PTR (acpi_operand_object, arg->common.node);
obj_desc->package.elements[i] = ACPI_CAST_PTR (union acpi_operand_object, arg->common.node);
}
else {
status = acpi_ds_build_internal_object (walk_state, arg,
......@@ -323,7 +323,7 @@ acpi_ds_build_internal_package_obj (
}
obj_desc->package.flags |= AOPOBJ_DATA_VALID;
op->common.node = (acpi_namespace_node *) obj_desc;
op->common.node = (struct acpi_namespace_node *) obj_desc;
return_ACPI_STATUS (status);
}
......@@ -344,12 +344,12 @@ acpi_ds_build_internal_package_obj (
acpi_status
acpi_ds_create_node (
acpi_walk_state *walk_state,
acpi_namespace_node *node,
acpi_parse_object *op)
struct acpi_walk_state *walk_state,
struct acpi_namespace_node *node,
union acpi_parse_object *op)
{
acpi_status status;
acpi_operand_object *obj_desc;
acpi_status status;
union acpi_operand_object *obj_desc;
ACPI_FUNCTION_TRACE_PTR ("ds_create_node", op);
......@@ -413,14 +413,14 @@ acpi_ds_create_node (
acpi_status
acpi_ds_init_object_from_op (
acpi_walk_state *walk_state,
acpi_parse_object *op,
u16 opcode,
acpi_operand_object **ret_obj_desc)
struct acpi_walk_state *walk_state,
union acpi_parse_object *op,
u16 opcode,
union acpi_operand_object **ret_obj_desc)
{
const acpi_opcode_info *op_info;
acpi_operand_object *obj_desc;
acpi_status status = AE_OK;
const struct acpi_opcode_info *op_info;
union acpi_operand_object *obj_desc;
acpi_status status = AE_OK;
ACPI_FUNCTION_TRACE ("ds_init_object_from_op");
......@@ -442,7 +442,7 @@ acpi_ds_init_object_from_op (
/*
* Defer evaluation of Buffer term_arg operand
*/
obj_desc->buffer.node = (acpi_namespace_node *) walk_state->operands[0];
obj_desc->buffer.node = (struct acpi_namespace_node *) walk_state->operands[0];
obj_desc->buffer.aml_start = op->named.data;
obj_desc->buffer.aml_length = op->named.length;
break;
......@@ -453,7 +453,7 @@ acpi_ds_init_object_from_op (
/*
* Defer evaluation of Package term_arg operand
*/
obj_desc->package.node = (acpi_namespace_node *) walk_state->operands[0];
obj_desc->package.node = (struct acpi_namespace_node *) walk_state->operands[0];
obj_desc->package.aml_start = op->named.data;
obj_desc->package.aml_length = op->named.length;
break;
......@@ -551,7 +551,7 @@ acpi_ds_init_object_from_op (
#ifndef ACPI_NO_METHOD_EXECUTION
status = acpi_ds_method_data_get_node (AML_LOCAL_OP, obj_desc->reference.offset,
walk_state, (acpi_namespace_node **) &obj_desc->reference.object);
walk_state, (struct acpi_namespace_node **) &obj_desc->reference.object);
#endif
break;
......
......@@ -6,7 +6,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2002, R. Byron Moore
* Copyright (C) 2000 - 2003, 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
......@@ -52,15 +52,15 @@
acpi_status
acpi_ds_execute_arguments (
acpi_namespace_node *node,
acpi_namespace_node *scope_node,
u32 aml_length,
u8 *aml_start)
struct acpi_namespace_node *node,
struct acpi_namespace_node *scope_node,
u32 aml_length,
u8 *aml_start)
{
acpi_status status;
acpi_parse_object *op;
acpi_walk_state *walk_state;
acpi_parse_object *arg;
acpi_status status;
union acpi_parse_object *op;
struct acpi_walk_state *walk_state;
union acpi_parse_object *arg;
ACPI_FUNCTION_TRACE ("acpi_ds_execute_arguments");
......@@ -153,11 +153,11 @@ acpi_ds_execute_arguments (
acpi_status
acpi_ds_get_buffer_field_arguments (
acpi_operand_object *obj_desc)
union acpi_operand_object *obj_desc)
{
acpi_operand_object *extra_desc;
acpi_namespace_node *node;
acpi_status status;
union acpi_operand_object *extra_desc;
struct acpi_namespace_node *node;
acpi_status status;
ACPI_FUNCTION_TRACE_PTR ("ds_get_buffer_field_arguments", obj_desc);
......@@ -199,10 +199,10 @@ acpi_ds_get_buffer_field_arguments (
acpi_status
acpi_ds_get_buffer_arguments (
acpi_operand_object *obj_desc)
union acpi_operand_object *obj_desc)
{
acpi_namespace_node *node;
acpi_status status;
struct acpi_namespace_node *node;
acpi_status status;
ACPI_FUNCTION_TRACE_PTR ("ds_get_buffer_arguments", obj_desc);
......@@ -246,10 +246,10 @@ acpi_ds_get_buffer_arguments (
acpi_status
acpi_ds_get_package_arguments (
acpi_operand_object *obj_desc)
union acpi_operand_object *obj_desc)
{
acpi_namespace_node *node;
acpi_status status;
struct acpi_namespace_node *node;
acpi_status status;
ACPI_FUNCTION_TRACE_PTR ("ds_get_package_arguments", obj_desc);
......@@ -293,11 +293,11 @@ acpi_ds_get_package_arguments (
acpi_status
acpi_ds_get_region_arguments (
acpi_operand_object *obj_desc)
union acpi_operand_object *obj_desc)
{
acpi_namespace_node *node;
acpi_status status;
acpi_operand_object *extra_desc;
struct acpi_namespace_node *node;
acpi_status status;
union acpi_operand_object *extra_desc;
ACPI_FUNCTION_TRACE_PTR ("ds_get_region_arguments", obj_desc);
......@@ -342,10 +342,10 @@ acpi_ds_get_region_arguments (
acpi_status
acpi_ds_initialize_region (
acpi_handle obj_handle)
acpi_handle obj_handle)
{
acpi_operand_object *obj_desc;
acpi_status status;
union acpi_operand_object *obj_desc;
acpi_status status;
obj_desc = acpi_ns_get_attached_object (obj_handle);
......@@ -376,18 +376,18 @@ acpi_ds_initialize_region (
acpi_status
acpi_ds_init_buffer_field (
u16 aml_opcode,
acpi_operand_object *obj_desc,
acpi_operand_object *buffer_desc,
acpi_operand_object *offset_desc,
acpi_operand_object *length_desc,
acpi_operand_object *result_desc)
u16 aml_opcode,
union acpi_operand_object *obj_desc,
union acpi_operand_object *buffer_desc,
union acpi_operand_object *offset_desc,
union acpi_operand_object *length_desc,
union acpi_operand_object *result_desc)
{
u32 offset;
u32 bit_offset;
u32 bit_count;
u8 field_flags;
acpi_status status;
u32 offset;
u32 bit_offset;
u32 bit_count;
u8 field_flags;
acpi_status status;
ACPI_FUNCTION_TRACE_PTR ("ds_init_buffer_field", obj_desc);
......@@ -558,13 +558,13 @@ acpi_ds_init_buffer_field (
acpi_status
acpi_ds_eval_buffer_field_operands (
acpi_walk_state *walk_state,
acpi_parse_object *op)
struct acpi_walk_state *walk_state,
union acpi_parse_object *op)
{
acpi_status status;
acpi_operand_object *obj_desc;
acpi_namespace_node *node;
acpi_parse_object *next_op;
acpi_status status;
union acpi_operand_object *obj_desc;
struct acpi_namespace_node *node;
union acpi_parse_object *next_op;
ACPI_FUNCTION_TRACE_PTR ("ds_eval_buffer_field_operands", op);
......@@ -645,14 +645,14 @@ acpi_ds_eval_buffer_field_operands (
acpi_status
acpi_ds_eval_region_operands (
acpi_walk_state *walk_state,
acpi_parse_object *op)
struct acpi_walk_state *walk_state,
union acpi_parse_object *op)
{
acpi_status status;
acpi_operand_object *obj_desc;
acpi_operand_object *operand_desc;
acpi_namespace_node *node;
acpi_parse_object *next_op;
acpi_status status;
union acpi_operand_object *obj_desc;
union acpi_operand_object *operand_desc;
struct acpi_namespace_node *node;
union acpi_parse_object *next_op;
ACPI_FUNCTION_TRACE_PTR ("ds_eval_region_operands", op);
......@@ -743,13 +743,13 @@ acpi_ds_eval_region_operands (
acpi_status
acpi_ds_eval_data_object_operands (
acpi_walk_state *walk_state,
acpi_parse_object *op,
acpi_operand_object *obj_desc)
struct acpi_walk_state *walk_state,
union acpi_parse_object *op,
union acpi_operand_object *obj_desc)
{
acpi_status status;
acpi_operand_object *arg_desc;
u32 length;
acpi_status status;
union acpi_operand_object *arg_desc;
u32 length;
ACPI_FUNCTION_TRACE ("ds_eval_data_object_operands");
......@@ -836,11 +836,11 @@ acpi_ds_eval_data_object_operands (
acpi_status
acpi_ds_exec_begin_control_op (
acpi_walk_state *walk_state,
acpi_parse_object *op)
struct acpi_walk_state *walk_state,
union acpi_parse_object *op)
{
acpi_status status = AE_OK;
acpi_generic_state *control_state;
acpi_status status = AE_OK;
union acpi_generic_state *control_state;
ACPI_FUNCTION_NAME ("ds_exec_begin_control_op");
......@@ -916,11 +916,11 @@ acpi_ds_exec_begin_control_op (
acpi_status
acpi_ds_exec_end_control_op (
acpi_walk_state *walk_state,
acpi_parse_object *op)
struct acpi_walk_state *walk_state,
union acpi_parse_object *op)
{
acpi_status status = AE_OK;
acpi_generic_state *control_state;
acpi_status status = AE_OK;
union acpi_generic_state *control_state;
ACPI_FUNCTION_NAME ("ds_exec_end_control_op");
......
......@@ -5,7 +5,7 @@
******************************************************************************/
/*
* Copyright (C) 2000 - 2002, R. Byron Moore
* Copyright (C) 2000 - 2003, 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
......@@ -52,10 +52,10 @@
u8
acpi_ds_is_result_used (
acpi_parse_object *op,
acpi_walk_state *walk_state)
union acpi_parse_object *op,
struct acpi_walk_state *walk_state)
{
const acpi_opcode_info *parent_info;
const struct acpi_opcode_info *parent_info;
ACPI_FUNCTION_TRACE_PTR ("ds_is_result_used", op);
......@@ -200,12 +200,12 @@ acpi_ds_is_result_used (
void
acpi_ds_delete_result_if_not_used (
acpi_parse_object *op,
acpi_operand_object *result_obj,
acpi_walk_state *walk_state)
union acpi_parse_object *op,
union acpi_operand_object *result_obj,
struct acpi_walk_state *walk_state)
{
acpi_operand_object *obj_desc;
acpi_status status;
union acpi_operand_object *obj_desc;
acpi_status status;
ACPI_FUNCTION_TRACE_PTR ("ds_delete_result_if_not_used", result_obj);
......@@ -251,10 +251,10 @@ acpi_ds_delete_result_if_not_used (
acpi_status
acpi_ds_resolve_operands (
acpi_walk_state *walk_state)
struct acpi_walk_state *walk_state)
{
u32 i;
acpi_status status = AE_OK;
u32 i;
acpi_status status = AE_OK;
ACPI_FUNCTION_TRACE_PTR ("ds_resolve_operands", walk_state);
......@@ -289,9 +289,9 @@ acpi_ds_resolve_operands (
void
acpi_ds_clear_operands (
acpi_walk_state *walk_state)
struct acpi_walk_state *walk_state)
{
u32 i;
u32 i;
ACPI_FUNCTION_TRACE_PTR ("acpi_ds_clear_operands", walk_state);
......@@ -333,18 +333,18 @@ acpi_ds_clear_operands (
acpi_status
acpi_ds_create_operand (
acpi_walk_state *walk_state,
acpi_parse_object *arg,
u32 arg_index)
struct acpi_walk_state *walk_state,
union acpi_parse_object *arg,
u32 arg_index)
{
acpi_status status = AE_OK;
char *name_string;
u32 name_length;
acpi_operand_object *obj_desc;
acpi_parse_object *parent_op;
u16 opcode;
acpi_interpreter_mode interpreter_mode;
const acpi_opcode_info *op_info;
acpi_status status = AE_OK;
char *name_string;
u32 name_length;
union acpi_operand_object *obj_desc;
union acpi_parse_object *parent_op;
u16 opcode;
acpi_interpreter_mode interpreter_mode;
const struct acpi_opcode_info *op_info;
ACPI_FUNCTION_TRACE_PTR ("ds_create_operand", arg);
......@@ -397,7 +397,7 @@ acpi_ds_create_operand (
ACPI_TYPE_ANY, interpreter_mode,
ACPI_NS_SEARCH_PARENT | ACPI_NS_DONT_OPEN_SCOPE,
walk_state,
ACPI_CAST_INDIRECT_PTR (acpi_namespace_node, &obj_desc));
ACPI_CAST_INDIRECT_PTR (struct acpi_namespace_node, &obj_desc));
/*
* The only case where we pass through (ignore) a NOT_FOUND
* error is for the cond_ref_of opcode.
......@@ -410,7 +410,7 @@ acpi_ds_create_operand (
* indicate this to the interpreter, set the
* object to the root
*/
obj_desc = ACPI_CAST_PTR (acpi_operand_object, acpi_gbl_root_node);
obj_desc = ACPI_CAST_PTR (union acpi_operand_object, acpi_gbl_root_node);
status = AE_OK;
}
......@@ -543,12 +543,12 @@ acpi_ds_create_operand (
acpi_status
acpi_ds_create_operands (
acpi_walk_state *walk_state,
acpi_parse_object *first_arg)
struct acpi_walk_state *walk_state,
union acpi_parse_object *first_arg)
{
acpi_status status = AE_OK;
acpi_parse_object *arg;
u32 arg_count = 0;
acpi_status status = AE_OK;
union acpi_parse_object *arg;
u32 arg_count = 0;
ACPI_FUNCTION_TRACE_PTR ("ds_create_operands", first_arg);
......
......@@ -6,7 +6,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2002, R. Byron Moore
* Copyright (C) 2000 - 2003, 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
......@@ -66,10 +66,10 @@ static ACPI_EXECUTE_OP acpi_gbl_op_type_dispatch [] = {
acpi_status
acpi_ds_get_predicate_value (
acpi_walk_state *walk_state,
acpi_operand_object *result_obj) {
acpi_status status = AE_OK;
acpi_operand_object *obj_desc;
struct acpi_walk_state *walk_state,
union acpi_operand_object *result_obj) {
acpi_status status = AE_OK;
union acpi_operand_object *obj_desc;
ACPI_FUNCTION_TRACE_PTR ("ds_get_predicate_value", walk_state);
......@@ -179,12 +179,12 @@ acpi_ds_get_predicate_value (
acpi_status
acpi_ds_exec_begin_op (
acpi_walk_state *walk_state,
acpi_parse_object **out_op)
struct acpi_walk_state *walk_state,
union acpi_parse_object **out_op)
{
acpi_parse_object *op;
acpi_status status = AE_OK;
u32 opcode_class;
union acpi_parse_object *op;
acpi_status status = AE_OK;
u32 opcode_class;
ACPI_FUNCTION_TRACE_PTR ("ds_exec_begin_op", walk_state);
......@@ -320,14 +320,14 @@ acpi_ds_exec_begin_op (
acpi_status
acpi_ds_exec_end_op (
acpi_walk_state *walk_state)
struct acpi_walk_state *walk_state)
{
acpi_parse_object *op;
acpi_status status = AE_OK;
u32 op_type;
u32 op_class;
acpi_parse_object *next_op;
acpi_parse_object *first_arg;
union acpi_parse_object *op;
acpi_status status = AE_OK;
u32 op_type;
u32 op_class;
union acpi_parse_object *next_op;
union acpi_parse_object *first_arg;
ACPI_FUNCTION_TRACE_PTR ("ds_exec_end_op", walk_state);
......
......@@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2002, R. Byron Moore
* Copyright (C) 2000 - 2003, 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
......@@ -51,8 +51,8 @@
acpi_status
acpi_ds_init_callbacks (
acpi_walk_state *walk_state,
u32 pass_number)
struct acpi_walk_state *walk_state,
u32 pass_number)
{
switch (pass_number) {
......@@ -100,15 +100,15 @@ acpi_ds_init_callbacks (
acpi_status
acpi_ds_load1_begin_op (
acpi_walk_state *walk_state,
acpi_parse_object **out_op)
struct acpi_walk_state *walk_state,
union acpi_parse_object **out_op)
{
acpi_parse_object *op;
acpi_namespace_node *node;
acpi_status status;
acpi_object_type object_type;
char *path;
u32 flags;
union acpi_parse_object *op;
struct acpi_namespace_node *node;
acpi_status status;
acpi_object_type object_type;
char *path;
u32 flags;
ACPI_FUNCTION_NAME ("ds_load1_begin_op");
......@@ -303,11 +303,11 @@ acpi_ds_load1_begin_op (
acpi_status
acpi_ds_load1_end_op (
acpi_walk_state *walk_state)
struct acpi_walk_state *walk_state)
{
acpi_parse_object *op;
acpi_object_type object_type;
acpi_status status = AE_OK;
union acpi_parse_object *op;
acpi_object_type object_type;
acpi_status status = AE_OK;
ACPI_FUNCTION_NAME ("ds_load1_end_op");
......@@ -415,14 +415,14 @@ acpi_ds_load1_end_op (
acpi_status
acpi_ds_load2_begin_op (
acpi_walk_state *walk_state,
acpi_parse_object **out_op)
struct acpi_walk_state *walk_state,
union acpi_parse_object **out_op)
{
acpi_parse_object *op;
acpi_namespace_node *node;
acpi_status status;
acpi_object_type object_type;
char *buffer_ptr;
union acpi_parse_object *op;
struct acpi_namespace_node *node;
acpi_status status;
acpi_object_type object_type;
char *buffer_ptr;
ACPI_FUNCTION_TRACE ("ds_load2_begin_op");
......@@ -627,16 +627,16 @@ acpi_ds_load2_begin_op (
acpi_status
acpi_ds_load2_end_op (
acpi_walk_state *walk_state)
struct acpi_walk_state *walk_state)
{
acpi_parse_object *op;
acpi_status status = AE_OK;
acpi_object_type object_type;
acpi_namespace_node *node;
acpi_parse_object *arg;
acpi_namespace_node *new_node;
union acpi_parse_object *op;
acpi_status status = AE_OK;
acpi_object_type object_type;
struct acpi_namespace_node *node;
union acpi_parse_object *arg;
struct acpi_namespace_node *new_node;
#ifndef ACPI_NO_METHOD_EXECUTION
u32 i;
u32 i;
#endif
......
......@@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2002, R. Byron Moore
* Copyright (C) 2000 - 2003, 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
......@@ -47,9 +47,9 @@
void
acpi_ds_scope_stack_clear (
acpi_walk_state *walk_state)
struct acpi_walk_state *walk_state)
{
acpi_generic_state *scope_info;
union acpi_generic_state *scope_info;
ACPI_FUNCTION_NAME ("ds_scope_stack_clear");
......@@ -81,12 +81,12 @@ acpi_ds_scope_stack_clear (
acpi_status
acpi_ds_scope_stack_push (
acpi_namespace_node *node,
acpi_object_type type,
acpi_walk_state *walk_state)
struct acpi_namespace_node *node,
acpi_object_type type,
struct acpi_walk_state *walk_state)
{
acpi_generic_state *scope_info;
acpi_generic_state *old_scope_info;
union acpi_generic_state *scope_info;
union acpi_generic_state *old_scope_info;
ACPI_FUNCTION_TRACE ("ds_scope_stack_push");
......@@ -168,10 +168,10 @@ acpi_ds_scope_stack_push (
acpi_status
acpi_ds_scope_stack_pop (
acpi_walk_state *walk_state)
struct acpi_walk_state *walk_state)
{
acpi_generic_state *scope_info;
acpi_generic_state *new_scope_info;
union acpi_generic_state *scope_info;
union acpi_generic_state *new_scope_info;
ACPI_FUNCTION_TRACE ("ds_scope_stack_pop");
......
......@@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2002, R. Byron Moore
* Copyright (C) 2000 - 2003, 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
......@@ -47,11 +47,11 @@
acpi_status
acpi_ds_result_insert (
void *object,
u32 index,
acpi_walk_state *walk_state)
void *object,
u32 index,
struct acpi_walk_state *walk_state)
{
acpi_generic_state *state;
union acpi_generic_state *state;
ACPI_FUNCTION_NAME ("ds_result_insert");
......@@ -83,7 +83,7 @@ acpi_ds_result_insert (
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
"Obj=%p [%s] State=%p Num=%X Cur=%X\n",
object, object ? acpi_ut_get_object_type_name ((acpi_operand_object *) object) : "NULL",
object, object ? acpi_ut_get_object_type_name ((union acpi_operand_object *) object) : "NULL",
walk_state, state->results.num_results, walk_state->current_result));
return (AE_OK);
......@@ -106,11 +106,11 @@ acpi_ds_result_insert (
acpi_status
acpi_ds_result_remove (
acpi_operand_object **object,
u32 index,
acpi_walk_state *walk_state)
union acpi_operand_object **object,
u32 index,
struct acpi_walk_state *walk_state)
{
acpi_generic_state *state;
union acpi_generic_state *state;
ACPI_FUNCTION_NAME ("ds_result_remove");
......@@ -170,11 +170,11 @@ acpi_ds_result_remove (
acpi_status
acpi_ds_result_pop (
acpi_operand_object **object,
acpi_walk_state *walk_state)
union acpi_operand_object **object,
struct acpi_walk_state *walk_state)
{
acpi_native_uint index;
acpi_generic_state *state;
acpi_native_uint index;
union acpi_generic_state *state;
ACPI_FUNCTION_NAME ("ds_result_pop");
......@@ -230,11 +230,11 @@ acpi_ds_result_pop (
acpi_status
acpi_ds_result_pop_from_bottom (
acpi_operand_object **object,
acpi_walk_state *walk_state)
union acpi_operand_object **object,
struct acpi_walk_state *walk_state)
{
acpi_native_uint index;
acpi_generic_state *state;
acpi_native_uint index;
union acpi_generic_state *state;
ACPI_FUNCTION_NAME ("ds_result_pop_from_bottom");
......@@ -296,10 +296,10 @@ acpi_ds_result_pop_from_bottom (
acpi_status
acpi_ds_result_push (
acpi_operand_object *object,
acpi_walk_state *walk_state)
union acpi_operand_object *object,
struct acpi_walk_state *walk_state)
{
acpi_generic_state *state;
union acpi_generic_state *state;
ACPI_FUNCTION_NAME ("ds_result_push");
......@@ -328,7 +328,7 @@ acpi_ds_result_push (
state->results.num_results++;
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Obj=%p [%s] State=%p Num=%X Cur=%X\n",
object, object ? acpi_ut_get_object_type_name ((acpi_operand_object *) object) : "NULL",
object, object ? acpi_ut_get_object_type_name ((union acpi_operand_object *) object) : "NULL",
walk_state, state->results.num_results, walk_state->current_result));
return (AE_OK);
......@@ -350,9 +350,9 @@ acpi_ds_result_push (
acpi_status
acpi_ds_result_stack_push (
acpi_walk_state *walk_state)
struct acpi_walk_state *walk_state)
{
acpi_generic_state *state;
union acpi_generic_state *state;
ACPI_FUNCTION_NAME ("ds_result_stack_push");
......@@ -386,9 +386,9 @@ acpi_ds_result_stack_push (
acpi_status
acpi_ds_result_stack_pop (
acpi_walk_state *walk_state)
struct acpi_walk_state *walk_state)
{
acpi_generic_state *state;
union acpi_generic_state *state;
ACPI_FUNCTION_NAME ("ds_result_stack_pop");
......@@ -429,9 +429,9 @@ acpi_ds_result_stack_pop (
acpi_status
acpi_ds_obj_stack_delete_all (
acpi_walk_state *walk_state)
struct acpi_walk_state *walk_state)
{
u32 i;
u32 i;
ACPI_FUNCTION_TRACE_PTR ("ds_obj_stack_delete_all", walk_state);
......@@ -465,8 +465,8 @@ acpi_ds_obj_stack_delete_all (
acpi_status
acpi_ds_obj_stack_push (
void *object,
acpi_walk_state *walk_state)
void *object,
struct acpi_walk_state *walk_state)
{
ACPI_FUNCTION_NAME ("ds_obj_stack_push");
......@@ -486,7 +486,7 @@ acpi_ds_obj_stack_push (
walk_state->num_operands++;
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "Obj=%p [%s] State=%p #Ops=%X\n",
object, acpi_ut_get_object_type_name ((acpi_operand_object *) object),
object, acpi_ut_get_object_type_name ((union acpi_operand_object *) object),
walk_state, walk_state->num_operands));
return (AE_OK);
......@@ -510,8 +510,8 @@ acpi_ds_obj_stack_push (
acpi_status
acpi_ds_obj_stack_pop_object (
acpi_operand_object **object,
acpi_walk_state *walk_state)
union acpi_operand_object **object,
struct acpi_walk_state *walk_state)
{
ACPI_FUNCTION_NAME ("ds_obj_stack_pop_object");
......@@ -569,10 +569,10 @@ acpi_ds_obj_stack_pop_object (
acpi_status
acpi_ds_obj_stack_pop (
u32 pop_count,
acpi_walk_state *walk_state)
u32 pop_count,
struct acpi_walk_state *walk_state)
{
u32 i;
u32 i;
ACPI_FUNCTION_NAME ("ds_obj_stack_pop");
......@@ -616,11 +616,11 @@ acpi_ds_obj_stack_pop (
acpi_status
acpi_ds_obj_stack_pop_and_delete (
u32 pop_count,
acpi_walk_state *walk_state)
u32 pop_count,
struct acpi_walk_state *walk_state)
{
u32 i;
acpi_operand_object *obj_desc;
u32 i;
union acpi_operand_object *obj_desc;
ACPI_FUNCTION_NAME ("ds_obj_stack_pop_and_delete");
......@@ -669,8 +669,8 @@ acpi_ds_obj_stack_pop_and_delete (
void *
acpi_ds_obj_stack_get_value (
u32 index,
acpi_walk_state *walk_state)
u32 index,
struct acpi_walk_state *walk_state)
{
ACPI_FUNCTION_TRACE_PTR ("ds_obj_stack_get_value", walk_state);
......@@ -706,9 +706,9 @@ acpi_ds_obj_stack_get_value (
*
******************************************************************************/
acpi_walk_state *
struct acpi_walk_state *
acpi_ds_get_current_walk_state (
acpi_thread_state *thread)
struct acpi_thread_state *thread)
{
ACPI_FUNCTION_NAME ("ds_get_current_walk_state");
......@@ -740,8 +740,8 @@ acpi_ds_get_current_walk_state (
void
acpi_ds_push_walk_state (
acpi_walk_state *walk_state,
acpi_thread_state *thread)
struct acpi_walk_state *walk_state,
struct acpi_thread_state *thread)
{
ACPI_FUNCTION_TRACE ("ds_push_walk_state");
......@@ -767,11 +767,11 @@ acpi_ds_push_walk_state (
*
******************************************************************************/
acpi_walk_state *
struct acpi_walk_state *
acpi_ds_pop_walk_state (
acpi_thread_state *thread)
struct acpi_thread_state *thread)
{
acpi_walk_state *walk_state;
struct acpi_walk_state *walk_state;
ACPI_FUNCTION_TRACE ("ds_pop_walk_state");
......@@ -809,15 +809,15 @@ acpi_ds_pop_walk_state (
*
******************************************************************************/
acpi_walk_state *
struct acpi_walk_state *
acpi_ds_create_walk_state (
acpi_owner_id owner_id,
acpi_parse_object *origin,
acpi_operand_object *mth_desc,
acpi_thread_state *thread)
acpi_owner_id owner_id,
union acpi_parse_object *origin,
union acpi_operand_object *mth_desc,
struct acpi_thread_state *thread)
{
acpi_walk_state *walk_state;
acpi_status status;
struct acpi_walk_state *walk_state;
acpi_status status;
ACPI_FUNCTION_TRACE ("ds_create_walk_state");
......@@ -873,18 +873,18 @@ acpi_ds_create_walk_state (
acpi_status
acpi_ds_init_aml_walk (
acpi_walk_state *walk_state,
acpi_parse_object *op,
acpi_namespace_node *method_node,
u8 *aml_start,
u32 aml_length,
acpi_operand_object **params,
acpi_operand_object **return_obj_desc,
u32 pass_number)
struct acpi_walk_state *walk_state,
union acpi_parse_object *op,
struct acpi_namespace_node *method_node,
u8 *aml_start,
u32 aml_length,
union acpi_operand_object **params,
union acpi_operand_object **return_obj_desc,
u32 pass_number)
{
acpi_status status;
acpi_parse_state *parser_state = &walk_state->parser_state;
acpi_parse_object *extra_op;
acpi_status status;
struct acpi_parse_state *parser_state = &walk_state->parser_state;
union acpi_parse_object *extra_op;
ACPI_FUNCTION_TRACE ("ds_init_aml_walk");
......@@ -974,9 +974,9 @@ acpi_ds_init_aml_walk (
void
acpi_ds_delete_walk_state (
acpi_walk_state *walk_state)
struct acpi_walk_state *walk_state)
{
acpi_generic_state *state;
union acpi_generic_state *state;
ACPI_FUNCTION_TRACE_PTR ("ds_delete_walk_state", walk_state);
......
......@@ -79,14 +79,14 @@ static struct acpi_driver acpi_ec_driver = {
};
struct acpi_ec {
acpi_handle handle;
unsigned long uid;
unsigned long gpe_bit;
acpi_generic_address status_addr;
acpi_generic_address command_addr;
acpi_generic_address data_addr;
unsigned long global_lock;
spinlock_t lock;
acpi_handle handle;
unsigned long uid;
unsigned long gpe_bit;
struct acpi_generic_address status_addr;
struct acpi_generic_address command_addr;
struct acpi_generic_address data_addr;
unsigned long global_lock;
spinlock_t lock;
};
/* If we find an EC via the ECDT, we need to keep a ptr to its context */
......@@ -652,8 +652,8 @@ acpi_ec_start (
int result = 0;
acpi_status status = AE_OK;
struct acpi_ec *ec = NULL;
acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
acpi_resource *resource = NULL;
struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL};
struct acpi_resource *resource = NULL;
ACPI_FUNCTION_TRACE("acpi_ec_start");
......@@ -674,7 +674,7 @@ acpi_ec_start (
return_VALUE(-ENODEV);
}
resource = (acpi_resource *) buffer.pointer;
resource = (struct acpi_resource *) buffer.pointer;
if (!resource || (resource->id != ACPI_RSTYPE_IO)) {
ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid or missing resource\n"));
result = -ENODEV;
......@@ -761,7 +761,7 @@ acpi_ec_ecdt_probe (void)
struct acpi_table_ecdt *ecdt_ptr;
status = acpi_get_firmware_table("ECDT", 1, ACPI_LOGICAL_ADDRESSING,
(acpi_table_header **) &ecdt_ptr);
(struct acpi_table_header **) &ecdt_ptr);
if (ACPI_FAILURE(status))
return 0;
......
......@@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2002, R. Byron Moore
* Copyright (C) 2000 - 2003, 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
......@@ -45,7 +45,7 @@ acpi_status
acpi_ev_initialize (
void)
{
acpi_status status;
acpi_status status;
ACPI_FUNCTION_TRACE ("ev_initialize");
......@@ -99,7 +99,7 @@ acpi_status
acpi_ev_handler_initialize (
void)
{
acpi_status status;
acpi_status status;
ACPI_FUNCTION_TRACE ("ev_handler_initialize");
......@@ -156,8 +156,8 @@ acpi_status
acpi_ev_fixed_event_initialize (
void)
{
acpi_native_uint i;
acpi_status status;
acpi_native_uint i;
acpi_status status;
/*
......@@ -199,10 +199,10 @@ u32
acpi_ev_fixed_event_detect (
void)
{
u32 int_status = ACPI_INTERRUPT_NOT_HANDLED;
u32 fixed_status;
u32 fixed_enable;
acpi_native_uint i;
u32 int_status = ACPI_INTERRUPT_NOT_HANDLED;
u32 fixed_status;
u32 fixed_enable;
acpi_native_uint i;
ACPI_FUNCTION_NAME ("ev_fixed_event_detect");
......@@ -252,7 +252,7 @@ acpi_ev_fixed_event_detect (
u32
acpi_ev_fixed_event_dispatch (
u32 event)
u32 event)
{
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -5,7 +5,7 @@
*****************************************************************************/
/*
* Copyright (C) 2000 - 2002, R. Byron Moore
* Copyright (C) 2000 - 2003, 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
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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