Merge rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6

This commit is contained in:
Dmitry Torokhov 2006-09-19 01:56:44 -04:00
commit 0612ec4876
2417 changed files with 59410 additions and 27006 deletions

View file

@ -63,7 +63,7 @@
/* Current ACPICA subsystem version in YYYYMMDD format */
#define ACPI_CA_VERSION 0x20060623
#define ACPI_CA_VERSION 0x20060707
/*
* OS name, used for the _OS object. The _OS object is essentially obsolete,

View file

@ -53,10 +53,14 @@
#define ACPI_EXD_TABLE_SIZE(name) (sizeof(name) / sizeof (struct acpi_exdump_info))
/*
* If possible, pack the following structure to byte alignment, since we
* don't care about performance for debug output
* If possible, pack the following structures to byte alignment, since we
* don't care about performance for debug output. Two cases where we cannot
* pack the structures:
*
* 1) Hardware does not support misaligned memory transfers
* 2) Compiler does not support pointers within packed structures
*/
#ifndef ACPI_MISALIGNMENT_NOT_SUPPORTED
#if (!defined(ACPI_MISALIGNMENT_NOT_SUPPORTED) && !defined(ACPI_PACKED_POINTERS_NOT_SUPPORTED))
#pragma pack(1)
#endif

View file

@ -127,7 +127,7 @@ typedef u8 acpi_owner_id;
/* This Thread ID means that the mutex is not in use (unlocked) */
#define ACPI_MUTEX_NOT_ACQUIRED (u32) -1
#define ACPI_MUTEX_NOT_ACQUIRED (acpi_thread_id) 0
/* Table for the global mutexes */
@ -204,7 +204,7 @@ struct acpi_namespace_node {
/* Namespace Node flags */
#define ANOBJ_END_OF_PEER_LIST 0x01 /* End-of-list, Peer field points to parent */
#define ANOBJ_DATA_WIDTH_32 0x02 /* Parent table uses 32-bit math */
#define ANOBJ_RESERVED 0x02 /* Available for future use */
#define ANOBJ_METHOD_ARG 0x04 /* Node is a method argument */
#define ANOBJ_METHOD_LOCAL 0x08 /* Node is a method local */
#define ANOBJ_SUBTREE_HAS_INI 0x10 /* Used to optimize device initialization */

View file

@ -724,9 +724,15 @@
/* Memory allocation */
#ifndef ACPI_ALLOCATE
#define ACPI_ALLOCATE(a) acpi_ut_allocate((acpi_size)(a),_COMPONENT,_acpi_module_name,__LINE__)
#endif
#ifndef ACPI_ALLOCATE_ZEROED
#define ACPI_ALLOCATE_ZEROED(a) acpi_ut_allocate_zeroed((acpi_size)(a), _COMPONENT,_acpi_module_name,__LINE__)
#define ACPI_FREE(a) kfree(a)
#endif
#ifndef ACPI_FREE
#define ACPI_FREE(a) acpio_os_free(a)
#endif
#define ACPI_MEM_TRACKING(a)
#else

View file

@ -50,9 +50,13 @@
/*
* If possible, pack the following structures to byte alignment, since we
* don't care about performance for debug output
* don't care about performance for debug output. Two cases where we cannot
* pack the structures:
*
* 1) Hardware does not support misaligned memory transfers
* 2) Compiler does not support pointers within packed structures
*/
#ifndef ACPI_MISALIGNMENT_NOT_SUPPORTED
#if (!defined(ACPI_MISALIGNMENT_NOT_SUPPORTED) && !defined(ACPI_PACKED_POINTERS_NOT_SUPPORTED))
#pragma pack(1)
#endif

View file

@ -59,6 +59,7 @@
#include <asm/acpi.h>
#include <linux/slab.h>
#include <linux/spinlock_types.h>
#include <asm/current.h>
/* Host-dependent types and defines */
@ -100,8 +101,30 @@
#define acpi_cpu_flags unsigned long
#define acpi_thread_id u32
#define acpi_thread_id struct task_struct *
static inline acpi_thread_id acpi_os_get_thread_id(void) { return 0; }
static inline acpi_thread_id acpi_os_get_thread_id(void) { return current; }
/*
* The irqs_disabled() check is for resume from RAM.
* Interrupts are off during resume, just like they are for boot.
* However, boot has (system_state != SYSTEM_RUNNING)
* to quiet __might_sleep() in kmalloc() and resume does not.
*/
#include <acpi/actypes.h>
static inline void *acpi_os_allocate(acpi_size size) {
return kmalloc(size, irqs_disabled() ? GFP_ATOMIC : GFP_KERNEL);
}
static inline void *acpi_os_allocate_zeroed(acpi_size size) {
return kzalloc(size, irqs_disabled() ? GFP_ATOMIC : GFP_KERNEL);
}
static inline void *acpi_os_acquire_object(acpi_cache_t * cache) {
return kmem_cache_zalloc(cache, irqs_disabled() ? GFP_ATOMIC : GFP_KERNEL);
}
#define ACPI_ALLOCATE(a) acpi_os_allocate(a)
#define ACPI_ALLOCATE_ZEROED(a) acpi_os_allocate_zeroed(a)
#define ACPI_FREE(a) kfree(a)
#endif /* __ACLINUX_H__ */

View file

@ -1,5 +1,5 @@
include include/asm-generic/Kbuild.asm
unifdef-y += console.h fpu.h sysinfo.h
unifdef-y += console.h fpu.h sysinfo.h compiler.h
header-y += gentrap.h regdef.h pal.h reg.h

View file

@ -30,7 +30,4 @@ __asm__ __volatile__("mb": : :"memory")
#define set_mb(var, value) \
do { var = value; mb(); } while (0)
#define set_wmb(var, value) \
do { var = value; wmb(); } while (0)
#endif /* __BARRIER_H */

View file

@ -90,6 +90,7 @@
__asm__("stw %1,%0" : "=m"(mem) : "r"(val))
#endif
#ifdef __KERNEL__
/* Some idiots over in <linux/compiler.h> thought inline should imply
always_inline. This breaks stuff. We'll include this file whenever
we run into such problems. */
@ -101,4 +102,6 @@
#undef __always_inline
#define __always_inline inline __attribute__((always_inline))
#endif /* __KERNEL__ */
#endif /* __ALPHA_COMPILER_H */

View file

@ -1,6 +1,8 @@
#ifndef _ALPHA_PAGE_H
#define _ALPHA_PAGE_H
#ifdef __KERNEL__
#include <asm/pal.h>
/* PAGE_SHIFT determines the page size */
@ -8,8 +10,6 @@
#define PAGE_SIZE (1UL << PAGE_SHIFT)
#define PAGE_MASK (~(PAGE_SIZE-1))
#ifdef __KERNEL__
#ifndef __ASSEMBLY__
#define STRICT_MM_TYPECHECKS
@ -92,9 +92,9 @@ typedef unsigned long pgprot_t;
#define VM_DATA_DEFAULT_FLAGS (VM_READ | VM_WRITE | VM_EXEC | \
VM_MAYREAD | VM_MAYWRITE | VM_MAYEXEC)
#endif /* __KERNEL__ */
#include <asm-generic/memory_model.h>
#include <asm-generic/page.h>
#endif /* __KERNEL__ */
#endif /* _ALPHA_PAGE_H */

View file

@ -39,12 +39,4 @@
*/
#define NR_IRQS (NR_AIC_IRQS + (4 * 32))
#ifndef __ASSEMBLY__
/*
* Initialize the IRQ controller.
*/
extern void at91rm9200_init_irq(unsigned int priority[]);
#endif
#endif

View file

@ -91,7 +91,6 @@
#define NR_IRQS NR_IOP331_IRQS
#if defined(CONFIG_ARCH_IQ80331)
/*
* Interrupts available on the IQ80331 board
*/
@ -111,7 +110,6 @@
#define IRQ_IQ80331_INTC IRQ_IOP331_XINT2
#define IRQ_IQ80331_INTD IRQ_IOP331_XINT3
#elif defined(CONFIG_MACH_IQ80332)
/*
* Interrupts available on the IQ80332 board
*/
@ -131,6 +129,4 @@
#define IRQ_IQ80332_INTC IRQ_IOP331_XINT2
#define IRQ_IQ80332_INTD IRQ_IOP331_XINT3
#endif
#endif // _IOP331_IRQ_H_

View file

@ -48,8 +48,6 @@ struct clk_functions {
};
extern unsigned int mpurate;
extern struct list_head clocks;
extern spinlock_t clockfw_lock;
extern int clk_init(struct clk_functions * custom_clocks);
extern int clk_register(struct clk *clk);

View file

@ -40,8 +40,8 @@ struct ssp_dev {
};
int ssp_write_word(struct ssp_dev *dev, u32 data);
int ssp_read_word(struct ssp_dev *dev);
void ssp_flush(struct ssp_dev *dev);
int ssp_read_word(struct ssp_dev *dev, u32 *data);
int ssp_flush(struct ssp_dev *dev);
void ssp_enable(struct ssp_dev *dev);
void ssp_disable(struct ssp_dev *dev);
void ssp_save_state(struct ssp_dev *dev, struct ssp_state *ssp);

View file

@ -9,9 +9,6 @@
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* Changelog:
*
*/
#ifndef __ASM_ARCH_ANUBISCPLD_H

View file

@ -9,9 +9,7 @@
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* Changelog:
*/
*/
#ifndef __ASM_ARCH_ANUBISIRQ_H
#define __ASM_ARCH_ANUBISIRQ_H

View file

@ -9,8 +9,6 @@
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* Changelog:
*/
/* needs arch/map.h including with this */

View file

@ -9,10 +9,6 @@
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* Changelog:
* 20-Nov-2004 BJD Created file
* 07-Mar-2005 BJD Added suspend/resume calls
*/
#ifndef __ASM_ARCH_AUDIO_H

View file

@ -8,11 +8,6 @@
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* Changelog:
* 25-May-2003 BJD Created file, added CTRL1 registers
* 30-Aug-2004 BJD Updated definitions from 2.4.26 port
* 30-Aug-2004 BJD Added CTRL3 and CTRL4 definitions
*/
#ifndef __ASM_ARCH_BASTCPLD_H

View file

@ -8,11 +8,7 @@
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* Changelog:
* 14-Sep-2004 BJD Fixed IRQ_USBOC definition
* 06-Jan-2003 BJD Linux 2.6.0 version
*/
*/
#ifndef __ASM_ARCH_BASTIRQ_H
#define __ASM_ARCH_BASTIRQ_H

View file

@ -8,10 +8,6 @@
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* Changelog:
* 06-Jan-2003 BJD Linux 2.6.0 version, moved bast specifics from arch/map.h
* 12-Mar-2004 BJD Fixed header include protection
*/
/* needs arch/map.h including with this */

View file

@ -9,9 +9,6 @@
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* Changelog:
* 08-Oct-2003 BJD Initial creation
*/
#ifndef __ASM_ARCH_BASTPMU_H

View file

@ -10,9 +10,6 @@
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* Modifications:
* 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA
*/
#include <asm/arch/map.h>

View file

@ -1,18 +1,13 @@
/* linux/include/asm-arm/arch-bast/dma.h
/* linux/include/asm-arm/arch-s3c2410/dma.h
*
* Copyright (C) 2003,2004 Simtec Electronics
* Copyright (C) 2003,2004,2006 Simtec Electronics
* Ben Dooks <ben@simtec.co.uk>
*
* Samsung S3C2410X DMA support
* Samsung S3C241XX DMA support
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* Changelog:
* ??-May-2003 BJD Created file
* ??-Jun-2003 BJD Added more dma functionality to go with arch
* 10-Nov-2004 BJD Added sys_device support
*/
#ifndef __ASM_ARCH_DMA_H
@ -21,28 +16,26 @@
#include <linux/sysdev.h>
#include "hardware.h"
/*
* This is the maximum DMA address(physical address) that can be DMAd to.
*
*/
#define MAX_DMA_ADDRESS 0x20000000
#define MAX_DMA_ADDRESS 0x40000000
#define MAX_DMA_TRANSFER_SIZE 0x100000 /* Data Unit is half word */
/* we have 4 dma channels */
#define S3C2410_DMA_CHANNELS (4)
/* types */
typedef enum {
enum s3c2410_dma_state {
S3C2410_DMA_IDLE,
S3C2410_DMA_RUNNING,
S3C2410_DMA_PAUSED
} s3c2410_dma_state_t;
};
/* s3c2410_dma_loadst_t
/* enum s3c2410_dma_loadst
*
* This represents the state of the DMA engine, wrt to the loaded / running
* transfers. Since we don't have any way of knowing exactly the state of
@ -70,44 +63,40 @@ typedef enum {
* currently running.
*/
typedef enum {
enum s3c2410_dma_loadst {
S3C2410_DMALOAD_NONE,
S3C2410_DMALOAD_1LOADED,
S3C2410_DMALOAD_1RUNNING,
S3C2410_DMALOAD_1LOADED_1RUNNING,
} s3c2410_dma_loadst_t;
};
typedef enum {
enum s3c2410_dma_buffresult {
S3C2410_RES_OK,
S3C2410_RES_ERR,
S3C2410_RES_ABORT
} s3c2410_dma_buffresult_t;
typedef enum s3c2410_dmasrc_e s3c2410_dmasrc_t;
enum s3c2410_dmasrc_e {
S3C2410_DMASRC_HW, /* source is memory */
S3C2410_DMASRC_MEM /* source is hardware */
};
/* enum s3c2410_chan_op_e
enum s3c2410_dmasrc {
S3C2410_DMASRC_HW, /* source is memory */
S3C2410_DMASRC_MEM /* source is hardware */
};
/* enum s3c2410_chan_op
*
* operation codes passed to the DMA code by the user, and also used
* to inform the current channel owner of any changes to the system state
*/
enum s3c2410_chan_op_e {
enum s3c2410_chan_op {
S3C2410_DMAOP_START,
S3C2410_DMAOP_STOP,
S3C2410_DMAOP_PAUSE,
S3C2410_DMAOP_RESUME,
S3C2410_DMAOP_FLUSH,
S3C2410_DMAOP_TIMEOUT, /* internal signal to handler */
S3C2410_DMAOP_TIMEOUT, /* internal signal to handler */
S3C2410_DMAOP_STARTED, /* indicate channel started */
};
typedef enum s3c2410_chan_op_e s3c2410_chan_op_t;
/* flags */
#define S3C2410_DMAF_SLOW (1<<0) /* slow, so don't worry about
@ -116,104 +105,100 @@ typedef enum s3c2410_chan_op_e s3c2410_chan_op_t;
/* dma buffer */
typedef struct s3c2410_dma_buf_s s3c2410_dma_buf_t;
struct s3c2410_dma_client {
char *name;
};
typedef struct s3c2410_dma_client s3c2410_dma_client_t;
/* s3c2410_dma_buf_s
*
* internally used buffer structure to describe a queued or running
* buffer.
*/
struct s3c2410_dma_buf_s {
s3c2410_dma_buf_t *next;
int magic; /* magic */
int size; /* buffer size in bytes */
dma_addr_t data; /* start of DMA data */
dma_addr_t ptr; /* where the DMA got to [1] */
void *id; /* client's id */
struct s3c2410_dma_buf;
struct s3c2410_dma_buf {
struct s3c2410_dma_buf *next;
int magic; /* magic */
int size; /* buffer size in bytes */
dma_addr_t data; /* start of DMA data */
dma_addr_t ptr; /* where the DMA got to [1] */
void *id; /* client's id */
};
/* [1] is this updated for both recv/send modes? */
typedef struct s3c2410_dma_chan_s s3c2410_dma_chan_t;
struct s3c2410_dma_chan;
/* s3c2410_dma_cbfn_t
*
* buffer callback routine type
*/
typedef void (*s3c2410_dma_cbfn_t)(s3c2410_dma_chan_t *, void *buf, int size,
s3c2410_dma_buffresult_t result);
typedef void (*s3c2410_dma_cbfn_t)(struct s3c2410_dma_chan *,
void *buf, int size,
enum s3c2410_dma_buffresult result);
typedef int (*s3c2410_dma_opfn_t)(s3c2410_dma_chan_t *,
s3c2410_chan_op_t );
typedef int (*s3c2410_dma_opfn_t)(struct s3c2410_dma_chan *,
enum s3c2410_chan_op );
struct s3c2410_dma_stats_s {
unsigned long loads;
unsigned long timeout_longest;
unsigned long timeout_shortest;
unsigned long timeout_avg;
unsigned long timeout_failed;
struct s3c2410_dma_stats {
unsigned long loads;
unsigned long timeout_longest;
unsigned long timeout_shortest;
unsigned long timeout_avg;
unsigned long timeout_failed;
};
typedef struct s3c2410_dma_stats_s s3c2410_dma_stats_t;
/* struct s3c2410_dma_chan_s
/* struct s3c2410_dma_chan
*
* full state information for each DMA channel
*/
struct s3c2410_dma_chan_s {
struct s3c2410_dma_chan {
/* channel state flags and information */
unsigned char number; /* number of this dma channel */
unsigned char in_use; /* channel allocated */
unsigned char irq_claimed; /* irq claimed for channel */
unsigned char irq_enabled; /* irq enabled for channel */
unsigned char xfer_unit; /* size of an transfer */
unsigned char number; /* number of this dma channel */
unsigned char in_use; /* channel allocated */
unsigned char irq_claimed; /* irq claimed for channel */
unsigned char irq_enabled; /* irq enabled for channel */
unsigned char xfer_unit; /* size of an transfer */
/* channel state */
s3c2410_dma_state_t state;
s3c2410_dma_loadst_t load_state;
s3c2410_dma_client_t *client;
enum s3c2410_dma_state state;
enum s3c2410_dma_loadst load_state;
struct s3c2410_dma_client *client;
/* channel configuration */
s3c2410_dmasrc_t source;
unsigned long dev_addr;
unsigned long load_timeout;
unsigned int flags; /* channel flags */
enum s3c2410_dmasrc source;
unsigned long dev_addr;
unsigned long load_timeout;
unsigned int flags; /* channel flags */
/* channel's hardware position and configuration */
void __iomem *regs; /* channels registers */
void __iomem *addr_reg; /* data address register */
unsigned int irq; /* channel irq */
unsigned long dcon; /* default value of DCON */
void __iomem *regs; /* channels registers */
void __iomem *addr_reg; /* data address register */
unsigned int irq; /* channel irq */
unsigned long dcon; /* default value of DCON */
/* driver handles */
s3c2410_dma_cbfn_t callback_fn; /* buffer done callback */
s3c2410_dma_opfn_t op_fn; /* channel operation callback */
s3c2410_dma_cbfn_t callback_fn; /* buffer done callback */
s3c2410_dma_opfn_t op_fn; /* channel op callback */
/* stats gathering */
s3c2410_dma_stats_t *stats;
s3c2410_dma_stats_t stats_store;
struct s3c2410_dma_stats *stats;
struct s3c2410_dma_stats stats_store;
/* buffer list and information */
s3c2410_dma_buf_t *curr; /* current dma buffer */
s3c2410_dma_buf_t *next; /* next buffer to load */
s3c2410_dma_buf_t *end; /* end of queue */
struct s3c2410_dma_buf *curr; /* current dma buffer */
struct s3c2410_dma_buf *next; /* next buffer to load */
struct s3c2410_dma_buf *end; /* end of queue */
/* system device */
struct sys_device dev;
};
/* the currently allocated channel information */
extern s3c2410_dma_chan_t s3c2410_chans[];
extern struct s3c2410_dma_chan s3c2410_chans[];
/* note, we don't really use dma_device_t at the moment */
typedef unsigned long dma_device_t;
@ -226,7 +211,7 @@ typedef unsigned long dma_device_t;
*/
extern int s3c2410_dma_request(dmach_t channel,
s3c2410_dma_client_t *, void *dev);
struct s3c2410_dma_client *, void *dev);
/* s3c2410_dma_ctrl
@ -234,7 +219,7 @@ extern int s3c2410_dma_request(dmach_t channel,
* change the state of the dma channel
*/
extern int s3c2410_dma_ctrl(dmach_t channel, s3c2410_chan_op_t op);
extern int s3c2410_dma_ctrl(dmach_t channel, enum s3c2410_chan_op op);
/* s3c2410_dma_setflags
*
@ -249,7 +234,7 @@ extern int s3c2410_dma_setflags(dmach_t channel,
* free the dma channel (will also abort any outstanding operations)
*/
extern int s3c2410_dma_free(dmach_t channel, s3c2410_dma_client_t *);
extern int s3c2410_dma_free(dmach_t channel, struct s3c2410_dma_client *);
/* s3c2410_dma_enqueue
*
@ -273,7 +258,7 @@ extern int s3c2410_dma_config(dmach_t channel, int xferunit, int dcon);
* configure the device we're talking to
*/
extern int s3c2410_dma_devconfig(int channel, s3c2410_dmasrc_t source,
extern int s3c2410_dma_devconfig(int channel, enum s3c2410_dmasrc source,
int hwcfg, unsigned long devaddr);
/* s3c2410_dma_getposition

View file

@ -7,13 +7,6 @@
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
*
* Changelog:
* 07-Sep-2004 RTP Created file
* 03-Nov-2004 BJD Updated and minor cleanups
* 03-Aug-2005 RTP Renamed to fb.h
* 26-Oct-2005 BJD Changed name of platdata init
*/
#ifndef __ASM_ARM_FB_H

View file

@ -8,16 +8,6 @@
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* Changelog:
* 21-May-2003 BJD Created file
* 06-Jun-2003 BJD Added CPU frequency settings
* 03-Sep-2003 BJD Linux v2.6 support
* 12-Mar-2004 BJD Fixed include protection, fixed type of clock vars
* 14-Sep-2004 BJD Added misccr and getpin to gpio
* 01-Oct-2004 BJD Added the new gpio functions
* 16-Oct-2004 BJD Removed the clock variables
* 15-Jan-2006 LCVR Added s3c2400_gpio_getirq()
*/
#ifndef __ASM_ARCH_HARDWARE_H

View file

@ -8,10 +8,6 @@
* published by the Free Software Foundation.
*
* S3C2410 CPU Idle controls
*
* Changelog:
* 28-Oct-2004 BJD Initial version
*
*/
#ifndef __ASM_ARCH_IDLE_H

View file

@ -8,10 +8,6 @@
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* Changelog:
* 05-Oct-2004 BJD Created file
* 19-Oct-2004 BJD Updated for s3c2440
*/
#ifndef __ASM_ARCH_IIC_H

View file

@ -4,13 +4,7 @@
*
* Copyright (C) 1997 Russell King
* (C) 2003 Simtec Electronics
*
* Modifications:
* 06-Dec-1997 RMK Created.
* 02-Sep-2003 BJD Modified for S3C2410
* 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA
* 13-Oct-2005 BJD Fixed problems with LDRH/STRH offset range
*/
*/
#ifndef __ASM_ARM_ARCH_IO_H
#define __ASM_ARM_ARCH_IO_H

View file

@ -6,14 +6,7 @@
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* Changelog:
* 12-May-2003 BJD Created file
* 08-Jan-2003 BJD Linux 2.6.0 version, moved BAST bits out
* 12-Mar-2004 BJD Fixed bug in header protection
* 10-Feb-2005 BJD Added camera IRQ from guillaume.gourat@nexvision.tv
* 28-Feb-2005 BJD Updated s3c2440 IRQs
*/
*/
#ifndef __ASM_ARCH_IRQS_H

View file

@ -8,13 +8,6 @@
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* Changelog:
* 12-May-2003 BJD Created file
* 06-Jan-2003 BJD Linux 2.6.0 version, moved bast specifics out
* 10-Feb-2005 BJD Added CAMIF definition from guillaume.gourat@nexvision.tv
* 10-Mar-2005 LCVR Added support to S3C2400, changed {VA,SZ} names
* 15-Jan-2006 LCVR Added S3C24XX_PA macros for common S3C24XX resources
*/
#ifndef __ASM_ARCH_MAP_H

View file

@ -1,6 +1,4 @@
/*
* linux/include/asm-arm/arch-s3c2410/memory.h
*
/* linux/include/asm-arm/arch-s3c2410/memory.h
* from linux/include/asm-arm/arch-rpc/memory.h
*
* Copyright (C) 1996,1997,1998 Russell King.
@ -8,16 +6,6 @@
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* Changelog:
* 20-Oct-1996 RMK Created
* 31-Dec-1997 RMK Fixed definitions to reduce warnings
* 11-Jan-1998 RMK Uninlined to reduce hits on cache
* 08-Feb-1998 RMK Added __virt_to_bus and __bus_to_virt
* 21-Mar-1999 RMK Renamed to memory.h
* RMK Added TASK_SIZE and PAGE_OFFSET
* 05-Apr-2004 BJD Copied and altered for arch-s3c2410
* 17-Mar-2005 LCVR Modified for S3C2400
*/
#ifndef __ASM_ARCH_MEMORY_H

View file

@ -8,9 +8,6 @@
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* Changelog:
* 23-Sep-2004 BJD Created file
*/
/* struct s3c2410_nand_set

View file

@ -9,8 +9,6 @@
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* Changelog:
*/
/* needs arch/map.h including with this */

View file

@ -7,9 +7,6 @@
* published by the Free Software Foundation.
*
* S3C2410 ADC registers
*
* Changelog:
* 27-09-2004 SAH Created file
*/
#ifndef __ASM_ARCH_REGS_ADC_H

View file

@ -8,18 +8,6 @@
* published by the Free Software Foundation.
*
* S3C2410 clock register definitions
*
* Changelog:
* 18-Aug-2004 Ben Dooks Added 2440 definitions
* 08-Aug-2004 Herbert Pötzl Added CLKCON definitions
* 19-06-2003 Ben Dooks Created file
* 12-03-2004 Ben Dooks Updated include protection
* 29-Sep-2004 Ben Dooks Fixed usage for assembly inclusion
* 10-Feb-2005 Ben Dooks Fixed CAMDIVN address (Guillaume Gourat)
* 10-Mar-2005 Lucas Villa Real Changed S3C2410_VA to S3C24XX_VA
* 27-Aug-2005 Ben Dooks Add clock-slow info
* 20-Oct-2005 Ben Dooks Fixed overflow in PLL (Guillaume Gourat)
* 20-Oct-2005 Ben Dooks Add masks for DCLK (Guillaume Gourat)
*/
#ifndef __ASM_ARM_REGS_CLOCK

View file

@ -8,21 +8,6 @@
* published by the Free Software Foundation.
*
* S3C2410 GPIO register definitions
*
* Changelog:
* 19-06-2003 BJD Created file
* 23-06-2003 BJD Updated GSTATUS registers
* 12-03-2004 BJD Updated include protection
* 20-07-2004 BJD Added GPIO pin numbers, added Port A definitions
* 04-10-2004 BJD Fixed number of bugs, added EXT IRQ filter defs
* 17-10-2004 BJD Added GSTATUS1 register definitions
* 18-11-2004 BJD Fixed definitions of GPE3, GPE4, GPE5 and GPE6
* 18-11-2004 BJD Added S3C2440 AC97 controls
* 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA
* 28-Mar-2005 LCVR Fixed definition of GPB10
* 26-Oct-2005 BJD Added generic configuration types
* 27-Nov-2005 LCVR Added definitions to S3C2400 registers
* 15-Jan-2006 LCVR Written S3C24XX_GPIO_BASE() macro
*/

View file

@ -8,10 +8,6 @@
* published by the Free Software Foundation.
*
* S3C2440 GPIO J register definitions
*
* Changelog:
* 11-Aug-2004 BJD Created file
* 10-Feb-2005 BJD Fix GPJ12 definition (Guillaume Gourat)
*/

View file

@ -8,10 +8,6 @@
* published by the Free Software Foundation.
*
* S3C2410 I2C Controller
*
* Changelog:
* 03-Oct-2004 BJD Initial include for Linux
* 08-Nov-2004 BJD Added S3C2440 filter register
*/
#ifndef __ASM_ARCH_REGS_IIC_H

View file

@ -8,17 +8,7 @@
* published by the Free Software Foundation.
*
* S3C2410 IIS register definition
*
* Changelog:
* 19-06-2003 BJD Created file
* 26-06-2003 BJD Finished off definitions for register addresses
* 12-03-2004 BJD Updated include protection
* 07-03-2005 BJD Added FIFO size flags and S3C2440 MPLL
* 05-04-2005 LCVR Added IISFCON definitions for the S3C2400
* 18-07-2005 DA Change IISCON_MPLL to IISMOD_MPLL
* Correct IISMOD_256FS and IISMOD_384FS
* Add IISCON_PSCEN
*/
*/
#ifndef __ASM_ARCH_REGS_IIS_H
#define __ASM_ARCH_REGS_IIS_H

View file

@ -6,14 +6,7 @@
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
*
*
* Changelog:
* 19-06-2003 BJD Created file
* 12-03-2004 BJD Updated include protection
* 10-03-2005 LCVR Changed S3C2410_VA to S3C24XX_VA
*/
*/
#ifndef ___ASM_ARCH_REGS_IRQ_H

View file

@ -6,14 +6,6 @@
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
*
*
* Changelog:
* 12-06-2003 BJD Created file
* 26-06-2003 BJD Updated LCDCON register definitions
* 12-03-2004 BJD Updated include protection
* 10-03-2005 LCVR Changed S3C2410_VA to S3C24XX_VA
*/

View file

@ -8,12 +8,6 @@
* published by the Free Software Foundation.
*
* S3C2410 Memory Control register definitions
*
* Changelog:
* 29-Sep-2004 BJD Initial include for Linux
* 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA
* 04-Apr-2005 LCVR Added S3C2400 DRAM/BANKSIZE_MASK definitions
*
*/
#ifndef __ASM_ARM_MEMREGS_H

View file

@ -8,10 +8,6 @@
* published by the Free Software Foundation.
*
* S3C2410 NAND register definitions
*
* Changelog:
* 18-Aug-2004 BJD Copied file from 2.4 and updated
* 01-May-2005 BJD Added definitions for s3c2440 controller
*/
#ifndef __ASM_ARM_REGS_NAND

View file

@ -0,0 +1,34 @@
/* linux/include/asm/arch-s3c2410/regs-power.h
*
* Copyright (c) 2003,2004,2005,2006 Simtec Electronics <linux@simtec.co.uk>
* http://armlinux.simtec.co.uk/
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* S3C24XX power control register definitions
*/
#ifndef __ASM_ARM_REGS_PWR
#define __ASM_ARM_REGS_PWR __FILE__
#define S3C24XX_PWRREG(x) ((x) + S3C24XX_VA_CLKPWR)
#define S3C2412_PWRMODECON S3C24XX_PWRREG(0x20)
#define S3C2412_PWRCFG S3C24XX_PWRREG(0x24)
#define S3C2412_PWRCFG_BATF_IGNORE (0<<0)
#define S3C2412_PWRCFG_BATF_SLEEP (3<<0)
#define S3C2412_PWRCFG_BATF_MASK (3<<0)
#define S3C2412_PWRCFG_STANDBYWFI_IGNORE (0<<6)
#define S3C2412_PWRCFG_STANDBYWFI_IDLE (1<<6)
#define S3C2412_PWRCFG_STANDBYWFI_STOP (2<<6)
#define S3C2412_PWRCFG_STANDBYWFI_SLEEP (3<<6)
#define S3C2412_PWRCFG_STANDBYWFI_MASK (3<<6)
#define S3C2412_PWRCFG_RTC_MASKIRQ (1<<8)
#define S3C2412_PWRCFG_NAND_NORST (1<<9)
#endif /* __ASM_ARM_REGS_PWR */

View file

@ -8,17 +8,12 @@
* published by the Free Software Foundation.
*
* S3C2410 Internal RTC register definition
*
* Changelog:
* 19-06-2003 BJD Created file
* 12-03-2004 BJD Updated include protection
* 15-01-2005 LCVR Changed S3C2410_VA to S3C24XX_VA (s3c2400 support)
*/
#ifndef __ASM_ARCH_REGS_RTC_H
#define __ASM_ARCH_REGS_RTC_H __FILE__
#define S3C2410_RTCREG(x) ((x) + S3C24XX_VA_RTC)
#define S3C2410_RTCREG(x) (x)
#define S3C2410_RTCCON S3C2410_RTCREG(0x40)
#define S3C2410_RTCCON_RTCEN (1<<0)

View file

@ -8,11 +8,6 @@
* published by the Free Software Foundation.
*
* S3C2410 MMC/SDIO register definitions
*
* Changelog:
* 18-Aug-2004 Ben Dooks Created initial file
* 29-Nov-2004 Koen Martens Added some missing defines, fixed duplicates
* 29-Nov-2004 Ben Dooks Updated Koen's patch
*/
#ifndef __ASM_ARM_REGS_SDI

View file

@ -27,10 +27,7 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Modifications:
* 10-Mar-2005 LCVR Changed S3C2410_VA to S3C24XX_VA (s3c2400 support)
*/
*/
#ifndef __ASM_ARM_REGS_SERIAL_H
#define __ASM_ARM_REGS_SERIAL_H

View file

@ -7,13 +7,7 @@
* published by the Free Software Foundation.
*
* S3C2410 SPI register definition
*
* Changelog:
* 20-04-2004 KF Created file
* 04-10-2004 BJD Removed VA address (no longer mapped)
* tidied file for submission
* 03-04-2005 LCVR Added S3C2400_SPPIN_nCS definition
*/
*/
#ifndef __ASM_ARCH_REGS_SPI_H
#define __ASM_ARCH_REGS_SPI_H

View file

@ -8,13 +8,6 @@
* published by the Free Software Foundation.
*
* S3C2410 Timer configuration
*
* Changelog:
* 05-06-2003 BJD Created file
* 26-06-2003 BJD Added more timer definitions to mux / control
* 12-03-2004 BJD Updated include protection
* 10-02-2005 BJD Added S3C2410_TCFG1_MUX4_SHIFT (Guillaume Gourat)
* 10-03-2005 LCVR Changed S3C2410_VA to S3C24XX_VA
*/

View file

@ -6,13 +6,7 @@
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* Changelog:
* 01-08-2004 Initial creation
* 12-09-2004 Cleanup for submission
* 24-10-2004 Fixed S3C2410_UDC_MAXP_REG definition
* 10-03-2005 Changed S3C2410_VA to S3C24XX_VA
*/
*/
#ifndef __ASM_ARCH_REGS_UDC_H
#define __ASM_ARCH_REGS_UDC_H

View file

@ -1,4 +1,4 @@
/* linux/include/asm/arch-s3c2410/regs0watchdog.h
/* linux/include/asm/arch-s3c2410/regs-watchdog.h
*
* Copyright (c) 2003 Simtec Electronics <linux@simtec.co.uk>
* http://www.simtec.co.uk/products/SWLINUX/
@ -8,11 +8,6 @@
* published by the Free Software Foundation.
*
* S3C2410 Watchdog timer control
*
* Changelog:
* 21-06-2003 BJD Created file
* 12-03-2004 BJD Updated include protection
* 10-03-2005 LCVR Changed S3C2410_VA to S3C24XX_VA
*/

View file

@ -8,14 +8,7 @@
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* Changelog:
* 12-May-2003 BJD Created file
* 14-May-2003 BJD Removed idle to aid debugging
* 12-Jun-2003 BJD Added reset via watchdog
* 04-Sep-2003 BJD Moved to v2.6
* 28-Oct-2004 BJD Added over-ride for idle, and fixed reset panic()
*/
*/
#include <asm/hardware.h>
#include <asm/io.h>

View file

@ -8,12 +8,6 @@
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* Changelog:
* 02-Sep-2003 BJD Created file
* 05-Jan-2004 BJD Updated for Linux 2.6.0
* 22-Nov-2004 BJD Fixed CLOCK_TICK_RATE
* 10-Jan-2004 BJD Removed s3c2410_clock_tick_rate
*/
#ifndef __ASM_ARCH_TIMEX_H

View file

@ -8,15 +8,6 @@
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* Changelog:
* 22-May-2003 BJD Created
* 08-Sep-2003 BJD Moved to linux v2.6
* 12-Mar-2004 BJD Updated header protection
* 12-Oct-2004 BJD Take account of debug uart configuration
* 15-Nov-2004 BJD Fixed uart configuration
* 22-Feb-2005 BJD Added watchdog to uncompress
* 04-Apr-2005 LCVR Added support to S3C2400 (no cpuid at GSTATUS1)
*/
#ifndef __ASM_ARCH_UNCOMPRESS_H

View file

@ -8,11 +8,6 @@
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* Changelog:
* 11-Sep-2004 BJD Created file
* 21-Sep-2004 BJD Updated port info
* 09-Aug-2005 BJD Renamed s3c2410_report_oc s3c2410_usb_report_oc
*/
#ifndef __ASM_ARCH_USBCONTROL_H

View file

@ -10,11 +10,7 @@
* published by the Free Software Foundation.
*
* S3C2410 vmalloc definition
*
* Changelog:
* 12-Mar-2004 BJD Fixed header, added include protection
* 12=Mar-2004 BJD Fixed VMALLOC_END definitions
*/
*/
#ifndef __ASM_ARCH_VMALLOC_H
#define __ASM_ARCH_VMALLOC_H

View file

@ -8,10 +8,6 @@
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* Changelog:
* 25-May-2003 BJD Created file, added CTRL1 registers
* 19-Mar-2004 BJD Added VR1000 CPLD definitions
*/
#ifndef __ASM_ARCH_VR1000CPLD_H

View file

@ -8,11 +8,7 @@
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* Changelog:
* 06-Jan-2003 BJD Linux 2.6.0 version
* 19-Mar-2004 BJD Updates for VR1000
*/
*/
#ifndef __ASM_ARCH_VR1000IRQ_H
#define __ASM_ARCH_VR1000IRQ_H

View file

@ -8,12 +8,6 @@
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* Changelog:
* 06-Jan-2003 BJD Linux 2.6.0 version, split specifics from arch/map.h
* 12-Mar-2004 BJD Fixed header include protection
* 19-Mar-2004 BJD Copied to VR1000 machine headers.
* 19-Jan-2005 BJD Updated map definitions
*/
/* needs arch/map.h including with this */

View file

@ -65,6 +65,8 @@
#define VERSATILE_SYS_OSC1_OFFSET 0x1C
#endif
#define VERSATILE_SYS_OSCCLCD_OFFSET 0x1c
#define VERSATILE_SYS_LOCK_OFFSET 0x20
#define VERSATILE_SYS_100HZ_OFFSET 0x24
#define VERSATILE_SYS_CFGDATA1_OFFSET 0x28

View file

@ -247,14 +247,12 @@ extern void dmac_flush_range(unsigned long, unsigned long);
*/
#define copy_to_user_page(vma, page, vaddr, dst, src, len) \
do { \
flush_cache_page(vma, vaddr, page_to_pfn(page));\
memcpy(dst, src, len); \
flush_dcache_page(page); \
flush_ptrace_access(vma, page, vaddr, dst, len, 1);\
} while (0)
#define copy_from_user_page(vma, page, vaddr, dst, src, len) \
do { \
flush_cache_page(vma, vaddr, page_to_pfn(page));\
memcpy(dst, src, len); \
} while (0)
@ -285,10 +283,24 @@ flush_cache_page(struct vm_area_struct *vma, unsigned long user_addr, unsigned l
__cpuc_flush_user_range(addr, addr + PAGE_SIZE, vma->vm_flags);
}
}
static inline void
flush_ptrace_access(struct vm_area_struct *vma, struct page *page,
unsigned long uaddr, void *kaddr,
unsigned long len, int write)
{
if (cpu_isset(smp_processor_id(), vma->vm_mm->cpu_vm_mask)) {
unsigned long addr = (unsigned long)kaddr;
__cpuc_coherent_kern_range(addr, addr + len);
}
}
#else
extern void flush_cache_mm(struct mm_struct *mm);
extern void flush_cache_range(struct vm_area_struct *vma, unsigned long start, unsigned long end);
extern void flush_cache_page(struct vm_area_struct *vma, unsigned long user_addr, unsigned long pfn);
extern void flush_ptrace_access(struct vm_area_struct *vma, struct page *page,
unsigned long uaddr, void *kaddr,
unsigned long len, int write);
#endif
/*

View file

@ -8,7 +8,9 @@
#include <asm/ptrace.h>
#include <asm/user.h>
#ifdef __KERNEL
#include <asm/procinfo.h>
#endif
typedef unsigned long elf_greg_t;
typedef unsigned long elf_freg_t[3];

View file

@ -16,8 +16,8 @@ struct ssp_state {
};
int ssp_write_word(u16 data);
int ssp_read_word(void);
void ssp_flush(void);
int ssp_read_word(u16 *data);
int ssp_flush(void);
void ssp_enable(void);
void ssp_disable(void);
void ssp_save_state(struct ssp_state *ssp);

View file

@ -291,5 +291,12 @@ extern void pci_iounmap(struct pci_dev *dev, void __iomem *addr);
*/
#define xlate_dev_kmem_ptr(p) p
/*
* Register ISA memory and port locations for glibc iopl/inb/outb
* emulation.
*/
extern void register_isa_ports(unsigned int mmio, unsigned int io,
unsigned int io_shift);
#endif /* __KERNEL__ */
#endif /* __ASM_ARM_IO_H */

View file

@ -193,8 +193,8 @@ extern pmd_t *top_pmd;
#define ARCH_SLAB_MINALIGN 8
#endif
#endif /* __KERNEL__ */
#include <asm-generic/page.h>
#endif /* __KERNEL__ */
#endif

View file

@ -55,5 +55,6 @@ extern unsigned int elf_hwcap;
#define HWCAP_VFP 64
#define HWCAP_EDSP 128
#define HWCAP_JAVA 256
#define HWCAP_IWMMXT 512
#endif

View file

@ -199,7 +199,21 @@ static inline void __raw_read_unlock(raw_rwlock_t *rw)
: "cc");
}
#define __raw_read_trylock(lock) generic__raw_read_trylock(lock)
static inline int __raw_read_trylock(raw_rwlock_t *rw)
{
unsigned long tmp, tmp2 = 1;
__asm__ __volatile__(
"1: ldrex %0, [%2]\n"
" adds %0, %0, #1\n"
" strexpl %1, %0, [%2]\n"
: "=&r" (tmp), "+r" (tmp2)
: "r" (&rw->lock)
: "cc");
smp_mb();
return tmp2 == 0;
}
/* read_can_lock - would read_trylock() succeed? */
#define __raw_read_can_lock(x) ((x)->lock < 0x80000000)

View file

@ -176,7 +176,6 @@ extern unsigned int user_debug;
#define wmb() mb()
#define read_barrier_depends() do { } while(0)
#define set_mb(var, value) do { var = value; mb(); } while (0)
#define set_wmb(var, value) do { var = value; wmb(); } while (0)
#define nop() __asm__ __volatile__("mov\tr0,r0\t@ nop\n\t");
/*

View file

@ -90,7 +90,6 @@ extern unsigned int user_debug;
#define read_barrier_depends() do { } while(0)
#define set_mb(var, value) do { var = value; mb(); } while (0)
#define set_wmb(var, value) do { var = value; wmb(); } while (0)
/*
* We assume knowledge of how

View file

@ -17,7 +17,6 @@ extern struct task_struct *resume(struct task_struct *prev, struct task_struct *
#define wmb() mb()
#define read_barrier_depends() do { } while(0)
#define set_mb(var, value) do { var = value; mb(); } while (0)
#define set_wmb(var, value) do { var = value; wmb(); } while (0)
#ifdef CONFIG_SMP
#define smp_mb() mb()

View file

@ -64,7 +64,7 @@ typedef unsigned long elf_greg_t;
#define ELF_NGREG (sizeof(struct pt_regs) / sizeof(elf_greg_t))
typedef elf_greg_t elf_gregset_t[ELF_NGREG];
typedef struct fpmedia_struct elf_fpregset_t;
typedef struct user_fpmedia_regs elf_fpregset_t;
/*
* This is used to ensure we don't load something for the wrong architecture.
@ -116,6 +116,7 @@ do { \
} while(0)
#define USE_ELF_CORE_DUMP
#define ELF_FDPIC_CORE_EFLAGS EF_FRV_FDPIC
#define ELF_EXEC_PAGESIZE 16384
/* This is the location that an ET_DYN program is loaded if exec'ed. Typical
@ -125,9 +126,6 @@ do { \
#define ELF_ET_DYN_BASE 0x08000000UL
#define ELF_CORE_COPY_REGS(pr_reg, regs) \
memcpy(&pr_reg[0], &regs->sp, 31 * sizeof(uint32_t));
/* This yields a mask that user programs can use to figure out what
instruction set this cpu supports. */

View file

@ -89,6 +89,7 @@ extern void gdbstub_do_rx(void);
extern asmlinkage void __debug_stub_init_break(void);
extern asmlinkage void __break_hijack_kernel_event(void);
extern asmlinkage void __break_hijack_kernel_event_breaks_here(void);
extern asmlinkage void start_kernel(void);
extern asmlinkage void gdbstub_rx_handler(void);
@ -114,5 +115,26 @@ extern void console_set_baud(unsigned baud);
#define gdbstub_proto(FMT,...) ({ 0; })
#endif
/*
* we dedicate GR31 to keeping a pointer to the gdbstub exception frame
* - gr31 is destroyed on entry to the gdbstub if !MMU
* - gr31 is saved in scr3 on entry to the gdbstub if in !MMU
*/
register struct frv_frame0 *__debug_frame0 asm("gr31");
#define __debug_frame (&__debug_frame0->regs)
#define __debug_user_context (&__debug_frame0->uc)
#define __debug_regs (&__debug_frame0->debug)
#define __debug_reg(X) ((unsigned long *) ((unsigned long) &__debug_frame0 + (X)))
struct frv_debug_status {
unsigned long bpsr;
unsigned long dcr;
unsigned long brr;
unsigned long nmar;
};
extern struct frv_debug_status __debug_status;
#endif /* _LANGUAGE_ASSEMBLY */
#endif /* __ASM_GDB_STUB_H */

View file

@ -21,6 +21,7 @@
*/
#define current_text_addr() ({ __label__ _l; _l: &&_l;})
#include <linux/compiler.h>
#include <linux/linkage.h>
#include <asm/sections.h>
#include <asm/segment.h>
@ -139,7 +140,7 @@ unsigned long get_wchan(struct task_struct *p);
extern struct task_struct *alloc_task_struct(void);
extern void free_task_struct(struct task_struct *p);
#define cpu_relax() do { } while (0)
#define cpu_relax() barrier()
/* data cache prefetch */
#define ARCH_HAS_PREFETCH

View file

@ -62,18 +62,10 @@
#ifndef __ASSEMBLY__
/*
* dedicate GR28; to keeping the a pointer to the current exception frame
* we dedicate GR28 to keeping a pointer to the current exception frame
* - gr28 is destroyed on entry to the kernel from userspace
*/
register struct pt_regs *__frame asm("gr28");
register struct pt_regs *__debug_frame asm("gr31");
#ifndef container_of
#define container_of(ptr, type, member) ({ \
const typeof( ((type *)0)->member ) *__mptr = (ptr); \
(type *)( (char *)__mptr - offsetof(type,member) );})
#endif
#define __debug_regs container_of(__debug_frame, struct pt_debug_regs, normal_regs)
#define user_mode(regs) (!((regs)->psr & PSR_S))
#define instruction_pointer(regs) ((regs)->pc)

View file

@ -23,7 +23,13 @@
*
* +0x2000 +----------------------
* | union {
* | struct user_context
* | struct frv_frame0 {
* | struct user_context {
* | struct user_int_regs
* | struct user_fpmedia_regs
* | }
* | struct frv_debug_regs
* | }
* | struct pt_regs [user exception]
* | }
* +---------------------- <-- __kernel_frame0_ptr (maybe GR28)
@ -51,11 +57,11 @@
#define _ASM_REGISTERS_H
#ifndef __ASSEMBLY__
#define __OFFSET(X) (X)
#define __OFFSET(X,N) ((X)+(N)*4)
#define __OFFSETC(X,N) xxxxxxxxxxxxxxxxxxxxxxxx
#else
#define __OFFSET(X) ((X)*4)
#define __OFFSETC(X,N) ((X)*4+(N))
#define __OFFSET(X,N) ((X)+(N)*4)
#define __OFFSETC(X,N) ((X)+(N))
#endif
/*****************************************************************************/
@ -117,30 +123,13 @@ struct pt_regs {
#endif
#define REG_PSR __OFFSET( 0) /* Processor Status Register */
#define REG_ISR __OFFSET( 1) /* Integer Status Register */
#define REG_CCR __OFFSET( 2) /* Condition Code Register */
#define REG_CCCR __OFFSET( 3) /* Condition Code for Conditional Insns Register */
#define REG_LR __OFFSET( 4) /* Link Register */
#define REG_LCR __OFFSET( 5) /* Loop Count Register */
#define REG_PC __OFFSET( 6) /* Program Counter */
#define REG__STATUS __OFFSET( 7) /* exception status */
#define REG__STATUS_STEP 0x00000001 /* - reenable single stepping on return */
#define REG__STATUS_STEPPED 0x00000002 /* - single step caused exception */
#define REG__STATUS_BROKE 0x00000004 /* - BREAK insn caused exception */
#define REG__STATUS_SYSC_ENTRY 0x40000000 /* - T on syscall entry (ptrace.c only) */
#define REG__STATUS_SYSC_EXIT 0x80000000 /* - T on syscall exit (ptrace.c only) */
#define REG_SYSCALLNO __OFFSET( 8) /* syscall number or -1 */
#define REG_ORIG_GR8 __OFFSET( 9) /* saved GR8 for signal handling */
#define REG_GNER0 __OFFSET(10)
#define REG_GNER1 __OFFSET(11)
#define REG_IACC0 __OFFSET(12)
#define REG_TBR __OFFSET(14) /* Trap Vector Register */
#define REG_GR(R) __OFFSET((14+(R)))
#define REG__END REG_GR(32)
#define REG_GR(R) __OFFSET(REG_GR0, (R))
#define REG_SP REG_GR(1)
#define REG_FP REG_GR(2)
@ -149,27 +138,21 @@ struct pt_regs {
/*****************************************************************************/
/*
* extension tacked in front of the exception frame in debug mode
* debugging registers
*/
#ifndef __ASSEMBLY__
struct pt_debug_regs
struct frv_debug_regs
{
unsigned long bpsr;
unsigned long dcr;
unsigned long brr;
unsigned long nmar;
struct pt_regs normal_regs;
unsigned long ibar[4] __attribute__((aligned(8)));
unsigned long dbar[4] __attribute__((aligned(8)));
unsigned long dbdr[4][4] __attribute__((aligned(8)));
unsigned long dbmr[4][4] __attribute__((aligned(8)));
} __attribute__((aligned(8)));
#endif
#define REG_NMAR __OFFSET(-1)
#define REG_BRR __OFFSET(-2)
#define REG_DCR __OFFSET(-3)
#define REG_BPSR __OFFSET(-4)
#define REG__DEBUG_XTRA __OFFSET(4)
/*****************************************************************************/
/*
* userspace registers
@ -223,33 +206,27 @@ struct user_context
void *extension;
} __attribute__((aligned(8)));
struct frv_frame0 {
union {
struct pt_regs regs;
struct user_context uc;
};
struct frv_debug_regs debug;
} __attribute__((aligned(32)));
#endif
#define NR_USER_INT_REGS (14 + 64)
#define NR_USER_FPMEDIA_REGS (64 + 2 + 2 + 8 + 8/4 + 1)
#define NR_USER_CONTEXT (NR_USER_INT_REGS + NR_USER_FPMEDIA_REGS + 1)
#define __INT_GR(R) __OFFSET(__INT_GR0, (R))
#define USER_CONTEXT_SIZE (((NR_USER_CONTEXT + 1) & ~1) * 4)
#define __FPMEDIA_FR(R) __OFFSET(__FPMEDIA_FR0, (R))
#define __FPMEDIA_FNER(R) __OFFSET(__FPMEDIA_FNER0, (R))
#define __FPMEDIA_MSR(R) __OFFSET(__FPMEDIA_MSR0, (R))
#define __FPMEDIA_ACC(R) __OFFSET(__FPMEDIA_ACC0, (R))
#define __FPMEDIA_ACCG(R) __OFFSETC(__FPMEDIA_ACCG0, (R))
#define __FPMEDIA_FSR(R) __OFFSET(__FPMEDIA_FSR0, (R))
#define __THREAD_FRAME __OFFSET(0)
#define __THREAD_CURR __OFFSET(1)
#define __THREAD_SP __OFFSET(2)
#define __THREAD_FP __OFFSET(3)
#define __THREAD_LR __OFFSET(4)
#define __THREAD_PC __OFFSET(5)
#define __THREAD_GR(R) __OFFSET(6 + (R) - 16)
#define __THREAD_FRAME0 __OFFSET(19)
#define __THREAD_USER __OFFSET(19)
#define __USER_INT __OFFSET(0)
#define __INT_GR(R) __OFFSET(14 + (R))
#define __USER_FPMEDIA __OFFSET(NR_USER_INT_REGS)
#define __FPMEDIA_FR(R) __OFFSET(NR_USER_INT_REGS + (R))
#define __FPMEDIA_FNER(R) __OFFSET(NR_USER_INT_REGS + 64 + (R))
#define __FPMEDIA_MSR(R) __OFFSET(NR_USER_INT_REGS + 66 + (R))
#define __FPMEDIA_ACC(R) __OFFSET(NR_USER_INT_REGS + 68 + (R))
#define __FPMEDIA_ACCG(R) __OFFSETC(NR_USER_INT_REGS + 76, (R))
#define __FPMEDIA_FSR(R) __OFFSET(NR_USER_INT_REGS + 78 + (R))
#define __THREAD_GR(R) __OFFSET(__THREAD_GR16, (R) - 16)
#endif /* _ASM_REGISTERS_H */

View file

@ -179,7 +179,6 @@ do { \
#define rmb() asm volatile ("membar" : : :"memory")
#define wmb() asm volatile ("membar" : : :"memory")
#define set_mb(var, value) do { var = value; mb(); } while (0)
#define set_wmb(var, value) do { var = value; wmb(); } while (0)
#define smp_mb() mb()
#define smp_rmb() rmb()

View file

@ -19,6 +19,8 @@
#include <asm/processor.h>
#endif
#define THREAD_SIZE 8192
/*
* low level task data that entry.S needs immediate access to
* - this struct should fit entirely inside of one cache line
@ -46,15 +48,7 @@ struct thread_info {
#else /* !__ASSEMBLY__ */
/* offsets into the thread_info struct for assembly code access */
#define TI_TASK 0x00000000
#define TI_EXEC_DOMAIN 0x00000004
#define TI_FLAGS 0x00000008
#define TI_STATUS 0x0000000C
#define TI_CPU 0x00000010
#define TI_PRE_COUNT 0x00000014
#define TI_ADDR_LIMIT 0x00000018
#define TI_RESTART_BLOCK 0x0000001C
#include <asm/asm-offsets.h>
#endif
@ -83,12 +77,6 @@ struct thread_info {
#define init_thread_info (init_thread_union.thread_info)
#define init_stack (init_thread_union.stack)
#ifdef CONFIG_SMALL_TASKS
#define THREAD_SIZE 4096
#else
#define THREAD_SIZE 8192
#endif
/* how to get the thread information struct from C */
register struct thread_info *__current_thread_info asm("gr15");
@ -111,11 +99,7 @@ register struct thread_info *__current_thread_info asm("gr15");
#define free_thread_info(info) kfree(info)
#else /* !__ASSEMBLY__ */
#define THREAD_SIZE 8192
#endif
#endif /* __ASSEMBLY__ */
/*
* thread information flags

View file

@ -1,11 +1,8 @@
unifdef-y += a.out.h auxvec.h byteorder.h errno.h fcntl.h ioctl.h \
ioctls.h ipcbuf.h irq.h mman.h msgbuf.h param.h poll.h \
ioctls.h ipcbuf.h mman.h msgbuf.h param.h poll.h \
posix_types.h ptrace.h resource.h sembuf.h shmbuf.h shmparam.h \
sigcontext.h siginfo.h signal.h socket.h sockios.h stat.h \
statfs.h termbits.h termios.h timex.h types.h unistd.h user.h
# These really shouldn't be exported
unifdef-y += atomic.h io.h
statfs.h termbits.h termios.h types.h unistd.h user.h
# These probably shouldn't be exported
unifdef-y += elf.h page.h

View file

@ -0,0 +1,8 @@
__NR_readlink,
__NR_quotactl,
__NR_listxattr,
__NR_llistxattr,
__NR_flistxattr,
__NR_getxattr,
__NR_lgetxattr,
__NR_fgetxattr,

View file

@ -0,0 +1,11 @@
#include <asm-generic/audit_dir_write.h>
__NR_acct,
__NR_swapon,
__NR_quotactl,
__NR_truncate,
#ifdef __NR_truncate64
__NR_truncate64,
#endif
#ifdef __NR_bind
__NR_bind, /* bind can affect fs object only in one way... */
#endif

View file

@ -66,7 +66,6 @@ extern unsigned long memory_end;
#define MAP_NR(addr) (((unsigned long)(addr)-PAGE_OFFSET) >> PAGE_SHIFT)
#define virt_to_page(addr) (mem_map + (((unsigned long)(addr)-PAGE_OFFSET) >> PAGE_SHIFT))
#define virt_to_page(addr) (mem_map + (((unsigned long)(addr)-PAGE_OFFSET) >> PAGE_SHIFT))
#define page_to_virt(page) ((((page) - mem_map) << PAGE_SHIFT) + PAGE_OFFSET)
#define pfn_valid(page) (page < max_mapnr)

View file

@ -17,6 +17,7 @@
*/
#define current_text_addr() ({ __label__ _l; _l: &&_l;})
#include <linux/compiler.h>
#include <asm/segment.h>
#include <asm/fpu.h>
#include <asm/ptrace.h>
@ -129,6 +130,6 @@ unsigned long get_wchan(struct task_struct *p);
eip; })
#define KSTK_ESP(tsk) ((tsk) == current ? rdusp() : (tsk)->thread.usp)
#define cpu_relax() do { } while (0)
#define cpu_relax() barrier()
#endif

View file

@ -84,7 +84,6 @@ asmlinkage void resume(void);
#define wmb() asm volatile ("" : : :"memory")
#define set_rmb(var, value) do { xchg(&var, value); } while (0)
#define set_mb(var, value) set_rmb(var, value)
#define set_wmb(var, value) do { var = value; wmb(); } while (0)
#ifdef CONFIG_SMP
#define smp_mb() mb()

View file

@ -1,5 +1,5 @@
include include/asm-generic/Kbuild.asm
header-y += boot.h cpufeature.h debugreg.h ldt.h setup.h ucontext.h
header-y += boot.h debugreg.h ldt.h ucontext.h
unifdef-y += mtrr.h vm86.h
unifdef-y += mtrr.h setup.h vm86.h

View file

@ -88,9 +88,6 @@ static inline void alternatives_smp_switch(int smp) {}
/*
* Alternative inline assembly for SMP.
*
* alternative_smp() takes two versions (SMP first, UP second) and is
* for more complex stuff such as spinlocks.
*
* The LOCK_PREFIX macro defined here replaces the LOCK and
* LOCK_PREFIX macros used everywhere in the source tree.
*
@ -110,21 +107,6 @@ static inline void alternatives_smp_switch(int smp) {}
*/
#ifdef CONFIG_SMP
#define alternative_smp(smpinstr, upinstr, args...) \
asm volatile ("661:\n\t" smpinstr "\n662:\n" \
".section .smp_altinstructions,\"a\"\n" \
" .align 4\n" \
" .long 661b\n" /* label */ \
" .long 663f\n" /* new instruction */ \
" .byte 0x68\n" /* X86_FEATURE_UP */ \
" .byte 662b-661b\n" /* sourcelen */ \
" .byte 664f-663f\n" /* replacementlen */ \
".previous\n" \
".section .smp_altinstr_replacement,\"awx\"\n" \
"663:\n\t" upinstr "\n" /* replacement */ \
"664:\n\t.fill 662b-661b,1,0x42\n" /* space for original */ \
".previous" : args)
#define LOCK_PREFIX \
".section .smp_locks,\"a\"\n" \
" .align 4\n" \
@ -133,8 +115,6 @@ static inline void alternatives_smp_switch(int smp) {}
"661:\n\tlock; "
#else /* ! CONFIG_SMP */
#define alternative_smp(smpinstr, upinstr, args...) \
asm volatile (upinstr : args)
#define LOCK_PREFIX ""
#endif

View file

@ -46,8 +46,8 @@ static __inline__ void atomic_add(int i, atomic_t *v)
{
__asm__ __volatile__(
LOCK_PREFIX "addl %1,%0"
:"=m" (v->counter)
:"ir" (i), "m" (v->counter));
:"+m" (v->counter)
:"ir" (i));
}
/**
@ -61,8 +61,8 @@ static __inline__ void atomic_sub(int i, atomic_t *v)
{
__asm__ __volatile__(
LOCK_PREFIX "subl %1,%0"
:"=m" (v->counter)
:"ir" (i), "m" (v->counter));
:"+m" (v->counter)
:"ir" (i));
}
/**
@ -80,8 +80,8 @@ static __inline__ int atomic_sub_and_test(int i, atomic_t *v)
__asm__ __volatile__(
LOCK_PREFIX "subl %2,%0; sete %1"
:"=m" (v->counter), "=qm" (c)
:"ir" (i), "m" (v->counter) : "memory");
:"+m" (v->counter), "=qm" (c)
:"ir" (i) : "memory");
return c;
}
@ -95,8 +95,7 @@ static __inline__ void atomic_inc(atomic_t *v)
{
__asm__ __volatile__(
LOCK_PREFIX "incl %0"
:"=m" (v->counter)
:"m" (v->counter));
:"+m" (v->counter));
}
/**
@ -109,8 +108,7 @@ static __inline__ void atomic_dec(atomic_t *v)
{
__asm__ __volatile__(
LOCK_PREFIX "decl %0"
:"=m" (v->counter)
:"m" (v->counter));
:"+m" (v->counter));
}
/**
@ -127,8 +125,8 @@ static __inline__ int atomic_dec_and_test(atomic_t *v)
__asm__ __volatile__(
LOCK_PREFIX "decl %0; sete %1"
:"=m" (v->counter), "=qm" (c)
:"m" (v->counter) : "memory");
:"+m" (v->counter), "=qm" (c)
: : "memory");
return c != 0;
}
@ -146,8 +144,8 @@ static __inline__ int atomic_inc_and_test(atomic_t *v)
__asm__ __volatile__(
LOCK_PREFIX "incl %0; sete %1"
:"=m" (v->counter), "=qm" (c)
:"m" (v->counter) : "memory");
:"+m" (v->counter), "=qm" (c)
: : "memory");
return c != 0;
}
@ -166,8 +164,8 @@ static __inline__ int atomic_add_negative(int i, atomic_t *v)
__asm__ __volatile__(
LOCK_PREFIX "addl %2,%0; sets %1"
:"=m" (v->counter), "=qm" (c)
:"ir" (i), "m" (v->counter) : "memory");
:"+m" (v->counter), "=qm" (c)
:"ir" (i) : "memory");
return c;
}

View file

@ -7,10 +7,7 @@
#include <asm/ptrace.h>
#include <asm/user.h>
#include <asm/processor.h>
#include <asm/system.h> /* for savesegment */
#include <asm/auxvec.h>
#include <asm/desc.h>
#include <linux/utsname.h>
@ -48,6 +45,12 @@ typedef struct user_fxsr_struct elf_fpxregset_t;
#define ELF_DATA ELFDATA2LSB
#define ELF_ARCH EM_386
#ifdef __KERNEL__
#include <asm/processor.h>
#include <asm/system.h> /* for savesegment */
#include <asm/desc.h>
/* SVR4/i386 ABI (pages 3-31, 3-32) says that when the program starts %edx
contains a pointer to a function which might be registered using `atexit'.
This provides a mean for the dynamic linker to call DT_FINI functions for
@ -111,7 +114,6 @@ typedef struct user_fxsr_struct elf_fpxregset_t;
#define ELF_PLATFORM (system_utsname.machine)
#ifdef __KERNEL__
#define SET_PERSONALITY(ex, ibcs2) do { } while (0)
/*

View file

@ -20,8 +20,8 @@
.align 8\n\
.long 1b,3b\n\
.previous" \
: "=r" (oldval), "=r" (ret), "=m" (*uaddr) \
: "i" (-EFAULT), "m" (*uaddr), "0" (oparg), "1" (0))
: "=r" (oldval), "=r" (ret), "+m" (*uaddr) \
: "i" (-EFAULT), "0" (oparg), "1" (0))
#define __futex_atomic_op2(insn, ret, oldval, uaddr, oparg) \
__asm__ __volatile ( \
@ -38,9 +38,9 @@
.align 8\n\
.long 1b,4b,2b,4b\n\
.previous" \
: "=&a" (oldval), "=&r" (ret), "=m" (*uaddr), \
: "=&a" (oldval), "=&r" (ret), "+m" (*uaddr), \
"=&r" (tem) \
: "r" (oparg), "i" (-EFAULT), "m" (*uaddr), "1" (0))
: "r" (oparg), "i" (-EFAULT), "1" (0))
static inline int
futex_atomic_op_inuser (int encoded_op, int __user *uaddr)
@ -123,7 +123,7 @@ futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval, int newval)
" .long 1b,3b \n"
" .previous \n"
: "=a" (oldval), "=m" (*uaddr)
: "=a" (oldval), "+m" (*uaddr)
: "i" (-EFAULT), "r" (newval), "0" (oldval)
: "memory"
);

View file

@ -45,6 +45,7 @@ typedef u8 kprobe_opcode_t;
#define JPROBE_ENTRY(pentry) (kprobe_opcode_t *)pentry
#define ARCH_SUPPORTS_KRETPROBES
#define ARCH_INACTIVE_KPROBE_COUNT 0
#define flush_insn_slot(p) do { } while (0)
void arch_remove_kprobe(struct kprobe *p);
void kretprobe_trampoline(void);

View file

@ -17,32 +17,30 @@ static __inline__ void local_inc(local_t *v)
{
__asm__ __volatile__(
"incl %0"
:"=m" (v->counter)
:"m" (v->counter));
:"+m" (v->counter));
}
static __inline__ void local_dec(local_t *v)
{
__asm__ __volatile__(
"decl %0"
:"=m" (v->counter)
:"m" (v->counter));
:"+m" (v->counter));
}
static __inline__ void local_add(long i, local_t *v)
{
__asm__ __volatile__(
"addl %1,%0"
:"=m" (v->counter)
:"ir" (i), "m" (v->counter));
:"+m" (v->counter)
:"ir" (i));
}
static __inline__ void local_sub(long i, local_t *v)
{
__asm__ __volatile__(
"subl %1,%0"
:"=m" (v->counter)
:"ir" (i), "m" (v->counter));
:"+m" (v->counter)
:"ir" (i));
}
/* On x86, these are no better than the atomic variants. */

View file

@ -3,6 +3,10 @@
#define MAX_IRQ_SOURCES 256
#if CONFIG_BASE_SMALL == 0
#define MAX_MP_BUSSES 256
#else
#define MAX_MP_BUSSES 32
#endif
#endif /* __ASM_MACH_MPSPEC_H */

View file

@ -14,7 +14,7 @@ extern struct pglist_data *node_data[];
#ifdef CONFIG_X86_NUMAQ
#include <asm/numaq.h>
#else /* summit or generic arch */
#elif defined(CONFIG_ACPI_SRAT)/* summit or generic arch */
#include <asm/srat.h>
#endif

View file

@ -51,12 +51,12 @@ typedef struct {
#undef __FD_SET
#define __FD_SET(fd,fdsetp) \
__asm__ __volatile__("btsl %1,%0": \
"=m" (*(__kernel_fd_set *) (fdsetp)):"r" ((int) (fd)))
"+m" (*(__kernel_fd_set *) (fdsetp)):"r" ((int) (fd)))
#undef __FD_CLR
#define __FD_CLR(fd,fdsetp) \
__asm__ __volatile__("btrl %1,%0": \
"=m" (*(__kernel_fd_set *) (fdsetp)):"r" ((int) (fd)))
"+m" (*(__kernel_fd_set *) (fdsetp)):"r" ((int) (fd)))
#undef __FD_ISSET
#define __FD_ISSET(fd,fdsetp) (__extension__ ({ \

View file

@ -21,23 +21,21 @@
#define RW_LOCK_BIAS_STR "0x01000000"
#define __build_read_lock_ptr(rw, helper) \
alternative_smp("lock; subl $1,(%0)\n\t" \
asm volatile(LOCK_PREFIX " subl $1,(%0)\n\t" \
"jns 1f\n" \
"call " helper "\n\t" \
"1:\n", \
"subl $1,(%0)\n\t", \
:"a" (rw) : "memory")
"1:\n" \
::"a" (rw) : "memory")
#define __build_read_lock_const(rw, helper) \
alternative_smp("lock; subl $1,%0\n\t" \
asm volatile(LOCK_PREFIX " subl $1,%0\n\t" \
"jns 1f\n" \
"pushl %%eax\n\t" \
"leal %0,%%eax\n\t" \
"call " helper "\n\t" \
"popl %%eax\n\t" \
"1:\n", \
"subl $1,%0\n\t", \
"=m" (*(volatile int *)rw) : : "memory")
"1:\n" \
:"+m" (*(volatile int *)rw) : : "memory")
#define __build_read_lock(rw, helper) do { \
if (__builtin_constant_p(rw)) \
@ -47,23 +45,21 @@
} while (0)
#define __build_write_lock_ptr(rw, helper) \
alternative_smp("lock; subl $" RW_LOCK_BIAS_STR ",(%0)\n\t" \
asm volatile(LOCK_PREFIX " subl $" RW_LOCK_BIAS_STR ",(%0)\n\t" \
"jz 1f\n" \
"call " helper "\n\t" \
"1:\n", \
"subl $" RW_LOCK_BIAS_STR ",(%0)\n\t", \
:"a" (rw) : "memory")
"1:\n" \
::"a" (rw) : "memory")
#define __build_write_lock_const(rw, helper) \
alternative_smp("lock; subl $" RW_LOCK_BIAS_STR ",%0\n\t" \
asm volatile(LOCK_PREFIX " subl $" RW_LOCK_BIAS_STR ",%0\n\t" \
"jz 1f\n" \
"pushl %%eax\n\t" \
"leal %0,%%eax\n\t" \
"call " helper "\n\t" \
"popl %%eax\n\t" \
"1:\n", \
"subl $" RW_LOCK_BIAS_STR ",%0\n\t", \
"=m" (*(volatile int *)rw) : : "memory")
"1:\n" \
:"+m" (*(volatile int *)rw) : : "memory")
#define __build_write_lock(rw, helper) do { \
if (__builtin_constant_p(rw)) \

View file

@ -111,8 +111,8 @@ LOCK_PREFIX " incl (%%eax)\n\t" /* adds 0x00000001, returns the old value
" jmp 1b\n"
LOCK_SECTION_END
"# ending down_read\n\t"
: "=m"(sem->count)
: "a"(sem), "m"(sem->count)
: "+m" (sem->count)
: "a" (sem)
: "memory", "cc");
}
@ -133,8 +133,8 @@ LOCK_PREFIX " cmpxchgl %2,%0\n\t"
" jnz 1b\n\t"
"2:\n\t"
"# ending __down_read_trylock\n\t"
: "+m"(sem->count), "=&a"(result), "=&r"(tmp)
: "i"(RWSEM_ACTIVE_READ_BIAS)
: "+m" (sem->count), "=&a" (result), "=&r" (tmp)
: "i" (RWSEM_ACTIVE_READ_BIAS)
: "memory", "cc");
return result>=0 ? 1 : 0;
}
@ -161,8 +161,8 @@ LOCK_PREFIX " xadd %%edx,(%%eax)\n\t" /* subtract 0x0000ffff, returns the
" jmp 1b\n"
LOCK_SECTION_END
"# ending down_write"
: "=m"(sem->count), "=d"(tmp)
: "a"(sem), "1"(tmp), "m"(sem->count)
: "+m" (sem->count), "=d" (tmp)
: "a" (sem), "1" (tmp)
: "memory", "cc");
}
@ -205,8 +205,8 @@ LOCK_PREFIX " xadd %%edx,(%%eax)\n\t" /* subtracts 1, returns the old valu
" jmp 1b\n"
LOCK_SECTION_END
"# ending __up_read\n"
: "=m"(sem->count), "=d"(tmp)
: "a"(sem), "1"(tmp), "m"(sem->count)
: "+m" (sem->count), "=d" (tmp)
: "a" (sem), "1" (tmp)
: "memory", "cc");
}
@ -231,8 +231,8 @@ LOCK_PREFIX " xaddl %%edx,(%%eax)\n\t" /* tries to transition 0xffff0001 ->
" jmp 1b\n"
LOCK_SECTION_END
"# ending __up_write\n"
: "=m"(sem->count)
: "a"(sem), "i"(-RWSEM_ACTIVE_WRITE_BIAS), "m"(sem->count)
: "+m" (sem->count)
: "a" (sem), "i" (-RWSEM_ACTIVE_WRITE_BIAS)
: "memory", "cc", "edx");
}
@ -256,8 +256,8 @@ LOCK_PREFIX " addl %2,(%%eax)\n\t" /* transitions 0xZZZZ0001 -> 0xYYYY0001
" jmp 1b\n"
LOCK_SECTION_END
"# ending __downgrade_write\n"
: "=m"(sem->count)
: "a"(sem), "i"(-RWSEM_WAITING_BIAS), "m"(sem->count)
: "+m" (sem->count)
: "a" (sem), "i" (-RWSEM_WAITING_BIAS)
: "memory", "cc");
}
@ -268,8 +268,8 @@ static inline void rwsem_atomic_add(int delta, struct rw_semaphore *sem)
{
__asm__ __volatile__(
LOCK_PREFIX "addl %1,%0"
: "=m"(sem->count)
: "ir"(delta), "m"(sem->count));
: "+m" (sem->count)
: "ir" (delta));
}
/*
@ -280,10 +280,9 @@ static inline int rwsem_atomic_update(int delta, struct rw_semaphore *sem)
int tmp = delta;
__asm__ __volatile__(
LOCK_PREFIX "xadd %0,(%2)"
: "+r"(tmp), "=m"(sem->count)
: "r"(sem), "m"(sem->count)
: "memory");
LOCK_PREFIX "xadd %0,%1"
: "+r" (tmp), "+m" (sem->count)
: : "memory");
return tmp+delta;
}

View file

@ -107,7 +107,7 @@ static inline void down(struct semaphore * sem)
"call __down_failed\n\t"
"jmp 1b\n"
LOCK_SECTION_END
:"=m" (sem->count)
:"+m" (sem->count)
:
:"memory","ax");
}
@ -132,7 +132,7 @@ static inline int down_interruptible(struct semaphore * sem)
"call __down_failed_interruptible\n\t"
"jmp 1b\n"
LOCK_SECTION_END
:"=a" (result), "=m" (sem->count)
:"=a" (result), "+m" (sem->count)
:
:"memory");
return result;
@ -157,7 +157,7 @@ static inline int down_trylock(struct semaphore * sem)
"call __down_failed_trylock\n\t"
"jmp 1b\n"
LOCK_SECTION_END
:"=a" (result), "=m" (sem->count)
:"=a" (result), "+m" (sem->count)
:
:"memory");
return result;
@ -182,7 +182,7 @@ static inline void up(struct semaphore * sem)
"jmp 1b\n"
LOCK_SECTION_END
".subsection 0\n"
:"=m" (sem->count)
:"+m" (sem->count)
:
:"memory","ax");
}

View file

@ -6,6 +6,7 @@
#ifndef _i386_SETUP_H
#define _i386_SETUP_H
#ifdef __KERNEL__
#include <linux/pfn.h>
/*
@ -13,6 +14,7 @@
*/
#define MAXMEM_PFN PFN_DOWN(MAXMEM)
#define MAX_NONPAE_PFN (1 << 20)
#endif
#define PARAM_SIZE 4096
#define COMMAND_LINE_SIZE 256

View file

@ -2,7 +2,6 @@
#define _ASMi386_SIGNAL_H
#include <linux/types.h>
#include <linux/linkage.h>
#include <linux/time.h>
#include <linux/compiler.h>
@ -10,6 +9,9 @@
struct siginfo;
#ifdef __KERNEL__
#include <linux/linkage.h>
/* Most things should be clean enough to redefine this at will, if care
is taken to make libc match. */

View file

@ -22,7 +22,7 @@
#define __raw_spin_lock_string \
"\n1:\t" \
"lock ; decb %0\n\t" \
LOCK_PREFIX " ; decb %0\n\t" \
"jns 3f\n" \
"2:\t" \
"rep;nop\n\t" \
@ -38,7 +38,7 @@
*/
#define __raw_spin_lock_string_flags \
"\n1:\t" \
"lock ; decb %0\n\t" \
LOCK_PREFIX " ; decb %0\n\t" \
"jns 5f\n" \
"2:\t" \
"testl $0x200, %1\n\t" \
@ -57,15 +57,9 @@
"jmp 4b\n" \
"5:\n\t"
#define __raw_spin_lock_string_up \
"\n\tdecb %0"
static inline void __raw_spin_lock(raw_spinlock_t *lock)
{
alternative_smp(
__raw_spin_lock_string,
__raw_spin_lock_string_up,
"=m" (lock->slock) : : "memory");
asm(__raw_spin_lock_string : "+m" (lock->slock) : : "memory");
}
/*
@ -76,10 +70,7 @@ static inline void __raw_spin_lock(raw_spinlock_t *lock)
#ifndef CONFIG_PROVE_LOCKING
static inline void __raw_spin_lock_flags(raw_spinlock_t *lock, unsigned long flags)
{
alternative_smp(
__raw_spin_lock_string_flags,
__raw_spin_lock_string_up,
"=m" (lock->slock) : "r" (flags) : "memory");
asm(__raw_spin_lock_string_flags : "+m" (lock->slock) : "r" (flags) : "memory");
}
#endif
@ -88,7 +79,7 @@ static inline int __raw_spin_trylock(raw_spinlock_t *lock)
char oldval;
__asm__ __volatile__(
"xchgb %b0,%1"
:"=q" (oldval), "=m" (lock->slock)
:"=q" (oldval), "+m" (lock->slock)
:"0" (0) : "memory");
return oldval > 0;
}
@ -104,7 +95,7 @@ static inline int __raw_spin_trylock(raw_spinlock_t *lock)
#define __raw_spin_unlock_string \
"movb $1,%0" \
:"=m" (lock->slock) : : "memory"
:"+m" (lock->slock) : : "memory"
static inline void __raw_spin_unlock(raw_spinlock_t *lock)
@ -118,7 +109,7 @@ static inline void __raw_spin_unlock(raw_spinlock_t *lock)
#define __raw_spin_unlock_string \
"xchgb %b0, %1" \
:"=q" (oldval), "=m" (lock->slock) \
:"=q" (oldval), "+m" (lock->slock) \
:"0" (oldval) : "memory"
static inline void __raw_spin_unlock(raw_spinlock_t *lock)
@ -199,13 +190,13 @@ static inline int __raw_write_trylock(raw_rwlock_t *lock)
static inline void __raw_read_unlock(raw_rwlock_t *rw)
{
asm volatile(LOCK_PREFIX "incl %0" :"=m" (rw->lock) : : "memory");
asm volatile(LOCK_PREFIX "incl %0" :"+m" (rw->lock) : : "memory");
}
static inline void __raw_write_unlock(raw_rwlock_t *rw)
{
asm volatile(LOCK_PREFIX "addl $" RW_LOCK_BIAS_STR ", %0"
: "=m" (rw->lock) : : "memory");
: "+m" (rw->lock) : : "memory");
}
#endif /* __ASM_SPINLOCK_H */

Some files were not shown because too many files have changed in this diff Show more