From 8e34703b9315688305306d26148088b0a8292563 Mon Sep 17 00:00:00 2001 From: Russell King Date: Thu, 31 Aug 2006 15:09:30 +0100 Subject: [ARM] Fix ARM __raw_read_trylock() implementation Matthew Wilcox pointed out that the generic implementation of this is unfit for use. Here's an ARM optimised version instead. Signed-off-by: Russell King --- include/asm-arm/spinlock.h | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/asm-arm/spinlock.h b/include/asm-arm/spinlock.h index 406ca97..e2f1d75 100644 --- a/include/asm-arm/spinlock.h +++ b/include/asm-arm/spinlock.h @@ -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) -- cgit v1.1 From f105a7dfc5e81c28dd23ebf2328e42972e2cf240 Mon Sep 17 00:00:00 2001 From: Ben Dooks Date: Thu, 31 Aug 2006 15:26:37 +0100 Subject: [ARM] 3764/1: S3C24XX: change type naming to kernel style Patch from Ben Dooks The type naming in the s3c24xx dma code is riddled with typedefs creating _t types, from the code import from 2.4 which is contrary to the current Kernel coding style. This patch cleans this up, removing the typedefs and and fixing up the resultant code changes. Signed-off-by: Ben Dooks Signed-off-by: Russell King --- include/asm-arm/arch-s3c2410/dma.h | 80 +++++++++++++++++--------------------- 1 file changed, 36 insertions(+), 44 deletions(-) (limited to 'include') diff --git a/include/asm-arm/arch-s3c2410/dma.h b/include/asm-arm/arch-s3c2410/dma.h index 7463fd5..46e6540 100644 --- a/include/asm-arm/arch-s3c2410/dma.h +++ b/include/asm-arm/arch-s3c2410/dma.h @@ -35,14 +35,14 @@ /* 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,34 +70,32 @@ 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 { +enum s3c2410_dmasrc { S3C2410_DMASRC_HW, /* source is memory */ S3C2410_DMASRC_MEM /* source is hardware */ }; -/* enum s3c2410_chan_op_e +/* 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, @@ -107,8 +105,6 @@ enum s3c2410_chan_op_e { 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 @@ -117,22 +113,19 @@ 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; +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 */ @@ -142,20 +135,21 @@ struct s3c2410_dma_buf_s { /* [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 { +struct s3c2410_dma_stats { unsigned long loads; unsigned long timeout_longest; unsigned long timeout_shortest; @@ -163,14 +157,12 @@ struct s3c2410_dma_stats_s { 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 */ @@ -180,12 +172,12 @@ struct s3c2410_dma_chan_s { /* 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; + enum s3c2410_dmasrc source; unsigned long dev_addr; unsigned long load_timeout; unsigned int flags; /* channel flags */ @@ -201,20 +193,20 @@ struct s3c2410_dma_chan_s { s3c2410_dma_opfn_t op_fn; /* channel operation 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; @@ -227,7 +219,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 @@ -235,7 +227,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 * @@ -250,7 +242,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 * @@ -274,7 +266,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 -- cgit v1.1 From 57bcdafcb1e0782e7ae13471d9223c69e3a6cba2 Mon Sep 17 00:00:00 2001 From: Ben Dooks Date: Thu, 31 Aug 2006 15:26:41 +0100 Subject: [ARM] 3765/1: S3C24XX: cleanup include/asm-arm/arch-s3c2410/dma.h Patch from Ben Dooks Cleanup for include/asm-arma/arch-s3c2410/dma.h, by using tab characters to indent items, remove the now un-necessary changelog, and update the copyright information. Signed-off-by: Ben Dooks Signed-off-by: Russell King --- include/asm-arm/arch-s3c2410/dma.h | 90 +++++++++++++++++--------------------- 1 file changed, 41 insertions(+), 49 deletions(-) (limited to 'include') diff --git a/include/asm-arm/arch-s3c2410/dma.h b/include/asm-arm/arch-s3c2410/dma.h index 46e6540..3661e46 100644 --- a/include/asm-arm/arch-s3c2410/dma.h +++ b/include/asm-arm/arch-s3c2410/dma.h @@ -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 * - * 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,15 +16,13 @@ #include #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) @@ -83,10 +76,9 @@ enum s3c2410_dma_buffresult { S3C2410_RES_ABORT }; - enum s3c2410_dmasrc { - S3C2410_DMASRC_HW, /* source is memory */ - S3C2410_DMASRC_MEM /* source is hardware */ + S3C2410_DMASRC_HW, /* source is memory */ + S3C2410_DMASRC_MEM /* source is hardware */ }; /* enum s3c2410_chan_op @@ -101,7 +93,7 @@ enum s3c2410_chan_op { 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 */ }; @@ -125,12 +117,12 @@ struct s3c2410_dma_client { 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 */ + 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? */ @@ -150,11 +142,11 @@ typedef int (*s3c2410_dma_opfn_t)(struct s3c2410_dma_chan *, enum s3c2410_chan_op ); struct s3c2410_dma_stats { - unsigned long loads; - unsigned long timeout_longest; - unsigned long timeout_shortest; - unsigned long timeout_avg; - unsigned long timeout_failed; + unsigned long loads; + unsigned long timeout_longest; + unsigned long timeout_shortest; + unsigned long timeout_avg; + unsigned long timeout_failed; }; /* struct s3c2410_dma_chan @@ -164,42 +156,42 @@ struct s3c2410_dma_stats { 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 */ - enum s3c2410_dma_state state; - enum s3c2410_dma_loadst load_state; - struct s3c2410_dma_client *client; + enum s3c2410_dma_state state; + enum s3c2410_dma_loadst load_state; + struct s3c2410_dma_client *client; /* channel configuration */ - enum s3c2410_dmasrc 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 */ - struct s3c2410_dma_stats *stats; - struct s3c2410_dma_stats stats_store; + struct s3c2410_dma_stats *stats; + struct s3c2410_dma_stats stats_store; /* buffer list and information */ - 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 */ + 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; -- cgit v1.1 From 22db37ec5fd51b0c77b1dd5751b1cdc2672c08d6 Mon Sep 17 00:00:00 2001 From: Chris Wright Date: Thu, 31 Aug 2006 00:53:22 -0700 Subject: [PATCH] i386: rwlock.h fix smp alternatives fix Commit 8c74932779fc6f61b4c30145863a17125c1a296c ("i386: Remove alternative_smp") did not actually compile on x86 with CONFIG_SMP. This fixes the __build_read/write_lock helpers. I've boot tested on SMP. [ Andi: "Oops, I think that was a quilt unrefreshed patch. Sorry. I fixed those before testing, but then still send out the old patch." ] Signed-off-by: Chris Wright Cc: Gerd Hoffmann Acked-by: Andi Kleen Signed-off-by: Linus Torvalds --- include/asm-i386/rwlock.h | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) (limited to 'include') diff --git a/include/asm-i386/rwlock.h b/include/asm-i386/rwlock.h index 3ac1ba9..87c069c 100644 --- a/include/asm-i386/rwlock.h +++ b/include/asm-i386/rwlock.h @@ -21,21 +21,21 @@ #define RW_LOCK_BIAS_STR "0x01000000" #define __build_read_lock_ptr(rw, helper) \ - asm volatile(LOCK_PREFIX " ; subl $1,(%0)\n\t" \ + asm volatile(LOCK_PREFIX " subl $1,(%0)\n\t" \ "jns 1f\n" \ "call " helper "\n\t" \ "1:\n" \ - :"a" (rw) : "memory") + ::"a" (rw) : "memory") #define __build_read_lock_const(rw, helper) \ - asm volatile(LOCK_PREFIX " ; 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" : \ - "+m" (*(volatile int *)rw) : : "memory") + "1:\n" \ + :"+m" (*(volatile int *)rw) : : "memory") #define __build_read_lock(rw, helper) do { \ if (__builtin_constant_p(rw)) \ @@ -45,23 +45,21 @@ } while (0) #define __build_write_lock_ptr(rw, helper) \ - asm volatile(LOCK_PREFIX " ; 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) \ - asm volatile(LOCK_PREFIX " ; 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)) \ -- cgit v1.1 From 1ae4f9ba84b94b85d995a6ae0064b869ff15b080 Mon Sep 17 00:00:00 2001 From: Mark Hindley Date: Mon, 28 Aug 2006 20:43:25 +0100 Subject: USB: Add VIA quirk fixup for VT8235 usb2 Patch to add VIA PCI quirk for Enhanced/Extended USB on VT8235 southbridge. It is needed in order to use EHCI/USB 2.0 with ACPI. Without it IRQs are not routed correctly, you get an "Unlink after no-IRQ?" error and the device is unusable. I belive this could also be a fix for Bugzilla Bug 5835. Signed-off-by: Mark Hindley Signed-off-by: Greg Kroah-Hartman --- include/linux/pci_ids.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 4c2839e..c91164e 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h @@ -1292,6 +1292,7 @@ #define PCI_DEVICE_ID_VIA_8367_0 0x3099 #define PCI_DEVICE_ID_VIA_8653_0 0x3101 #define PCI_DEVICE_ID_VIA_8622 0x3102 +#define PCI_DEVICE_ID_VIA_8235_USB_2 0x3104 #define PCI_DEVICE_ID_VIA_8233C_0 0x3109 #define PCI_DEVICE_ID_VIA_8361 0x3112 #define PCI_DEVICE_ID_VIA_XM266 0x3116 -- cgit v1.1 From df9ecaba3f152d1ea79f2a5e0b87505e03f47590 Mon Sep 17 00:00:00 2001 From: Christoph Lameter Date: Thu, 31 Aug 2006 21:27:35 -0700 Subject: [PATCH] ZVC: Scale thresholds depending on the size of the system The ZVC counter update threshold is currently set to a fixed value of 32. This patch sets up the threshold depending on the number of processors and the sizes of the zones in the system. With the current threshold of 32, I was able to observe slight contention when more than 130-140 processors concurrently updated the counters. The contention vanished when I either increased the threshold to 64 or used Andrew's idea of overstepping the interval (see ZVC overstep patch). However, we saw contention again at 220-230 processors. So we need higher values for larger systems. But the current default is already a bit of an overkill for smaller systems. Some systems have tiny zones where precision matters. For example i386 and x86_64 have 16M DMA zones and either 900M ZONE_NORMAL or ZONE_DMA32. These are even present on SMP and NUMA systems. The patch here sets up a threshold based on the number of processors in the system and the size of the zone that these counters are used for. The threshold should grow logarithmically, so we use fls() as an easy approximation. Results of tests on a system with 1024 processors (4TB RAM) The following output is from a test allocating 1GB of memory concurrently on each processor (Forking the process. So contention on mmap_sem and the pte locks is not a factor): X MIN TYPE: CPUS WALL WALL SYS USER TOTCPU fork 1 0.552 0.552 0.540 0.012 0.552 fork 4 0.552 0.548 2.164 0.036 2.200 fork 16 0.564 0.548 8.812 0.164 8.976 fork 128 0.580 0.572 72.204 1.208 73.412 fork 256 1.300 0.660 310.400 2.160 312.560 fork 512 3.512 0.696 1526.836 4.816 1531.652 fork 1020 20.024 0.700 17243.176 6.688 17249.863 So a threshold of 32 is fine up to 128 processors. At 256 processors contention becomes a factor. Overstepping the counter (earlier patch) improves the numbers a bit: fork 4 0.552 0.548 2.164 0.040 2.204 fork 16 0.552 0.548 8.640 0.148 8.788 fork 128 0.556 0.548 69.676 0.956 70.632 fork 256 0.876 0.636 212.468 2.108 214.576 fork 512 2.276 0.672 997.324 4.260 1001.584 fork 1020 13.564 0.680 11586.436 6.088 11592.523 Still contention at 512 and 1020. Contention at 1020 is down by a third. 256 still has a slight bit of contention. After this patch the counter threshold will be set to 125 which reduces contention significantly: fork 128 0.560 0.548 69.776 0.932 70.708 fork 256 0.636 0.556 143.460 2.036 145.496 fork 512 0.640 0.548 284.244 4.236 288.480 fork 1020 1.500 0.588 1326.152 8.892 1335.044 [akpm@osdl.org: !SMP build fix] Signed-off-by: Christoph Lameter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/mmzone.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 656b588..f45163c 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h @@ -77,6 +77,7 @@ struct per_cpu_pages { struct per_cpu_pageset { struct per_cpu_pages pcp[2]; /* 0: hot. 1: cold */ #ifdef CONFIG_SMP + s8 stat_threshold; s8 vm_stat_diff[NR_VM_ZONE_STAT_ITEMS]; #endif } ____cacheline_aligned_in_smp; -- cgit v1.1 From 35df17c57cecb08f0120fb18926325f1093dc429 Mon Sep 17 00:00:00 2001 From: Shailabh Nagar Date: Thu, 31 Aug 2006 21:27:38 -0700 Subject: [PATCH] task delay accounting fixes Cleanup allocation and freeing of tsk->delays used by delay accounting. This solves two problems reported for delay accounting: 1. oops in __delayacct_blkio_ticks http://www.uwsg.indiana.edu/hypermail/linux/kernel/0608.2/1844.html Currently tsk->delays is getting freed too early in task exit which can cause a NULL tsk->delays to get accessed via reading of /proc//stats. The patch fixes this problem by freeing tsk->delays closer to when task_struct itself is freed up. As a result, it also eliminates the use of tsk->delays_lock which was only being used (inadequately) to safeguard access to tsk->delays while a task was exiting. 2. Possible memory leak in kernel/delayacct.c http://www.uwsg.indiana.edu/hypermail/linux/kernel/0608.2/1389.html The patch cleans up tsk->delays allocations after a bad fork which was missing earlier. The patch has been tested to fix the problems listed above and stress tested with rapid calls to delay accounting's taskstats command interface (which is the other path that can access the same data, besides the /proc interface causing the oops above). Signed-off-by: Shailabh Nagar Cc: Balbir Singh Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/delayacct.h | 10 +++++++--- include/linux/sched.h | 1 - 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/linux/delayacct.h b/include/linux/delayacct.h index 11487b6..561e2a7 100644 --- a/include/linux/delayacct.h +++ b/include/linux/delayacct.h @@ -59,10 +59,14 @@ static inline void delayacct_tsk_init(struct task_struct *tsk) __delayacct_tsk_init(tsk); } -static inline void delayacct_tsk_exit(struct task_struct *tsk) +/* Free tsk->delays. Called from bad fork and __put_task_struct + * where there's no risk of tsk->delays being accessed elsewhere + */ +static inline void delayacct_tsk_free(struct task_struct *tsk) { if (tsk->delays) - __delayacct_tsk_exit(tsk); + kmem_cache_free(delayacct_cache, tsk->delays); + tsk->delays = NULL; } static inline void delayacct_blkio_start(void) @@ -101,7 +105,7 @@ static inline void delayacct_init(void) {} static inline void delayacct_tsk_init(struct task_struct *tsk) {} -static inline void delayacct_tsk_exit(struct task_struct *tsk) +static inline void delayacct_tsk_free(struct task_struct *tsk) {} static inline void delayacct_blkio_start(void) {} diff --git a/include/linux/sched.h b/include/linux/sched.h index 6674fc1..34ed0d9 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -994,7 +994,6 @@ struct task_struct { */ struct pipe_inode_info *splice_pipe; #ifdef CONFIG_TASK_DELAY_ACCT - spinlock_t delays_lock; struct task_delay_info *delays; #endif }; -- cgit v1.1 From a9aa141cfc2e08470bba3b9a8328bc50ac457488 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Thu, 31 Aug 2006 21:27:40 -0700 Subject: [PATCH] x86: increase MAX_MP_BUSSES on default arch Vitezslav Samel reports that an HP DL380 g4 fails using the default arch due to the ISA bus having an ID of 32. It would have worked OK with the generic arch - for some reason the default arch doesn't support as many busses. So bump that up to support 256 busses, but leave it at 32 if we're building a tiny system to save a bit of memory. Cc: Vitezslav Samel Acked-by: Andi Kleen Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/asm-i386/mach-default/mach_mpspec.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') diff --git a/include/asm-i386/mach-default/mach_mpspec.h b/include/asm-i386/mach-default/mach_mpspec.h index 6b5dadc..51c9a97 100644 --- a/include/asm-i386/mach-default/mach_mpspec.h +++ b/include/asm-i386/mach-default/mach_mpspec.h @@ -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 */ -- cgit v1.1 From a188ad2bc7dbfa16ccdcaa8d43ade185b969baff Mon Sep 17 00:00:00 2001 From: "George G. Davis" Date: Sat, 2 Sep 2006 18:43:20 +0100 Subject: [ARM] 3762/1: Fix ptrace cache coherency bug for ARM1136 VIPT nonaliasing Harvard caches Patch from George G. Davis Resolve ARM1136 VIPT non-aliasing cache coherency issues observed when using ptrace to set breakpoints and cleanup copy_{to,from}_user_page() while we're here as requested by Russell King because "it's also far too heavy on non-v6 CPUs". NOTES: 1. Only access_process_vm() calls copy_{to,from}_user_page(). 2. access_process_vm() calls get_user_pages() to pin down the "page". 3. get_user_pages() calls flush_dcache_page(page) which ensures cache coherency between kernel and userspace mappings of "page". However flush_dcache_page(page) may not invalidate I-Cache over this range for all cases, specifically, I-Cache is not invalidated for the VIPT non-aliasing case. So memory is consistent between kernel and user space mappings of "page" but I-Cache may still be hot over this range. IOW, we don't have to worry about flush_cache_page() before memcpy(). 4. Now, for the copy_to_user_page() case, after memcpy(), we must flush the caches so memory is consistent with kernel cache entries and invalidate the I-Cache if this mm region is executable. We don't need to do anything after memcpy() for the copy_from_user_page() case since kernel cache entries will be invalidated via the same process above if we access "page" again. The flush_ptrace_access() function (borrowed from SPARC64 implementation) is added to handle cache flushing after memcpy() for the copy_to_user_page() case. Signed-off-by: George G. Davis Signed-off-by: Russell King --- include/asm-arm/cacheflush.h | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/asm-arm/cacheflush.h b/include/asm-arm/cacheflush.h index fe0c744..e4a2569 100644 --- a/include/asm-arm/cacheflush.h +++ b/include/asm-arm/cacheflush.h @@ -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 /* -- cgit v1.1 From 6dba28379edc08327ede01ff41bd3c9dd46a7fa0 Mon Sep 17 00:00:00 2001 From: Henrik Kretzschmar Date: Wed, 6 Sep 2006 00:03:40 -0700 Subject: [PATCH] Documentation for lock_key in struct hrtimer_base Fixes an error message on make xmldocs. Signed-off-by: Henrik Kretzschmar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/hrtimer.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include') diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h index e4bccbc..4fc379d 100644 --- a/include/linux/hrtimer.h +++ b/include/linux/hrtimer.h @@ -80,6 +80,7 @@ struct hrtimer_sleeper { * @get_softirq_time: function to retrieve the current time from the softirq * @curr_timer: the timer which is executing a callback right now * @softirq_time: the time when running the hrtimer queue in the softirq + * @lock_key: the lock_class_key for use with lockdep */ struct hrtimer_base { clockid_t index; -- cgit v1.1 From 96dd7421a06a5bc6eb731323b95efcb2fd864854 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Wed, 6 Sep 2006 00:03:42 -0700 Subject: [PATCH] prevent timespec/timeval to ktime_t overflow Frank v. Waveren pointed out that on 64bit machines the timespec to ktime_t conversion might overflow. This is also true for timeval to ktime_t conversions. This breaks a "sleep inf" on 64bit machines. While a timespec/timeval with tx.sec = MAX_LONG is valid by specification the internal representation of ktime_t is based on nanoseconds. The conversion of seconds to nanoseconds overflows for seconds values >= (MAX_LONG / NSEC_PER_SEC). Check the seconds argument to the conversion and limit it to the maximum time which can be represented by ktime_t. Signed-off-by: Thomas Gleixner Cc: Ingo Molnar Cc: Frank v Waveren Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/ktime.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/linux/ktime.h b/include/linux/ktime.h index ed3396d..84eeecd 100644 --- a/include/linux/ktime.h +++ b/include/linux/ktime.h @@ -56,7 +56,8 @@ typedef union { #endif } ktime_t; -#define KTIME_MAX (~((u64)1 << 63)) +#define KTIME_MAX ((s64)~((u64)1 << 63)) +#define KTIME_SEC_MAX (KTIME_MAX / NSEC_PER_SEC) /* * ktime_t definitions when using the 64-bit scalar representation: @@ -73,6 +74,10 @@ typedef union { */ static inline ktime_t ktime_set(const long secs, const unsigned long nsecs) { +#if (BITS_PER_LONG == 64) + if (unlikely(secs >= KTIME_SEC_MAX)) + return (ktime_t){ .tv64 = KTIME_MAX }; +#endif return (ktime_t) { .tv64 = (s64)secs * NSEC_PER_SEC + (s64)nsecs }; } -- cgit v1.1 From bb98ad77d8451a3ccf9478738ffe7ec63394fcdf Mon Sep 17 00:00:00 2001 From: Ismail Donmez Date: Wed, 6 Sep 2006 00:03:44 -0700 Subject: [PATCH] Move linux/device.h include in linux/atmdev.h to #ifdef __KERNEL__ section linux/device.h header is not included in the David Woodhouse's kernel-headers git tree which is used for userspace kernel headers. Which results in compile errors when building iproute2. Attached patch moves linux/device.h include under the #ifdef __KERNEL__ section. Signed-off-by: Ismail Donmez Signed-off-by: David Woodhouse Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/atmdev.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/linux/atmdev.h b/include/linux/atmdev.h index 41788a3..2096e5c 100644 --- a/include/linux/atmdev.h +++ b/include/linux/atmdev.h @@ -7,7 +7,6 @@ #define LINUX_ATMDEV_H -#include #include #include #include @@ -210,6 +209,7 @@ struct atm_cirange { #ifdef __KERNEL__ +#include #include /* wait_queue_head_t */ #include /* struct timeval */ #include -- cgit v1.1 From b4a228346c1a7d09f565e750d2e988c5671e9fa3 Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Wed, 6 Sep 2006 09:03:26 -0700 Subject: [PATCH] Remove unneeded asm-i386/cpufeature.h from user visibility. Signed-off-by: David Woodhouse Signed-off-by: Linus Torvalds --- include/asm-i386/Kbuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/asm-i386/Kbuild b/include/asm-i386/Kbuild index c064a8e..335b2fa 100644 --- a/include/asm-i386/Kbuild +++ b/include/asm-i386/Kbuild @@ -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 setup.h ucontext.h unifdef-y += mtrr.h vm86.h -- cgit v1.1 From e89bc81103bb8798daae2c1871229620ed725657 Mon Sep 17 00:00:00 2001 From: Catalin Marinas Date: Wed, 6 Sep 2006 19:03:14 +0100 Subject: [ARM] 3766/1: Fix typo in ARM _raw_read_trylock Patch from Catalin Marinas A comma was missing between tmp and tmp2. Signed-off-by: Catalin Marinas Signed-off-by: Russell King --- include/asm-arm/spinlock.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/asm-arm/spinlock.h b/include/asm-arm/spinlock.h index e2f1d75..01b7c26 100644 --- a/include/asm-arm/spinlock.h +++ b/include/asm-arm/spinlock.h @@ -201,7 +201,7 @@ static inline void __raw_read_unlock(raw_rwlock_t *rw) static inline int __raw_read_trylock(raw_rwlock_t *rw) { - unsigned long tmp tmp2 = 1; + unsigned long tmp, tmp2 = 1; __asm__ __volatile__( "1: ldrex %0, [%2]\n" -- cgit v1.1 From f57b225e432d80ee46f48536cc55ea6cf62c5570 Mon Sep 17 00:00:00 2001 From: David Brownell Date: Sun, 3 Sep 2006 06:43:33 -0700 Subject: [MMC] constify mmc_host_ops Let drivers constify MMC host method operations tables, moving them from ".data" to ".rodata". Signed-off-by: David Brownell Acked-by: Pierre Ossman Signed-off-by: Russell King --- include/linux/mmc/host.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index c1f021e..ba095ae 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h @@ -77,7 +77,7 @@ struct mmc_host { struct device *dev; struct class_device class_dev; int index; - struct mmc_host_ops *ops; + const struct mmc_host_ops *ops; unsigned int f_min; unsigned int f_max; u32 ocr_avail; -- cgit v1.1 From d773d7255199a6c8934e197756f54a1115dd127b Mon Sep 17 00:00:00 2001 From: Russell King Date: Thu, 7 Sep 2006 15:57:12 +0100 Subject: [MMC] Cleanup 385e3227d4d83ab13d7767c4bb3593b0256bf246 Rather than having two places which independently calculate the timeout for data transfers, make it a library function instead. Signed-off-by: Russell King Acked-by: Pierre Ossman --- include/linux/mmc/mmc.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/linux/mmc/mmc.h b/include/linux/mmc/mmc.h index 03a14a3..627e2c0 100644 --- a/include/linux/mmc/mmc.h +++ b/include/linux/mmc/mmc.h @@ -105,6 +105,8 @@ extern int mmc_wait_for_cmd(struct mmc_host *, struct mmc_command *, int); extern int mmc_wait_for_app_cmd(struct mmc_host *, unsigned int, struct mmc_command *, int); +extern void mmc_set_data_timeout(struct mmc_data *, const struct mmc_card *, int); + extern int __mmc_claim_host(struct mmc_host *host, struct mmc_card *card); static inline void mmc_claim_host(struct mmc_host *host) -- cgit v1.1 From 3a459756810912d2c2bf188cef566af255936b4d Mon Sep 17 00:00:00 2001 From: Kirill Korotaev Date: Thu, 7 Sep 2006 14:17:04 +0400 Subject: [PATCH] IA64,sparc: local DoS with corrupted ELFs This prevents cross-region mappings on IA64 and SPARC which could lead to system crash. They were correctly trapped for normal mmap() calls, but not for the kernel internal calls generated by executable loading. This code just moves the architecture-specific cross-region checks into an arch-specific "arch_mmap_check()" macro, and defines that for the architectures that needed it (ia64, sparc and sparc64). Architectures that don't have any special requirements can just ignore the new cross-region check, since the mmap() code will just notice on its own when the macro isn't defined. Signed-off-by: Pavel Emelianov Signed-off-by: Kirill Korotaev Acked-by: David Miller Signed-off-by: Greg Kroah-Hartman [ Cleaned up to not affect architectures that don't need it ] Signed-off-by: Linus Torvalds --- include/asm-ia64/mman.h | 8 ++++++++ include/asm-sparc/mman.h | 8 ++++++++ include/asm-sparc64/mman.h | 8 ++++++++ 3 files changed, 24 insertions(+) (limited to 'include') diff --git a/include/asm-ia64/mman.h b/include/asm-ia64/mman.h index 6ba179f..c73b878 100644 --- a/include/asm-ia64/mman.h +++ b/include/asm-ia64/mman.h @@ -22,4 +22,12 @@ #define MCL_CURRENT 1 /* lock all current mappings */ #define MCL_FUTURE 2 /* lock all future mappings */ +#ifdef __KERNEL__ +#ifndef __ASSEMBLY__ +#define arch_mmap_check ia64_mmap_check +int ia64_mmap_check(unsigned long addr, unsigned long len, + unsigned long flags); +#endif +#endif + #endif /* _ASM_IA64_MMAN_H */ diff --git a/include/asm-sparc/mman.h b/include/asm-sparc/mman.h index 88d1886..b7dc40b 100644 --- a/include/asm-sparc/mman.h +++ b/include/asm-sparc/mman.h @@ -35,4 +35,12 @@ #define MADV_FREE 0x5 /* (Solaris) contents can be freed */ +#ifdef __KERNEL__ +#ifndef __ASSEMBLY__ +#define arch_mmap_check sparc_mmap_check +int sparc_mmap_check(unsigned long addr, unsigned long len, + unsigned long flags); +#endif +#endif + #endif /* __SPARC_MMAN_H__ */ diff --git a/include/asm-sparc64/mman.h b/include/asm-sparc64/mman.h index 6fd878e..8cc1860 100644 --- a/include/asm-sparc64/mman.h +++ b/include/asm-sparc64/mman.h @@ -35,4 +35,12 @@ #define MADV_FREE 0x5 /* (Solaris) contents can be freed */ +#ifdef __KERNEL__ +#ifndef __ASSEMBLY__ +#define arch_mmap_check sparc64_mmap_check +int sparc64_mmap_check(unsigned long addr, unsigned long len, + unsigned long flags); +#endif +#endif + #endif /* __SPARC64_MMAN_H__ */ -- cgit v1.1 From 67bb2c692cc02e53c23e4debc92c3a79ddc52a8c Mon Sep 17 00:00:00 2001 From: Alexey Dobriyan Date: Fri, 8 Sep 2006 09:47:34 -0700 Subject: [PATCH] sh: fix FPN_START typo Not that it passes allmodconfig without it... Signed-off-by: Alexey Dobriyan Cc: Paul Mundt Cc: Kazumoto Kojima Cc: Mark Haverkamp Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/asm-sh/page.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/asm-sh/page.h b/include/asm-sh/page.h index a5559e3..5a057b0 100644 --- a/include/asm-sh/page.h +++ b/include/asm-sh/page.h @@ -104,7 +104,7 @@ typedef struct { unsigned long pgprot; } pgprot_t; /* PFN start number, because of __MEMORY_START */ #define PFN_START (__MEMORY_START >> PAGE_SHIFT) -#define ARCH_PFN_OFFSET (FPN_START) +#define ARCH_PFN_OFFSET (PFN_START) #define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT) #define pfn_valid(pfn) (((pfn) - PFN_START) < max_mapnr) #define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT) -- cgit v1.1 From 47d4b9066df023670a61e74565a75293cf15a441 Mon Sep 17 00:00:00 2001 From: David Wang Date: Fri, 8 Sep 2006 09:47:51 -0700 Subject: [PATCH] sis5513: add SiS south bridge ID 0x966 and 0x968 New SiS south bridge device ID is 0x966. Next coming product will be 0x968. (Will be released in Q4, this year) We don't make any updates to the IDE controller. Signed-off-by: David Wang Cc: Jeff Garzik Cc: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/pci_ids.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index c91164e..7a24915 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h @@ -648,6 +648,8 @@ #define PCI_DEVICE_ID_SI_962 0x0962 #define PCI_DEVICE_ID_SI_963 0x0963 #define PCI_DEVICE_ID_SI_965 0x0965 +#define PCI_DEVICE_ID_SI_966 0x0966 +#define PCI_DEVICE_ID_SI_968 0x0968 #define PCI_DEVICE_ID_SI_5511 0x5511 #define PCI_DEVICE_ID_SI_5513 0x5513 #define PCI_DEVICE_ID_SI_5517 0x5517 -- cgit v1.1 From e9f7bee1df223dcf83743b46cb06c08d95497ec0 Mon Sep 17 00:00:00 2001 From: Trond Myklebust Date: Fri, 8 Sep 2006 09:48:54 -0700 Subject: [PATCH] NFS: large non-page-aligned direct I/O clobbers memory The logic in nfs_direct_read_schedule and nfs_direct_write_schedule can allow data->npages to be one larger than rpages. This causes a page pointer to be written beyond the end of the pagevec in nfs_read_data (or nfs_write_data). Fix this by making nfs_(read|write)_alloc() calculate the size of the pagevec array, and initialise data->npages. Also get rid of the redundant argument to nfs_commit_alloc(). Signed-off-by: Trond Myklebust Cc: Chuck Lever Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/nfs_fs.h | 6 +++--- include/linux/nfs_xdr.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'include') diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index 2474345..530b1e6 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h @@ -427,7 +427,7 @@ extern int nfs_writeback_done(struct rpc_task *, struct nfs_write_data *); extern void nfs_writedata_release(void *); #if defined(CONFIG_NFS_V3) || defined(CONFIG_NFS_V4) -struct nfs_write_data *nfs_commit_alloc(unsigned int pagecount); +struct nfs_write_data *nfs_commit_alloc(void); void nfs_commit_free(struct nfs_write_data *p); #endif @@ -478,7 +478,7 @@ static inline int nfs_wb_page(struct inode *inode, struct page* page) /* * Allocate nfs_write_data structures */ -extern struct nfs_write_data *nfs_writedata_alloc(unsigned int pagecount); +extern struct nfs_write_data *nfs_writedata_alloc(size_t len); /* * linux/fs/nfs/read.c @@ -492,7 +492,7 @@ extern void nfs_readdata_release(void *data); /* * Allocate nfs_read_data structures */ -extern struct nfs_read_data *nfs_readdata_alloc(unsigned int pagecount); +extern struct nfs_read_data *nfs_readdata_alloc(size_t len); /* * linux/fs/nfs3proc.c diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h index db9cbf6..41e5a19 100644 --- a/include/linux/nfs_xdr.h +++ b/include/linux/nfs_xdr.h @@ -729,7 +729,7 @@ struct nfs_read_data { struct list_head pages; /* Coalesced read requests */ struct nfs_page *req; /* multi ops per nfs_page */ struct page **pagevec; - unsigned int npages; /* active pages in pagevec */ + unsigned int npages; /* Max length of pagevec */ struct nfs_readargs args; struct nfs_readres res; #ifdef CONFIG_NFS_V4 @@ -748,7 +748,7 @@ struct nfs_write_data { struct list_head pages; /* Coalesced requests we wish to flush */ struct nfs_page *req; /* multi ops per nfs_page */ struct page **pagevec; - unsigned int npages; /* active pages in pagevec */ + unsigned int npages; /* Max length of pagevec */ struct nfs_writeargs args; /* argument struct */ struct nfs_writeres res; /* result struct */ #ifdef CONFIG_NFS_V4 -- cgit v1.1 From 2636255488484e04d6d54303d2b0ec30f7ef7e02 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Mon, 4 Sep 2006 21:56:09 +0200 Subject: [IA64] Unwire set/get_robust_list The syscalls set/get_robust_list must not be wired up until futex_atomic_cmpxchg_inatomic is implemented. Otherwise the kernel will hang in handle_futex_death. Signed-off-by: Andreas Schwab Signed-off-by: Tony Luck --- include/asm-ia64/unistd.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'include') diff --git a/include/asm-ia64/unistd.h b/include/asm-ia64/unistd.h index bb0eb72..f581662 100644 --- a/include/asm-ia64/unistd.h +++ b/include/asm-ia64/unistd.h @@ -286,8 +286,7 @@ /* 1294, 1295 reserved for pselect/ppoll */ #define __NR_unshare 1296 #define __NR_splice 1297 -#define __NR_set_robust_list 1298 -#define __NR_get_robust_list 1299 +/* 1298, 1299 reserved for set_robust_list/get_robust_list */ #define __NR_sync_file_range 1300 #define __NR_tee 1301 #define __NR_vmsplice 1302 -- cgit v1.1 From 46c09e1673554d59674d222339f3ff303ad6715f Mon Sep 17 00:00:00 2001 From: Ben Dooks Date: Sat, 9 Sep 2006 19:44:52 +0100 Subject: [ARM] 3776/1: S3C24XX: remove changelogs from include/asm-arm/arch-s3c2410 Patch from Ben Dooks Remove changelog entries from include/asm-arm/arch-s3c2410 as these are irrelevant with version control Signed-off-by: Ben Dooks Signed-off-by: Russell King --- include/asm-arm/arch-s3c2410/debug-macro.S | 3 --- include/asm-arm/arch-s3c2410/fb.h | 7 ------- include/asm-arm/arch-s3c2410/hardware.h | 10 ---------- include/asm-arm/arch-s3c2410/idle.h | 4 ---- include/asm-arm/arch-s3c2410/iic.h | 4 ---- include/asm-arm/arch-s3c2410/irqs.h | 9 +-------- include/asm-arm/arch-s3c2410/map.h | 7 ------- include/asm-arm/arch-s3c2410/memory.h | 14 +------------- include/asm-arm/arch-s3c2410/nand.h | 3 --- 9 files changed, 2 insertions(+), 59 deletions(-) (limited to 'include') diff --git a/include/asm-arm/arch-s3c2410/debug-macro.S b/include/asm-arm/arch-s3c2410/debug-macro.S index b7d15d1..9306486 100644 --- a/include/asm-arm/arch-s3c2410/debug-macro.S +++ b/include/asm-arm/arch-s3c2410/debug-macro.S @@ -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 diff --git a/include/asm-arm/arch-s3c2410/fb.h b/include/asm-arm/arch-s3c2410/fb.h index 4790491..7116179 100644 --- a/include/asm-arm/arch-s3c2410/fb.h +++ b/include/asm-arm/arch-s3c2410/fb.h @@ -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 diff --git a/include/asm-arm/arch-s3c2410/hardware.h b/include/asm-arm/arch-s3c2410/hardware.h index a2330bf..871f8af 100644 --- a/include/asm-arm/arch-s3c2410/hardware.h +++ b/include/asm-arm/arch-s3c2410/hardware.h @@ -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 diff --git a/include/asm-arm/arch-s3c2410/idle.h b/include/asm-arm/arch-s3c2410/idle.h index 749227c..eed4506 100644 --- a/include/asm-arm/arch-s3c2410/idle.h +++ b/include/asm-arm/arch-s3c2410/idle.h @@ -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 diff --git a/include/asm-arm/arch-s3c2410/iic.h b/include/asm-arm/arch-s3c2410/iic.h index 518547f..ed3d6c7 100644 --- a/include/asm-arm/arch-s3c2410/iic.h +++ b/include/asm-arm/arch-s3c2410/iic.h @@ -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 diff --git a/include/asm-arm/arch-s3c2410/irqs.h b/include/asm-arm/arch-s3c2410/irqs.h index d9773d6..39a6982 100644 --- a/include/asm-arm/arch-s3c2410/irqs.h +++ b/include/asm-arm/arch-s3c2410/irqs.h @@ -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 diff --git a/include/asm-arm/arch-s3c2410/map.h b/include/asm-arm/arch-s3c2410/map.h index fae2766..27ba0ac 100644 --- a/include/asm-arm/arch-s3c2410/map.h +++ b/include/asm-arm/arch-s3c2410/map.h @@ -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 diff --git a/include/asm-arm/arch-s3c2410/memory.h b/include/asm-arm/arch-s3c2410/memory.h index 6ab834a..4be6a74 100644 --- a/include/asm-arm/arch-s3c2410/memory.h +++ b/include/asm-arm/arch-s3c2410/memory.h @@ -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 diff --git a/include/asm-arm/arch-s3c2410/nand.h b/include/asm-arm/arch-s3c2410/nand.h index 9148ac0..e350ae2 100644 --- a/include/asm-arm/arch-s3c2410/nand.h +++ b/include/asm-arm/arch-s3c2410/nand.h @@ -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 -- cgit v1.1 From 92e4805fbc76f2af0f4139f88265dc73f91af051 Mon Sep 17 00:00:00 2001 From: Ben Dooks Date: Sat, 9 Sep 2006 19:44:54 +0100 Subject: [ARM] 3777/1: S3C24XX: remove changelogs from include/asm-arm/arch-s3c2410 [regs-*.h] Patch from Ben Dooks Remove changelog entries from include/asm-arm/arch-s3c2410 for all regs-*.h as these are irrelevant with version control Signed-off-by: Ben Dooks Signed-off-by: Russell King --- include/asm-arm/arch-s3c2410/regs-adc.h | 3 --- include/asm-arm/arch-s3c2410/regs-clock.h | 12 ------------ include/asm-arm/arch-s3c2410/regs-gpio.h | 15 --------------- include/asm-arm/arch-s3c2410/regs-gpioj.h | 4 ---- include/asm-arm/arch-s3c2410/regs-iic.h | 4 ---- include/asm-arm/arch-s3c2410/regs-iis.h | 12 +----------- include/asm-arm/arch-s3c2410/regs-irq.h | 9 +-------- include/asm-arm/arch-s3c2410/regs-lcd.h | 8 -------- include/asm-arm/arch-s3c2410/regs-mem.h | 6 ------ include/asm-arm/arch-s3c2410/regs-nand.h | 4 ---- include/asm-arm/arch-s3c2410/regs-rtc.h | 5 ----- include/asm-arm/arch-s3c2410/regs-sdi.h | 5 ----- include/asm-arm/arch-s3c2410/regs-serial.h | 5 +---- include/asm-arm/arch-s3c2410/regs-spi.h | 8 +------- include/asm-arm/arch-s3c2410/regs-timer.h | 7 ------- include/asm-arm/arch-s3c2410/regs-udc.h | 8 +------- include/asm-arm/arch-s3c2410/regs-watchdog.h | 7 +------ 17 files changed, 6 insertions(+), 116 deletions(-) (limited to 'include') diff --git a/include/asm-arm/arch-s3c2410/regs-adc.h b/include/asm-arm/arch-s3c2410/regs-adc.h index 15bfc2f..c7b90b3 100644 --- a/include/asm-arm/arch-s3c2410/regs-adc.h +++ b/include/asm-arm/arch-s3c2410/regs-adc.h @@ -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 diff --git a/include/asm-arm/arch-s3c2410/regs-clock.h b/include/asm-arm/arch-s3c2410/regs-clock.h index a7c61fe..b2f4690 100644 --- a/include/asm-arm/arch-s3c2410/regs-clock.h +++ b/include/asm-arm/arch-s3c2410/regs-clock.h @@ -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 diff --git a/include/asm-arm/arch-s3c2410/regs-gpio.h b/include/asm-arm/arch-s3c2410/regs-gpio.h index 6dd17f0f..93c4943 100644 --- a/include/asm-arm/arch-s3c2410/regs-gpio.h +++ b/include/asm-arm/arch-s3c2410/regs-gpio.h @@ -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 */ diff --git a/include/asm-arm/arch-s3c2410/regs-gpioj.h b/include/asm-arm/arch-s3c2410/regs-gpioj.h index 18edae5..91cefa2 100644 --- a/include/asm-arm/arch-s3c2410/regs-gpioj.h +++ b/include/asm-arm/arch-s3c2410/regs-gpioj.h @@ -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) */ diff --git a/include/asm-arm/arch-s3c2410/regs-iic.h b/include/asm-arm/arch-s3c2410/regs-iic.h index fed3288..2ae2952 100644 --- a/include/asm-arm/arch-s3c2410/regs-iic.h +++ b/include/asm-arm/arch-s3c2410/regs-iic.h @@ -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 diff --git a/include/asm-arm/arch-s3c2410/regs-iis.h b/include/asm-arm/arch-s3c2410/regs-iis.h index 7fdde9b..72cd250 100644 --- a/include/asm-arm/arch-s3c2410/regs-iis.h +++ b/include/asm-arm/arch-s3c2410/regs-iis.h @@ -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 diff --git a/include/asm-arm/arch-s3c2410/regs-irq.h b/include/asm-arm/arch-s3c2410/regs-irq.h index 572fca5..29fb8ef 100644 --- a/include/asm-arm/arch-s3c2410/regs-irq.h +++ b/include/asm-arm/arch-s3c2410/regs-irq.h @@ -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 diff --git a/include/asm-arm/arch-s3c2410/regs-lcd.h b/include/asm-arm/arch-s3c2410/regs-lcd.h index b6b1b4e..b306d6e 100644 --- a/include/asm-arm/arch-s3c2410/regs-lcd.h +++ b/include/asm-arm/arch-s3c2410/regs-lcd.h @@ -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 */ diff --git a/include/asm-arm/arch-s3c2410/regs-mem.h b/include/asm-arm/arch-s3c2410/regs-mem.h index a2d7d0c..375dca5 100644 --- a/include/asm-arm/arch-s3c2410/regs-mem.h +++ b/include/asm-arm/arch-s3c2410/regs-mem.h @@ -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 diff --git a/include/asm-arm/arch-s3c2410/regs-nand.h b/include/asm-arm/arch-s3c2410/regs-nand.h index c1470c6..b824d37 100644 --- a/include/asm-arm/arch-s3c2410/regs-nand.h +++ b/include/asm-arm/arch-s3c2410/regs-nand.h @@ -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 diff --git a/include/asm-arm/arch-s3c2410/regs-rtc.h b/include/asm-arm/arch-s3c2410/regs-rtc.h index 0fbec07..cd88fd6 100644 --- a/include/asm-arm/arch-s3c2410/regs-rtc.h +++ b/include/asm-arm/arch-s3c2410/regs-rtc.h @@ -8,11 +8,6 @@ * 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 diff --git a/include/asm-arm/arch-s3c2410/regs-sdi.h b/include/asm-arm/arch-s3c2410/regs-sdi.h index ca9a26f..06e716e 100644 --- a/include/asm-arm/arch-s3c2410/regs-sdi.h +++ b/include/asm-arm/arch-s3c2410/regs-sdi.h @@ -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 diff --git a/include/asm-arm/arch-s3c2410/regs-serial.h b/include/asm-arm/arch-s3c2410/regs-serial.h index 93f651a..19c77da 100644 --- a/include/asm-arm/arch-s3c2410/regs-serial.h +++ b/include/asm-arm/arch-s3c2410/regs-serial.h @@ -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 diff --git a/include/asm-arm/arch-s3c2410/regs-spi.h b/include/asm-arm/arch-s3c2410/regs-spi.h index 3382178..3552280 100644 --- a/include/asm-arm/arch-s3c2410/regs-spi.h +++ b/include/asm-arm/arch-s3c2410/regs-spi.h @@ -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 diff --git a/include/asm-arm/arch-s3c2410/regs-timer.h b/include/asm-arm/arch-s3c2410/regs-timer.h index 169064e..731918e 100644 --- a/include/asm-arm/arch-s3c2410/regs-timer.h +++ b/include/asm-arm/arch-s3c2410/regs-timer.h @@ -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 */ diff --git a/include/asm-arm/arch-s3c2410/regs-udc.h b/include/asm-arm/arch-s3c2410/regs-udc.h index bf315b7..3aa31a2 100644 --- a/include/asm-arm/arch-s3c2410/regs-udc.h +++ b/include/asm-arm/arch-s3c2410/regs-udc.h @@ -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 diff --git a/include/asm-arm/arch-s3c2410/regs-watchdog.h b/include/asm-arm/arch-s3c2410/regs-watchdog.h index d199ca6..f4fff44 100644 --- a/include/asm-arm/arch-s3c2410/regs-watchdog.h +++ b/include/asm-arm/arch-s3c2410/regs-watchdog.h @@ -1,4 +1,4 @@ -/* linux/include/asm/arch-s3c2410/regs0watchdog.h +/* linux/include/asm/arch-s3c2410/regs-watchdog.h * * Copyright (c) 2003 Simtec Electronics * 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 */ -- cgit v1.1 From 3c06cd1c99449b2fd373df24fbc87e804f4ec4e6 Mon Sep 17 00:00:00 2001 From: Ben Dooks Date: Sat, 9 Sep 2006 19:44:57 +0100 Subject: [ARM] 3779/1: S3C24XX: remove changelogs from include/asm-arm/arch-s3c2410 [left] Patch from Ben Dooks Remove the last of the hangelogs from include/asm-arm/arch-s3c2410, as this information is available from the revision control system Signed-off-by: Ben Dooks Signed-off-by: Russell King --- include/asm-arm/arch-s3c2410/audio.h | 4 ---- include/asm-arm/arch-s3c2410/bast-irq.h | 6 +----- include/asm-arm/arch-s3c2410/io.h | 8 +------- include/asm-arm/arch-s3c2410/system.h | 9 +-------- include/asm-arm/arch-s3c2410/timex.h | 6 ------ include/asm-arm/arch-s3c2410/uncompress.h | 9 --------- include/asm-arm/arch-s3c2410/usb-control.h | 5 ----- include/asm-arm/arch-s3c2410/vmalloc.h | 6 +----- 8 files changed, 4 insertions(+), 49 deletions(-) (limited to 'include') diff --git a/include/asm-arm/arch-s3c2410/audio.h b/include/asm-arm/arch-s3c2410/audio.h index 0d276e6..7e02222 100644 --- a/include/asm-arm/arch-s3c2410/audio.h +++ b/include/asm-arm/arch-s3c2410/audio.h @@ -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 diff --git a/include/asm-arm/arch-s3c2410/bast-irq.h b/include/asm-arm/arch-s3c2410/bast-irq.h index b79b47f..15ffa66 100644 --- a/include/asm-arm/arch-s3c2410/bast-irq.h +++ b/include/asm-arm/arch-s3c2410/bast-irq.h @@ -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 diff --git a/include/asm-arm/arch-s3c2410/io.h b/include/asm-arm/arch-s3c2410/io.h index 16fbc8a..6b35a4f 100644 --- a/include/asm-arm/arch-s3c2410/io.h +++ b/include/asm-arm/arch-s3c2410/io.h @@ -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 diff --git a/include/asm-arm/arch-s3c2410/system.h b/include/asm-arm/arch-s3c2410/system.h index 9b0d850..718246d 100644 --- a/include/asm-arm/arch-s3c2410/system.h +++ b/include/asm-arm/arch-s3c2410/system.h @@ -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 #include diff --git a/include/asm-arm/arch-s3c2410/timex.h b/include/asm-arm/arch-s3c2410/timex.h index 3558a3a..703c337 100644 --- a/include/asm-arm/arch-s3c2410/timex.h +++ b/include/asm-arm/arch-s3c2410/timex.h @@ -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 diff --git a/include/asm-arm/arch-s3c2410/uncompress.h b/include/asm-arm/arch-s3c2410/uncompress.h index 8e152a0..81b3e91 100644 --- a/include/asm-arm/arch-s3c2410/uncompress.h +++ b/include/asm-arm/arch-s3c2410/uncompress.h @@ -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 diff --git a/include/asm-arm/arch-s3c2410/usb-control.h b/include/asm-arm/arch-s3c2410/usb-control.h index bd43b56..35723569 100644 --- a/include/asm-arm/arch-s3c2410/usb-control.h +++ b/include/asm-arm/arch-s3c2410/usb-control.h @@ -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 diff --git a/include/asm-arm/arch-s3c2410/vmalloc.h b/include/asm-arm/arch-s3c2410/vmalloc.h index 33963cd..0ae3bdb 100644 --- a/include/asm-arm/arch-s3c2410/vmalloc.h +++ b/include/asm-arm/arch-s3c2410/vmalloc.h @@ -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 -- cgit v1.1 From d17f901defef635292f90a969dadfdbd95b0f104 Mon Sep 17 00:00:00 2001 From: Ben Dooks Date: Sat, 9 Sep 2006 21:26:54 +0100 Subject: [ARM] 3778/1: S3C24XX: remove changelogs from include/asm-arm/arch-s3c2410 [simtec] Patch from Ben Dooks Remove changelog entries from include/asm-arm/arch-s3c2410 for all simtec .h files as these are irrelevant with version control. Signed-off-by: Ben Dooks Signed-off-by: Russell King --- include/asm-arm/arch-s3c2410/anubis-cpld.h | 3 --- include/asm-arm/arch-s3c2410/anubis-irq.h | 4 +--- include/asm-arm/arch-s3c2410/anubis-map.h | 2 -- include/asm-arm/arch-s3c2410/bast-cpld.h | 5 ----- include/asm-arm/arch-s3c2410/bast-map.h | 4 ---- include/asm-arm/arch-s3c2410/bast-pmu.h | 3 --- include/asm-arm/arch-s3c2410/osiris-map.h | 2 -- include/asm-arm/arch-s3c2410/vr1000-cpld.h | 4 ---- include/asm-arm/arch-s3c2410/vr1000-irq.h | 6 +----- include/asm-arm/arch-s3c2410/vr1000-map.h | 6 ------ 10 files changed, 2 insertions(+), 37 deletions(-) (limited to 'include') diff --git a/include/asm-arm/arch-s3c2410/anubis-cpld.h b/include/asm-arm/arch-s3c2410/anubis-cpld.h index 5675b17..40e8e27 100644 --- a/include/asm-arm/arch-s3c2410/anubis-cpld.h +++ b/include/asm-arm/arch-s3c2410/anubis-cpld.h @@ -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 diff --git a/include/asm-arm/arch-s3c2410/anubis-irq.h b/include/asm-arm/arch-s3c2410/anubis-irq.h index 82f15db..4b5f423 100644 --- a/include/asm-arm/arch-s3c2410/anubis-irq.h +++ b/include/asm-arm/arch-s3c2410/anubis-irq.h @@ -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 diff --git a/include/asm-arm/arch-s3c2410/anubis-map.h b/include/asm-arm/arch-s3c2410/anubis-map.h index d529ffd..058a210 100644 --- a/include/asm-arm/arch-s3c2410/anubis-map.h +++ b/include/asm-arm/arch-s3c2410/anubis-map.h @@ -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 */ diff --git a/include/asm-arm/arch-s3c2410/bast-cpld.h b/include/asm-arm/arch-s3c2410/bast-cpld.h index e28ca51..8969cff 100644 --- a/include/asm-arm/arch-s3c2410/bast-cpld.h +++ b/include/asm-arm/arch-s3c2410/bast-cpld.h @@ -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 diff --git a/include/asm-arm/arch-s3c2410/bast-map.h b/include/asm-arm/arch-s3c2410/bast-map.h index 29c07e3..727cef8 100644 --- a/include/asm-arm/arch-s3c2410/bast-map.h +++ b/include/asm-arm/arch-s3c2410/bast-map.h @@ -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 */ diff --git a/include/asm-arm/arch-s3c2410/bast-pmu.h b/include/asm-arm/arch-s3c2410/bast-pmu.h index 758c5c5..8283602 100644 --- a/include/asm-arm/arch-s3c2410/bast-pmu.h +++ b/include/asm-arm/arch-s3c2410/bast-pmu.h @@ -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 diff --git a/include/asm-arm/arch-s3c2410/osiris-map.h b/include/asm-arm/arch-s3c2410/osiris-map.h index 7c4b0cd..e2d4062 100644 --- a/include/asm-arm/arch-s3c2410/osiris-map.h +++ b/include/asm-arm/arch-s3c2410/osiris-map.h @@ -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 */ diff --git a/include/asm-arm/arch-s3c2410/vr1000-cpld.h b/include/asm-arm/arch-s3c2410/vr1000-cpld.h index 0ee373a..a341b1e 100644 --- a/include/asm-arm/arch-s3c2410/vr1000-cpld.h +++ b/include/asm-arm/arch-s3c2410/vr1000-cpld.h @@ -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 diff --git a/include/asm-arm/arch-s3c2410/vr1000-irq.h b/include/asm-arm/arch-s3c2410/vr1000-irq.h index 694f771..c39a0ff 100644 --- a/include/asm-arm/arch-s3c2410/vr1000-irq.h +++ b/include/asm-arm/arch-s3c2410/vr1000-irq.h @@ -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 diff --git a/include/asm-arm/arch-s3c2410/vr1000-map.h b/include/asm-arm/arch-s3c2410/vr1000-map.h index 867c935..1fe4db3 100644 --- a/include/asm-arm/arch-s3c2410/vr1000-map.h +++ b/include/asm-arm/arch-s3c2410/vr1000-map.h @@ -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 */ -- cgit v1.1 From 8a905162e038367503bac732bf1e3e01c19158b9 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Sun, 10 Sep 2006 12:01:19 -0300 Subject: V4L/DVB (4605): Fixes an issue with V4L1 and make headers-install V4L1 support should be disabled when no CONFIG_VIDEO_V4L1_COMPAT is defined, to allow checking for broken V4L2 ports. This is very important during the migration phase for V4L2 API. However, userspace apps should be capable of using both APIs, since they need to test at runtime, via VIDIOCGCAP ioctl, if V4L1 is supported. So, when __KERNEL__ is not defined, those ioctls and corresponding structs should be visible. This patch also removes the obsolete defines HAVE_V4L1 and HAVE_V4L2, that where causing some confusion, and were replaced by CONFIG_VIDEO_V4L1_COMPAT and CONFIG_VIDEO_V4L2. Signed-off-by: Mauro Carvalho Chehab --- include/linux/videodev.h | 3 +-- include/linux/videodev2.h | 2 -- include/media/v4l2-dev.h | 7 ++++--- 3 files changed, 5 insertions(+), 7 deletions(-) (limited to 'include') diff --git a/include/linux/videodev.h b/include/linux/videodev.h index 518c7a3..8dba97a 100644 --- a/include/linux/videodev.h +++ b/include/linux/videodev.h @@ -14,8 +14,7 @@ #include -#ifdef CONFIG_VIDEO_V4L1_COMPAT -#define HAVE_V4L1 1 +#if defined(CONFIG_VIDEO_V4L1_COMPAT) || !defined (__KERNEL__) struct video_capability { diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index b714695..e3715d7 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h @@ -22,8 +22,6 @@ #endif #include -#define HAVE_V4L2 1 - /* * Common stuff for both V4L1 and V4L2 * Moved from videodev.h diff --git a/include/media/v4l2-dev.h b/include/media/v4l2-dev.h index 600d61d..810462f 100644 --- a/include/media/v4l2-dev.h +++ b/include/media/v4l2-dev.h @@ -194,7 +194,7 @@ struct video_device int (*vidioc_overlay) (struct file *file, void *fh, unsigned int i); -#ifdef HAVE_V4L1 +#ifdef CONFIG_VIDEO_V4L1_COMPAT /* buffer type is struct vidio_mbuf * */ int (*vidiocgmbuf) (struct file *file, void *fh, struct video_mbuf *p); #endif @@ -335,7 +335,7 @@ extern int video_usercopy(struct inode *inode, struct file *file, unsigned int cmd, void *arg)); -#ifdef HAVE_V4L1 +#ifdef CONFIG_VIDEO_V4L1_COMPAT #include extern struct video_device* video_devdata(struct file*); @@ -357,6 +357,8 @@ video_device_remove_file(struct video_device *vfd, class_device_remove_file(&vfd->class_dev, attr); } +#endif /* CONFIG_VIDEO_V4L1_COMPAT */ + #ifdef OBSOLETE_OWNER /* to be removed soon */ /* helper functions to access driver private data. */ static inline void *video_get_drvdata(struct video_device *dev) @@ -372,6 +374,5 @@ static inline void video_set_drvdata(struct video_device *dev, void *data) extern int video_exclusive_open(struct inode *inode, struct file *file); extern int video_exclusive_release(struct inode *inode, struct file *file); -#endif /* HAVE_V4L1 */ #endif /* _V4L2_DEV_H */ -- cgit v1.1 From dc104fb3231f11e95b5a0f09ae3ab27a8fd5b2e8 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Thu, 31 Aug 2006 19:05:56 -0400 Subject: [PATCH] audit: more syscall classes added Signed-off-by: Al Viro --- include/asm-generic/audit_read.h | 8 ++++++++ include/asm-generic/audit_write.h | 11 +++++++++++ include/linux/audit.h | 4 ++++ 3 files changed, 23 insertions(+) create mode 100644 include/asm-generic/audit_read.h create mode 100644 include/asm-generic/audit_write.h (limited to 'include') diff --git a/include/asm-generic/audit_read.h b/include/asm-generic/audit_read.h new file mode 100644 index 0000000..0e87464 --- /dev/null +++ b/include/asm-generic/audit_read.h @@ -0,0 +1,8 @@ +__NR_readlink, +__NR_quotactl, +__NR_listxattr, +__NR_llistxattr, +__NR_flistxattr, +__NR_getxattr, +__NR_lgetxattr, +__NR_fgetxattr, diff --git a/include/asm-generic/audit_write.h b/include/asm-generic/audit_write.h new file mode 100644 index 0000000..f10d367 --- /dev/null +++ b/include/asm-generic/audit_write.h @@ -0,0 +1,11 @@ +#include +__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 diff --git a/include/linux/audit.h b/include/linux/audit.h index 64f9f9e..1077362 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h @@ -132,6 +132,10 @@ #define AUDIT_CLASS_DIR_WRITE_32 1 #define AUDIT_CLASS_CHATTR 2 #define AUDIT_CLASS_CHATTR_32 3 +#define AUDIT_CLASS_READ 4 +#define AUDIT_CLASS_READ_32 5 +#define AUDIT_CLASS_WRITE 6 +#define AUDIT_CLASS_WRITE_32 7 /* This bitmask is used to validate user input. It represents all bits that * are currently used in an audit field constant understood by the kernel. -- cgit v1.1 From 55669bfa141b488be865341ed12e188967d11308 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Thu, 31 Aug 2006 19:26:40 -0400 Subject: [PATCH] audit: AUDIT_PERM support add support for AUDIT_PERM predicate Signed-off-by: Al Viro --- include/linux/audit.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include') diff --git a/include/linux/audit.h b/include/linux/audit.h index 1077362..40a6c26 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h @@ -181,6 +181,7 @@ #define AUDIT_EXIT 103 #define AUDIT_SUCCESS 104 /* exit >= 0; value ignored */ #define AUDIT_WATCH 105 +#define AUDIT_PERM 106 #define AUDIT_ARG0 200 #define AUDIT_ARG1 (AUDIT_ARG0+1) @@ -256,6 +257,11 @@ #define AUDIT_ARCH_V850 (EM_V850|__AUDIT_ARCH_LE) #define AUDIT_ARCH_X86_64 (EM_X86_64|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) +#define AUDIT_PERM_EXEC 1 +#define AUDIT_PERM_WRITE 2 +#define AUDIT_PERM_READ 4 +#define AUDIT_PERM_ATTR 8 + struct audit_status { __u32 mask; /* Bit mask for valid entries */ __u32 enabled; /* 1 = enabled, 0 = disabled */ @@ -318,6 +324,7 @@ struct mqstat; #define AUDITSC_FAILURE 2 #define AUDITSC_RESULT(x) ( ((long)(x))<0?AUDITSC_FAILURE:AUDITSC_SUCCESS ) extern int __init audit_register_class(int class, unsigned *list); +extern int audit_classify_syscall(int abi, unsigned syscall); #ifdef CONFIG_AUDITSYSCALL /* These are defined in auditsc.c */ /* Public API */ -- cgit v1.1 From 21264136ce7c3c7032c42e7c2440f5d89039ca5a Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Tue, 12 Sep 2006 14:36:46 +0900 Subject: sh64: Trivial build fixes. While we've been sorting out the toolchain fiasco, some of the code has suffered a bit of bitrot. Building with GCC4 also brings up some more build warnings. Trivial fixes for both issues. Signed-off-by: Paul Mundt --- include/asm-sh64/byteorder.h | 4 ++-- include/asm-sh64/dma-mapping.h | 16 ++++++++++++---- include/asm-sh64/io.h | 7 +++++++ include/asm-sh64/ptrace.h | 2 +- include/asm-sh64/system.h | 2 +- include/asm-sh64/uaccess.h | 19 +++++++------------ 6 files changed, 30 insertions(+), 20 deletions(-) (limited to 'include') diff --git a/include/asm-sh64/byteorder.h b/include/asm-sh64/byteorder.h index f602ebe..7419d78 100644 --- a/include/asm-sh64/byteorder.h +++ b/include/asm-sh64/byteorder.h @@ -14,7 +14,7 @@ #include -static __inline__ __const__ __u32 ___arch__swab32(__u32 x) +static inline __attribute_const__ __u32 ___arch__swab32(__u32 x) { __asm__("byterev %0, %0\n\t" "shari %0, 32, %0" @@ -23,7 +23,7 @@ static __inline__ __const__ __u32 ___arch__swab32(__u32 x) return x; } -static __inline__ __const__ __u16 ___arch__swab16(__u16 x) +static inline __attribute_const__ __u16 ___arch__swab16(__u16 x) { __asm__("byterev %0, %0\n\t" "shari %0, 48, %0" diff --git a/include/asm-sh64/dma-mapping.h b/include/asm-sh64/dma-mapping.h index a74a49e..68e27a8 100644 --- a/include/asm-sh64/dma-mapping.h +++ b/include/asm-sh64/dma-mapping.h @@ -126,22 +126,30 @@ static inline void dma_sync_sg(struct device *dev, struct scatterlist *sg, static inline void dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma_handle, size_t size, enum dma_data_direction dir) - __attribute__ ((alias("dma_sync_single"))); +{ + dma_sync_single(dev, dma_handle, size, dir); +} static inline void dma_sync_single_for_device(struct device *dev, dma_addr_t dma_handle, size_t size, enum dma_data_direction dir) - __attribute__ ((alias("dma_sync_single"))); +{ + dma_sync_single(dev, dma_handle, size, dir); +} static inline void dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, int nelems, enum dma_data_direction dir) - __attribute__ ((alias("dma_sync_sg"))); +{ + dma_sync_sg(dev, sg, nelems, dir); +} static inline void dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nelems, enum dma_data_direction dir) - __attribute__ ((alias("dma_sync_sg"))); +{ + dma_sync_sg(dev, sg, nelems, dir); +} static inline int dma_get_cache_alignment(void) { diff --git a/include/asm-sh64/io.h b/include/asm-sh64/io.h index dee4f77..252fedb 100644 --- a/include/asm-sh64/io.h +++ b/include/asm-sh64/io.h @@ -123,6 +123,13 @@ void insw(unsigned long port, void *addr, unsigned long count); void outsl(unsigned long port, const void *addr, unsigned long count); void insl(unsigned long port, void *addr, unsigned long count); +#define __raw_readb readb +#define __raw_readw readw +#define __raw_readl readl +#define __raw_writeb writeb +#define __raw_writew writew +#define __raw_writel writel + void memcpy_toio(void __iomem *to, const void *from, long count); void memcpy_fromio(void *to, void __iomem *from, long count); diff --git a/include/asm-sh64/ptrace.h b/include/asm-sh64/ptrace.h index 56190f5..a6d4da5 100644 --- a/include/asm-sh64/ptrace.h +++ b/include/asm-sh64/ptrace.h @@ -28,7 +28,7 @@ struct pt_regs { #ifdef __KERNEL__ #define user_mode(regs) (((regs)->sr & 0x40000000)==0) #define instruction_pointer(regs) ((regs)->pc) -#define profile_pc(regs) instruction_pointer(regs) +#define profile_pc(regs) ((unsigned long)instruction_pointer(regs)) extern void show_regs(struct pt_regs *); #endif diff --git a/include/asm-sh64/system.h b/include/asm-sh64/system.h index 87ef6f1..b1598c2 100644 --- a/include/asm-sh64/system.h +++ b/include/asm-sh64/system.h @@ -64,7 +64,7 @@ extern void __xchg_called_with_bad_pointer(void); #define smp_read_barrier_depends() do { } while (0) #endif /* CONFIG_SMP */ -#define set_rmb(var, value) do { xchg(&var, value); } while (0) +#define set_rmb(var, value) do { (void)xchg(&var, value); } while (0) #define set_mb(var, value) set_rmb(var, value) /* Interrupt Control */ diff --git a/include/asm-sh64/uaccess.h b/include/asm-sh64/uaccess.h index f4936d8..644c67b 100644 --- a/include/asm-sh64/uaccess.h +++ b/include/asm-sh64/uaccess.h @@ -128,25 +128,20 @@ do { \ #define __get_user_nocheck(x,ptr,size) \ ({ \ - long __gu_addr = (long)(ptr); \ - long __gu_err; \ - __typeof(*(ptr)) __gu_val; \ - __asm__ ("":"=r" (__gu_val)); \ - __asm__ ("":"=r" (__gu_err)); \ - __get_user_size((void *)&__gu_val, __gu_addr, (size), __gu_err); \ - (x) = (__typeof__(*(ptr))) __gu_val; \ + long __gu_err, __gu_val; \ + __get_user_size((void *)&__gu_val, (long)(ptr), \ + (size), __gu_err); \ + (x) = (__typeof__(*(ptr)))__gu_val; \ __gu_err; \ }) #define __get_user_check(x,ptr,size) \ ({ \ long __gu_addr = (long)(ptr); \ - long __gu_err = -EFAULT; \ - __typeof(*(ptr)) __gu_val; \ - __asm__ ("":"=r" (__gu_val)); \ - __asm__ ("":"=r" (__gu_err)); \ + long __gu_err = -EFAULT, __gu_val; \ if (__access_ok(__gu_addr, (size))) \ - __get_user_size((void *)&__gu_val, __gu_addr, (size), __gu_err); \ + __get_user_size((void *)&__gu_val, __gu_addr, \ + (size), __gu_err); \ (x) = (__typeof__(*(ptr))) __gu_val; \ __gu_err; \ }) -- cgit v1.1 From 56060141482d0a9351ea02e2aa7153de8cd41423 Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Tue, 12 Sep 2006 14:38:23 +0900 Subject: sh64: Use generic BUG_ON()/WARN_ON(). sh64 doesn't need to do anything special for BUG_ON() or WARN_ON(), use the generic versions. Signed-off-by: Paul Mundt --- include/asm-sh64/bug.h | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'include') diff --git a/include/asm-sh64/bug.h b/include/asm-sh64/bug.h index 81f722e..f3a9c92 100644 --- a/include/asm-sh64/bug.h +++ b/include/asm-sh64/bug.h @@ -1,7 +1,7 @@ #ifndef __ASM_SH64_BUG_H #define __ASM_SH64_BUG_H - +#ifdef CONFIG_BUG /* * Tell the user there is some problem, then force a segfault (in process * context) or a panic (interrupt context). @@ -11,17 +11,9 @@ *(volatile int *)0 = 0; \ } while (0) -#define BUG_ON(condition) do { \ - if (unlikely((condition)!=0)) \ - BUG(); \ -} while(0) +#define HAVE_ARCH_BUG +#endif -#define WARN_ON(condition) do { \ - if (unlikely((condition)!=0)) { \ - printk("Badness in %s at %s:%d\n", __FUNCTION__, __FILE__, __LINE__); \ - dump_stack(); \ - } \ -} while (0) +#include #endif /* __ASM_SH64_BUG_H */ - -- cgit v1.1 From 69588298188b40ed7f75c98a6fd328d82f23ca21 Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Mon, 4 Sep 2006 21:53:14 -0700 Subject: [POWERPC] Implement PowerPC futex_atomic_cmpxchg_inatomic(). The sys_[gs]et_robust_list() syscalls were wired up on PowerPC but didn't work correctly because futex_atomic_cmpxchg_inatomic() wasn't implemented. Implement it, based on __cmpxchg_u32(). Signed-off-by: David Woodhouse Signed-off-by: Paul Mackerras --- include/asm-powerpc/futex.h | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/asm-powerpc/futex.h b/include/asm-powerpc/futex.h index f1b3c00..936422e 100644 --- a/include/asm-powerpc/futex.h +++ b/include/asm-powerpc/futex.h @@ -84,7 +84,33 @@ static inline int futex_atomic_op_inuser (int encoded_op, int __user *uaddr) static inline int futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval, int newval) { - return -ENOSYS; + int prev; + + if (!access_ok(VERIFY_WRITE, uaddr, sizeof(int))) + return -EFAULT; + + __asm__ __volatile__ ( + LWSYNC_ON_SMP +"1: lwarx %0,0,%2 # futex_atomic_cmpxchg_inatomic\n\ + cmpw 0,%0,%3\n\ + bne- 3f\n" + PPC405_ERR77(0,%2) +"2: stwcx. %4,0,%2\n\ + bne- 1b\n" + ISYNC_ON_SMP +"3: .section .fixup,\"ax\"\n\ +4: li %0,%5\n\ + b 3b\n\ + .previous\n\ + .section __ex_table,\"a\"\n\ + .align 3\n\ + " PPC_LONG "1b,4b,2b,4b\n\ + .previous" \ + : "=&r" (prev), "+m" (*uaddr) + : "r" (uaddr), "r" (oldval), "r" (newval), "i" (-EFAULT) + : "cc", "memory"); + + return prev; } #endif /* __KERNEL__ */ -- cgit v1.1 From e269d269e0b53a7a6cb1d04290f8174bf0488cb4 Mon Sep 17 00:00:00 2001 From: "Sachin P. Sant" Date: Fri, 8 Sep 2006 07:59:52 +0530 Subject: [POWERPC] kdump: Support kernels having 64k page size. This is required to generate proper core files using kdump on ppc64. Create a backup region of 64K size irrespective of the PAGE SIZE. At present 32K was used as backup size. In the case of 64K page size, second PT_LOAD segments starts at 32K and the first one is not page aligned. __ioremap() (crash_dump.c) fails if pfn = 0 which is the case for the second PT_LOAD segment. This is not an issue for 4K page size because the the first page (32K backup) is copied to second kernel memory and thus referencing with the second kernel pfn. Signed-off-by: Sachin Sant Signed-off-by: Paul Mackerras --- include/asm-powerpc/kdump.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/asm-powerpc/kdump.h b/include/asm-powerpc/kdump.h index dc1574c..10e8eb1 100644 --- a/include/asm-powerpc/kdump.h +++ b/include/asm-powerpc/kdump.h @@ -7,7 +7,7 @@ /* How many bytes to reserve at zero for kdump. The reserve limit should * be greater or equal to the trampoline's end address. * Reserve to the end of the FWNMI area, see head_64.S */ -#define KDUMP_RESERVE_LIMIT 0x8000 +#define KDUMP_RESERVE_LIMIT 0x10000 /* 64K */ #ifdef CONFIG_CRASH_DUMP -- cgit v1.1 From f007cacffc8870702a1473d83ba5e4922d54e17c Mon Sep 17 00:00:00 2001 From: Paul Mackerras Date: Wed, 13 Sep 2006 22:08:26 +1000 Subject: [POWERPC] Fix MMIO ops to provide expected barrier behaviour This changes the writeX family of functions to have a sync instruction before the MMIO store rather than after, because the generally expected behaviour is that the device receiving the MMIO store can be guaranteed to see the effects of any preceding writes to normal memory. To preserve ordering between writeX and readX, and to preserve ordering between preceding stores and the readX, the readX family of functions have had an sync added before the load. Although writeX followed by spin_unlock is not officially guaranteed to keep the writeX inside the spin-locked region unless an mmiowb() is used, there are currently drivers that depend on the previous behaviour on powerpc, which was that the mmiowb wasn't actually required. Therefore we have a per-cpu flag that is set by writeX, cleared by __raw_spin_lock and mmiowb, and tested by __raw_spin_unlock. If it is set, __raw_spin_unlock does a sync and clears it. This changes both 32-bit and 64-bit readX/writeX. 32-bit already has a sync in __raw_spin_unlock (since lwsync doesn't exist on 32-bit), and thus doesn't need the per-cpu flag. Tested on G5 (PPC970) and POWER5. Signed-off-by: Paul Mackerras --- include/asm-powerpc/eeh.h | 3 +++ include/asm-powerpc/io.h | 43 +++++++++++++++++++++++++++--------------- include/asm-powerpc/paca.h | 1 + include/asm-powerpc/spinlock.h | 17 +++++++++++++++++ include/asm-ppc/io.h | 20 +++++++++++--------- 5 files changed, 60 insertions(+), 24 deletions(-) (limited to 'include') diff --git a/include/asm-powerpc/eeh.h b/include/asm-powerpc/eeh.h index 4df3e80..6a78439 100644 --- a/include/asm-powerpc/eeh.h +++ b/include/asm-powerpc/eeh.h @@ -205,6 +205,7 @@ static inline void eeh_memset_io(volatile void __iomem *addr, int c, lc |= lc << 8; lc |= lc << 16; + __asm__ __volatile__ ("sync" : : : "memory"); while(n && !EEH_CHECK_ALIGN(p, 4)) { *((volatile u8 *)p) = c; p++; @@ -229,6 +230,7 @@ static inline void eeh_memcpy_fromio(void *dest, const volatile void __iomem *sr void *destsave = dest; unsigned long nsave = n; + __asm__ __volatile__ ("sync" : : : "memory"); while(n && (!EEH_CHECK_ALIGN(vsrc, 4) || !EEH_CHECK_ALIGN(dest, 4))) { *((u8 *)dest) = *((volatile u8 *)vsrc); __asm__ __volatile__ ("eieio" : : : "memory"); @@ -266,6 +268,7 @@ static inline void eeh_memcpy_toio(volatile void __iomem *dest, const void *src, { void *vdest = (void __force *) dest; + __asm__ __volatile__ ("sync" : : : "memory"); while(n && (!EEH_CHECK_ALIGN(vdest, 4) || !EEH_CHECK_ALIGN(src, 4))) { *((volatile u8 *)vdest) = *((u8 *)src); src++; diff --git a/include/asm-powerpc/io.h b/include/asm-powerpc/io.h index 36c4c34b..212428d 100644 --- a/include/asm-powerpc/io.h +++ b/include/asm-powerpc/io.h @@ -19,6 +19,7 @@ extern int check_legacy_ioport(unsigned long base_port); #include #include #include +#include #ifdef CONFIG_PPC_ISERIES #include #endif @@ -162,7 +163,11 @@ extern void _outsw_ns(volatile u16 __iomem *port, const void *buf, int ns); extern void _insl_ns(volatile u32 __iomem *port, void *buf, int nl); extern void _outsl_ns(volatile u32 __iomem *port, const void *buf, int nl); -#define mmiowb() +static inline void mmiowb(void) +{ + __asm__ __volatile__ ("sync" : : : "memory"); + get_paca()->io_sync = 0; +} /* * output pause versions need a delay at least for the @@ -278,22 +283,23 @@ static inline int in_8(const volatile unsigned char __iomem *addr) { int ret; - __asm__ __volatile__("lbz%U1%X1 %0,%1; twi 0,%0,0; isync" + __asm__ __volatile__("sync; lbz%U1%X1 %0,%1; twi 0,%0,0; isync" : "=r" (ret) : "m" (*addr)); return ret; } static inline void out_8(volatile unsigned char __iomem *addr, int val) { - __asm__ __volatile__("stb%U0%X0 %1,%0; sync" + __asm__ __volatile__("sync; stb%U0%X0 %1,%0" : "=m" (*addr) : "r" (val)); + get_paca()->io_sync = 1; } static inline int in_le16(const volatile unsigned short __iomem *addr) { int ret; - __asm__ __volatile__("lhbrx %0,0,%1; twi 0,%0,0; isync" + __asm__ __volatile__("sync; lhbrx %0,0,%1; twi 0,%0,0; isync" : "=r" (ret) : "r" (addr), "m" (*addr)); return ret; } @@ -302,28 +308,30 @@ static inline int in_be16(const volatile unsigned short __iomem *addr) { int ret; - __asm__ __volatile__("lhz%U1%X1 %0,%1; twi 0,%0,0; isync" + __asm__ __volatile__("sync; lhz%U1%X1 %0,%1; twi 0,%0,0; isync" : "=r" (ret) : "m" (*addr)); return ret; } static inline void out_le16(volatile unsigned short __iomem *addr, int val) { - __asm__ __volatile__("sthbrx %1,0,%2; sync" + __asm__ __volatile__("sync; sthbrx %1,0,%2" : "=m" (*addr) : "r" (val), "r" (addr)); + get_paca()->io_sync = 1; } static inline void out_be16(volatile unsigned short __iomem *addr, int val) { - __asm__ __volatile__("sth%U0%X0 %1,%0; sync" + __asm__ __volatile__("sync; sth%U0%X0 %1,%0" : "=m" (*addr) : "r" (val)); + get_paca()->io_sync = 1; } static inline unsigned in_le32(const volatile unsigned __iomem *addr) { unsigned ret; - __asm__ __volatile__("lwbrx %0,0,%1; twi 0,%0,0; isync" + __asm__ __volatile__("sync; lwbrx %0,0,%1; twi 0,%0,0; isync" : "=r" (ret) : "r" (addr), "m" (*addr)); return ret; } @@ -332,21 +340,23 @@ static inline unsigned in_be32(const volatile unsigned __iomem *addr) { unsigned ret; - __asm__ __volatile__("lwz%U1%X1 %0,%1; twi 0,%0,0; isync" + __asm__ __volatile__("sync; lwz%U1%X1 %0,%1; twi 0,%0,0; isync" : "=r" (ret) : "m" (*addr)); return ret; } static inline void out_le32(volatile unsigned __iomem *addr, int val) { - __asm__ __volatile__("stwbrx %1,0,%2; sync" : "=m" (*addr) + __asm__ __volatile__("sync; stwbrx %1,0,%2" : "=m" (*addr) : "r" (val), "r" (addr)); + get_paca()->io_sync = 1; } static inline void out_be32(volatile unsigned __iomem *addr, int val) { - __asm__ __volatile__("stw%U0%X0 %1,%0; sync" + __asm__ __volatile__("sync; stw%U0%X0 %1,%0" : "=m" (*addr) : "r" (val)); + get_paca()->io_sync = 1; } static inline unsigned long in_le64(const volatile unsigned long __iomem *addr) @@ -354,6 +364,7 @@ static inline unsigned long in_le64(const volatile unsigned long __iomem *addr) unsigned long tmp, ret; __asm__ __volatile__( + "sync\n" "ld %1,0(%2)\n" "twi 0,%1,0\n" "isync\n" @@ -372,7 +383,7 @@ static inline unsigned long in_be64(const volatile unsigned long __iomem *addr) { unsigned long ret; - __asm__ __volatile__("ld%U1%X1 %0,%1; twi 0,%0,0; isync" + __asm__ __volatile__("sync; ld%U1%X1 %0,%1; twi 0,%0,0; isync" : "=r" (ret) : "m" (*addr)); return ret; } @@ -389,14 +400,16 @@ static inline void out_le64(volatile unsigned long __iomem *addr, unsigned long "rldicl %1,%1,32,0\n" "rlwimi %0,%1,8,8,31\n" "rlwimi %0,%1,24,16,23\n" - "std %0,0(%3)\n" - "sync" + "sync\n" + "std %0,0(%3)" : "=&r" (tmp) , "=&r" (val) : "1" (val) , "b" (addr) , "m" (*addr)); + get_paca()->io_sync = 1; } static inline void out_be64(volatile unsigned long __iomem *addr, unsigned long val) { - __asm__ __volatile__("std%U0%X0 %1,%0; sync" : "=m" (*addr) : "r" (val)); + __asm__ __volatile__("sync; std%U0%X0 %1,%0" : "=m" (*addr) : "r" (val)); + get_paca()->io_sync = 1; } #ifndef CONFIG_PPC_ISERIES diff --git a/include/asm-powerpc/paca.h b/include/asm-powerpc/paca.h index 2d4585f..3d5d590 100644 --- a/include/asm-powerpc/paca.h +++ b/include/asm-powerpc/paca.h @@ -93,6 +93,7 @@ struct paca_struct { u64 saved_r1; /* r1 save for RTAS calls */ u64 saved_msr; /* MSR saved here by enter_rtas */ u8 proc_enabled; /* irq soft-enable flag */ + u8 io_sync; /* writel() needs spin_unlock sync */ /* Stuff for accurate time accounting */ u64 user_time; /* accumulated usermode TB ticks */ diff --git a/include/asm-powerpc/spinlock.h b/include/asm-powerpc/spinlock.h index 895cb6d..c31e438 100644 --- a/include/asm-powerpc/spinlock.h +++ b/include/asm-powerpc/spinlock.h @@ -36,6 +36,19 @@ #define LOCK_TOKEN 1 #endif +#if defined(CONFIG_PPC64) && defined(CONFIG_SMP) +#define CLEAR_IO_SYNC (get_paca()->io_sync = 0) +#define SYNC_IO do { \ + if (unlikely(get_paca()->io_sync)) { \ + mb(); \ + get_paca()->io_sync = 0; \ + } \ + } while (0) +#else +#define CLEAR_IO_SYNC +#define SYNC_IO +#endif + /* * This returns the old value in the lock, so we succeeded * in getting the lock if the return value is 0. @@ -61,6 +74,7 @@ static __inline__ unsigned long __spin_trylock(raw_spinlock_t *lock) static int __inline__ __raw_spin_trylock(raw_spinlock_t *lock) { + CLEAR_IO_SYNC; return __spin_trylock(lock) == 0; } @@ -91,6 +105,7 @@ extern void __rw_yield(raw_rwlock_t *lock); static void __inline__ __raw_spin_lock(raw_spinlock_t *lock) { + CLEAR_IO_SYNC; while (1) { if (likely(__spin_trylock(lock) == 0)) break; @@ -107,6 +122,7 @@ static void __inline__ __raw_spin_lock_flags(raw_spinlock_t *lock, unsigned long { unsigned long flags_dis; + CLEAR_IO_SYNC; while (1) { if (likely(__spin_trylock(lock) == 0)) break; @@ -124,6 +140,7 @@ static void __inline__ __raw_spin_lock_flags(raw_spinlock_t *lock, unsigned long static __inline__ void __raw_spin_unlock(raw_spinlock_t *lock) { + SYNC_IO; __asm__ __volatile__("# __raw_spin_unlock\n\t" LWSYNC_ON_SMP: : :"memory"); lock->slock = 0; diff --git a/include/asm-ppc/io.h b/include/asm-ppc/io.h index 89c6f1b..680555b 100644 --- a/include/asm-ppc/io.h +++ b/include/asm-ppc/io.h @@ -63,7 +63,7 @@ extern inline int in_8(const volatile unsigned char __iomem *addr) int ret; __asm__ __volatile__( - "lbz%U1%X1 %0,%1;\n" + "sync; lbz%U1%X1 %0,%1;\n" "twi 0,%0,0;\n" "isync" : "=r" (ret) : "m" (*addr)); return ret; @@ -78,7 +78,7 @@ extern inline int in_le16(const volatile unsigned short __iomem *addr) { int ret; - __asm__ __volatile__("lhbrx %0,0,%1;\n" + __asm__ __volatile__("sync; lhbrx %0,0,%1;\n" "twi 0,%0,0;\n" "isync" : "=r" (ret) : "r" (addr), "m" (*addr)); @@ -89,7 +89,7 @@ extern inline int in_be16(const volatile unsigned short __iomem *addr) { int ret; - __asm__ __volatile__("lhz%U1%X1 %0,%1;\n" + __asm__ __volatile__("sync; lhz%U1%X1 %0,%1;\n" "twi 0,%0,0;\n" "isync" : "=r" (ret) : "m" (*addr)); return ret; @@ -97,20 +97,20 @@ extern inline int in_be16(const volatile unsigned short __iomem *addr) extern inline void out_le16(volatile unsigned short __iomem *addr, int val) { - __asm__ __volatile__("sthbrx %1,0,%2; eieio" : "=m" (*addr) : + __asm__ __volatile__("sync; sthbrx %1,0,%2" : "=m" (*addr) : "r" (val), "r" (addr)); } extern inline void out_be16(volatile unsigned short __iomem *addr, int val) { - __asm__ __volatile__("sth%U0%X0 %1,%0; eieio" : "=m" (*addr) : "r" (val)); + __asm__ __volatile__("sync; sth%U0%X0 %1,%0" : "=m" (*addr) : "r" (val)); } extern inline unsigned in_le32(const volatile unsigned __iomem *addr) { unsigned ret; - __asm__ __volatile__("lwbrx %0,0,%1;\n" + __asm__ __volatile__("sync; lwbrx %0,0,%1;\n" "twi 0,%0,0;\n" "isync" : "=r" (ret) : "r" (addr), "m" (*addr)); @@ -121,7 +121,7 @@ extern inline unsigned in_be32(const volatile unsigned __iomem *addr) { unsigned ret; - __asm__ __volatile__("lwz%U1%X1 %0,%1;\n" + __asm__ __volatile__("sync; lwz%U1%X1 %0,%1;\n" "twi 0,%0,0;\n" "isync" : "=r" (ret) : "m" (*addr)); return ret; @@ -129,13 +129,13 @@ extern inline unsigned in_be32(const volatile unsigned __iomem *addr) extern inline void out_le32(volatile unsigned __iomem *addr, int val) { - __asm__ __volatile__("stwbrx %1,0,%2; eieio" : "=m" (*addr) : + __asm__ __volatile__("sync; stwbrx %1,0,%2" : "=m" (*addr) : "r" (val), "r" (addr)); } extern inline void out_be32(volatile unsigned __iomem *addr, int val) { - __asm__ __volatile__("stw%U0%X0 %1,%0; eieio" : "=m" (*addr) : "r" (val)); + __asm__ __volatile__("sync; stw%U0%X0 %1,%0" : "=m" (*addr) : "r" (val)); } #if defined (CONFIG_8260_PCI9) #define readb(addr) in_8((volatile u8 *)(addr)) @@ -259,6 +259,7 @@ extern __inline__ unsigned int name(unsigned int port) \ { \ unsigned int x; \ __asm__ __volatile__( \ + "sync\n" \ "0:" op " %0,0,%1\n" \ "1: twi 0,%0,0\n" \ "2: isync\n" \ @@ -284,6 +285,7 @@ extern __inline__ unsigned int name(unsigned int port) \ extern __inline__ void name(unsigned int val, unsigned int port) \ { \ __asm__ __volatile__( \ + "sync\n" \ "0:" op " %0,0,%1\n" \ "1: sync\n" \ "2:\n" \ -- cgit v1.1 From 7f1cbe51ffc1273bcded36742ede4b6ebef1b640 Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Tue, 12 Sep 2006 20:36:02 -0700 Subject: [PATCH] headers_check: reduce user-visible noise in We don't need any of this crap included from the user-visible part of nfs_fs.h -- remove it all. In fact, we probably don't need anything but NFS_SUPER_MAGIC to be defined; is there any need for anything else? And magic numbers should probably move to rather than being strewn across various fs-specific include files which exist in userspace for solely that purpose. With this patch, 'make header_check' works again at least on PowerPC. Signed-off-by: David Woodhouse Cc: Trond Myklebust Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/nfs_fs.h | 52 +++++++++++++++++++++++++------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) (limited to 'include') diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index 530b1e6..6c2066c 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h @@ -9,27 +9,6 @@ #ifndef _LINUX_NFS_FS_H #define _LINUX_NFS_FS_H -#include -#include -#include -#include -#include - -#include -#include -#include - -#include -#include -#include -#include -#include - -#include - -#include -#include - /* * Enable debugging support for nfs client. * Requires RPC_DEBUG. @@ -48,11 +27,6 @@ #define NFS_SUPER_MAGIC 0x6969 /* - * These are the default flags for swap requests - */ -#define NFS_RPC_SWAPFLAGS (RPC_TASK_SWAPPER|RPC_TASK_ROOTCREDS) - -/* * When flushing a cluster of dirty pages, there can be different * strategies: */ @@ -65,6 +39,32 @@ #ifdef __KERNEL__ +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include +#include +#include + +#include + +#include +#include + +/* + * These are the default flags for swap requests + */ +#define NFS_RPC_SWAPFLAGS (RPC_TASK_SWAPPER|RPC_TASK_ROOTCREDS) + /* * NFSv3/v4 Access mode cache entry */ -- cgit v1.1 From ee6baf884b27739cca110e5167a2edfa061ca19f Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Tue, 12 Sep 2006 20:36:03 -0700 Subject: [PATCH] headers_check: remove from user export There's useful stuff in but has nothing for userspace. Stop exporting it, and include it only from within the existing #ifdef __KERNEL__ part of This fixes a 'make headers_check' failure on i386 because asm-i386/timex.h includes both asm-i386/tsc.h and asm-i386/processor.h, neither of which are exported to userspace. It's not entirely clear _why_ it includes either of these, but it does. Signed-off-by: David Woodhouse Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/asm-generic/Kbuild.asm | 2 +- include/linux/timex.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/asm-generic/Kbuild.asm b/include/asm-generic/Kbuild.asm index 6b16dda..c00de60 100644 --- a/include/asm-generic/Kbuild.asm +++ b/include/asm-generic/Kbuild.asm @@ -2,7 +2,7 @@ unifdef-y += a.out.h auxvec.h byteorder.h errno.h fcntl.h ioctl.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 + statfs.h termbits.h termios.h types.h unistd.h user.h # These probably shouldn't be exported unifdef-y += elf.h page.h diff --git a/include/linux/timex.h b/include/linux/timex.h index 19bb653..d543d38 100644 --- a/include/linux/timex.h +++ b/include/linux/timex.h @@ -57,7 +57,6 @@ #include #include -#include /* * SHIFT_KG and SHIFT_KF establish the damping of the PLL and are chosen @@ -191,6 +190,8 @@ struct timex { #define TIME_BAD TIME_ERROR /* bw compat */ #ifdef __KERNEL__ +#include + /* * kernel variables * Note: maximum error = NTP synch distance = dispersion + delay / 2; -- cgit v1.1 From b40c274a03f70d1f758753c56452bed506e47a09 Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Tue, 12 Sep 2006 20:36:04 -0700 Subject: [PATCH] headers_check: move inclusion of in Because doesn't exist in userspace, it should be only included from within #ifdef __KERNEL__. Move the corresponding #include Signed-off-by: David Woodhouse Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/asm-i386/signal.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/asm-i386/signal.h b/include/asm-i386/signal.h index 3824a50..c3e8ade 100644 --- a/include/asm-i386/signal.h +++ b/include/asm-i386/signal.h @@ -2,7 +2,6 @@ #define _ASMi386_SIGNAL_H #include -#include #include #include @@ -10,6 +9,9 @@ struct siginfo; #ifdef __KERNEL__ + +#include + /* Most things should be clean enough to redefine this at will, if care is taken to make libc match. */ -- cgit v1.1 From 651c923a4446dc5aee385d81c2436d6edf8c9a0c Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Tue, 12 Sep 2006 20:36:04 -0700 Subject: [PATCH] headers_check: move kernel-only #includes within Some files which don't exist in userspace were being included unconditionally in asm-i386/elf.h. Move the offending #includes down a few lines so that they're protected by #ifdef __KERNEL__ In fact, we probably want to kill off all userspace use of asm/elf.h -- but we aren't there yet, so we should at least make it possible to include it for now. Signed-off-by: David Woodhouse Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/asm-i386/elf.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'include') diff --git a/include/asm-i386/elf.h b/include/asm-i386/elf.h index 1eac92c..db4344d 100644 --- a/include/asm-i386/elf.h +++ b/include/asm-i386/elf.h @@ -7,10 +7,7 @@ #include #include -#include -#include /* for savesegment */ #include -#include #include @@ -48,6 +45,12 @@ typedef struct user_fxsr_struct elf_fpxregset_t; #define ELF_DATA ELFDATA2LSB #define ELF_ARCH EM_386 +#ifdef __KERNEL__ + +#include +#include /* for savesegment */ +#include + /* 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) /* -- cgit v1.1 From f01f0f052d1255dcdcf11d4872c4bca95e46b36c Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Tue, 12 Sep 2006 20:36:05 -0700 Subject: [PATCH] headers_check: don't expose PFN stuff to userspace in The header file doesn't exist in userspace and probably shouldn't -- but it's used unconditionally in . Protect it with #ifdef __KERNEL__ and move setup.h from $(header-y) to $(unifdef-y) in Kbuild accordingly. Signed-off-by: David Woodhouse Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/asm-i386/Kbuild | 4 ++-- include/asm-i386/setup.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/asm-i386/Kbuild b/include/asm-i386/Kbuild index 335b2fa..2308190 100644 --- a/include/asm-i386/Kbuild +++ b/include/asm-i386/Kbuild @@ -1,5 +1,5 @@ include include/asm-generic/Kbuild.asm -header-y += boot.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 diff --git a/include/asm-i386/setup.h b/include/asm-i386/setup.h index f737e42..2734909 100644 --- a/include/asm-i386/setup.h +++ b/include/asm-i386/setup.h @@ -6,6 +6,7 @@ #ifndef _i386_SETUP_H #define _i386_SETUP_H +#ifdef __KERNEL__ #include /* @@ -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 -- cgit v1.1 From a2aa3e2304e21e2b8bf52b69ac9f1e0cb0320909 Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Tue, 12 Sep 2006 20:36:06 -0700 Subject: [PATCH] headers_check: fix userspace build of asm-mips/page.h MIPS asm/page.h unconditionally includes , which doesn't exist in userspace. Move an #endif /* __KERNEL__ */ down a few lines to prevent that. Also, remove the broken definition of PAGE_SIZE which is never going to be correct -- in the absence of PAGE_SIZE, non-broken userspace will fall back to using sysconf() or getpagesize() instead. Signed-off-by: David Woodhouse Cc: Ralf Baechle Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/asm-mips/page.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'include') diff --git a/include/asm-mips/page.h b/include/asm-mips/page.h index 6ed1151..219d359 100644 --- a/include/asm-mips/page.h +++ b/include/asm-mips/page.h @@ -14,8 +14,6 @@ #include -#endif - /* * PAGE_SHIFT determines the page size */ @@ -34,8 +32,6 @@ #define PAGE_SIZE (1UL << PAGE_SHIFT) #define PAGE_MASK (~((1 << PAGE_SHIFT) - 1)) - -#ifdef __KERNEL__ #ifndef __ASSEMBLY__ extern void clear_page(void * page); @@ -168,8 +164,6 @@ typedef struct { unsigned long pgprot; } pgprot_t; #define UNCAC_ADDR(addr) ((addr) - PAGE_OFFSET + UNCAC_BASE) #define CAC_ADDR(addr) ((addr) - UNCAC_BASE + PAGE_OFFSET) -#endif /* defined (__KERNEL__) */ - #ifdef CONFIG_LIMITED_DMA #define WANT_PAGE_VIRTUAL #endif @@ -177,4 +171,6 @@ typedef struct { unsigned long pgprot; } pgprot_t; #include #include +#endif /* defined (__KERNEL__) */ + #endif /* _ASM_PAGE_H */ -- cgit v1.1