diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-um/bug.h | 2 | ||||
-rw-r--r-- | include/asm-um/common.lds.S | 2 | ||||
-rw-r--r-- | include/asm-um/paravirt.h | 6 | ||||
-rw-r--r-- | include/linux/fs.h | 27 | ||||
-rw-r--r-- | include/linux/slab.h | 4 | ||||
-rw-r--r-- | include/linux/sm501-regs.h | 8 |
6 files changed, 46 insertions, 3 deletions
diff --git a/include/asm-um/bug.h b/include/asm-um/bug.h index 3357c5e2468..9e33b864c35 100644 --- a/include/asm-um/bug.h +++ b/include/asm-um/bug.h @@ -1,6 +1,6 @@ #ifndef __UM_BUG_H #define __UM_BUG_H -#include <asm/arch/bug.h> +#include <asm-generic/bug.h> #endif diff --git a/include/asm-um/common.lds.S b/include/asm-um/common.lds.S index f5de80c31e8..e3f010bd12b 100644 --- a/include/asm-um/common.lds.S +++ b/include/asm-um/common.lds.S @@ -20,6 +20,8 @@ __ex_table : { *(__ex_table) } __stop___ex_table = .; + BUG_TABLE + __uml_setup_start = .; .uml.setup.init : { *(.uml.setup.init) } __uml_setup_end = .; diff --git a/include/asm-um/paravirt.h b/include/asm-um/paravirt.h new file mode 100644 index 00000000000..9d6aaad80b5 --- /dev/null +++ b/include/asm-um/paravirt.h @@ -0,0 +1,6 @@ +#ifndef __UM_PARAVIRT_H +#define __UM_PARAVIRT_H + +#include "asm/arch/paravirt.h" + +#endif diff --git a/include/linux/fs.h b/include/linux/fs.h index b3ae77cccbb..6a41f4cab14 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -1211,6 +1211,14 @@ static inline void mark_inode_dirty_sync(struct inode *inode) __mark_inode_dirty(inode, I_DIRTY_SYNC); } +/** + * inc_nlink - directly increment an inode's link count + * @inode: inode + * + * This is a low-level filesystem helper to replace any + * direct filesystem manipulation of i_nlink. Currently, + * it is only here for parity with dec_nlink(). + */ static inline void inc_nlink(struct inode *inode) { inode->i_nlink++; @@ -1222,11 +1230,30 @@ static inline void inode_inc_link_count(struct inode *inode) mark_inode_dirty(inode); } +/** + * drop_nlink - directly drop an inode's link count + * @inode: inode + * + * This is a low-level filesystem helper to replace any + * direct filesystem manipulation of i_nlink. In cases + * where we are attempting to track writes to the + * filesystem, a decrement to zero means an imminent + * write when the file is truncated and actually unlinked + * on the filesystem. + */ static inline void drop_nlink(struct inode *inode) { inode->i_nlink--; } +/** + * clear_nlink - directly zero an inode's link count + * @inode: inode + * + * This is a low-level filesystem helper to replace any + * direct filesystem manipulation of i_nlink. See + * drop_nlink() for why we care about i_nlink hitting zero. + */ static inline void clear_nlink(struct inode *inode) { inode->i_nlink = 0; diff --git a/include/linux/slab.h b/include/linux/slab.h index a015236cc57..cebcd3833c7 100644 --- a/include/linux/slab.h +++ b/include/linux/slab.h @@ -82,8 +82,8 @@ static inline void *kmem_cache_alloc_node(struct kmem_cache *cachep, * to do various tricks to work around compiler limitations in order to * ensure proper constant folding. */ -#define KMALLOC_SHIFT_HIGH ((MAX_ORDER + PAGE_SHIFT) <= 25 ? \ - (MAX_ORDER + PAGE_SHIFT) : 25) +#define KMALLOC_SHIFT_HIGH ((MAX_ORDER + PAGE_SHIFT - 1) <= 25 ? \ + (MAX_ORDER + PAGE_SHIFT - 1) : 25) #define KMALLOC_MAX_SIZE (1UL << KMALLOC_SHIFT_HIGH) #define KMALLOC_MAX_ORDER (KMALLOC_SHIFT_HIGH - PAGE_SHIFT) diff --git a/include/linux/sm501-regs.h b/include/linux/sm501-regs.h index cc9be4a1186..014e73b31fc 100644 --- a/include/linux/sm501-regs.h +++ b/include/linux/sm501-regs.h @@ -64,6 +64,11 @@ #define SM501_DEBUG_CONTROL (0x000034) /* power management */ +#define SM501_POWERMODE_P2X_SRC (1<<29) +#define SM501_POWERMODE_V2X_SRC (1<<20) +#define SM501_POWERMODE_M_SRC (1<<12) +#define SM501_POWERMODE_M1_SRC (1<<4) + #define SM501_CURRENT_GATE (0x000038) #define SM501_CURRENT_CLOCK (0x00003C) #define SM501_POWER_MODE_0_GATE (0x000040) @@ -104,6 +109,9 @@ #define SM501_DEVICEID (0x000060) /* 0x050100A0 */ +#define SM501_DEVICEID_SM501 (0x05010000) +#define SM501_DEVICEID_IDMASK (0xffff0000) + #define SM501_PLLCLOCK_COUNT (0x000064) #define SM501_MISC_TIMING (0x000068) #define SM501_CURRENT_SDRAM_CLOCK (0x00006C) |