fix compilation after merge

This commit is contained in:
Stricted
2018-03-21 23:40:26 +01:00
parent bdecc6d184
commit 9afc0d8b26
6 changed files with 20 additions and 53 deletions
+17 -16
View File
@@ -98,19 +98,23 @@
#define TASK_UNMAPPED_BASE UL(0x00000000) #define TASK_UNMAPPED_BASE UL(0x00000000)
#endif #endif
#ifndef PHYS_OFFSET
#define PHYS_OFFSET UL(CONFIG_DRAM_BASE)
#endif
#ifndef END_MEM #ifndef END_MEM
#define END_MEM (UL(CONFIG_DRAM_BASE) + CONFIG_DRAM_SIZE) #define END_MEM (UL(CONFIG_DRAM_BASE) + CONFIG_DRAM_SIZE)
#endif #endif
#ifndef PAGE_OFFSET #ifndef PAGE_OFFSET
#define PAGE_OFFSET PLAT_PHYS_OFFSET #define PAGE_OFFSET (PHYS_OFFSET)
#endif #endif
/* /*
* The module can be at any place in ram in nommu mode. * The module can be at any place in ram in nommu mode.
*/ */
#define MODULES_END (END_MEM) #define MODULES_END (END_MEM)
#define MODULES_VADDR PAGE_OFFSET #define MODULES_VADDR (PHYS_OFFSET)
#define XIP_VIRT_ADDR(physaddr) (physaddr) #define XIP_VIRT_ADDR(physaddr) (physaddr)
@@ -137,16 +141,6 @@
#define page_to_phys(page) (__pfn_to_phys(page_to_pfn(page))) #define page_to_phys(page) (__pfn_to_phys(page_to_pfn(page)))
#define phys_to_page(phys) (pfn_to_page(__phys_to_pfn(phys))) #define phys_to_page(phys) (pfn_to_page(__phys_to_pfn(phys)))
/*
* PLAT_PHYS_OFFSET is the offset (from zero) of the start of physical
* memory. This is used for XIP and NoMMU kernels, or by kernels which
* have their own mach/memory.h. Assembly code must always use
* PLAT_PHYS_OFFSET and not PHYS_OFFSET.
*/
#ifndef PLAT_PHYS_OFFSET
#define PLAT_PHYS_OFFSET UL(CONFIG_PHYS_OFFSET)
#endif
#ifndef __ASSEMBLY__ #ifndef __ASSEMBLY__
/* /*
@@ -189,15 +183,22 @@ static inline unsigned long __phys_to_virt(unsigned long x)
return t; return t;
} }
#else #else
#define PHYS_OFFSET PLAT_PHYS_OFFSET
#define __virt_to_phys(x) ((x) - PAGE_OFFSET + PHYS_OFFSET) #define __virt_to_phys(x) ((x) - PAGE_OFFSET + PHYS_OFFSET)
#define __phys_to_virt(x) ((x) - PHYS_OFFSET + PAGE_OFFSET) #define __phys_to_virt(x) ((x) - PHYS_OFFSET + PAGE_OFFSET)
#endif
#endif
#endif /* __ASSEMBLY__ */
#ifndef PHYS_OFFSET
#ifdef PLAT_PHYS_OFFSET
#define PHYS_OFFSET PLAT_PHYS_OFFSET
#else
#define PHYS_OFFSET UL(CONFIG_PHYS_OFFSET)
#endif #endif
#endif #endif
#ifndef __ASSEMBLY__
/* /*
* PFNs are used to describe any physical page; this means * PFNs are used to describe any physical page; this means
* PFN 0 == physical address 0. * PFN 0 == physical address 0.
@@ -281,4 +282,4 @@ static inline __deprecated void *bus_to_virt(unsigned long x)
#include <asm-generic/memory_model.h> #include <asm-generic/memory_model.h>
#endif #endif
-2
View File
@@ -233,8 +233,6 @@ static int blkcipher_walk_next(struct blkcipher_desc *desc,
return blkcipher_walk_done(desc, walk, -EINVAL); return blkcipher_walk_done(desc, walk, -EINVAL);
} }
bsize = min(walk->blocksize, n);
walk->flags &= ~(BLKCIPHER_WALK_SLOW | BLKCIPHER_WALK_COPY | walk->flags &= ~(BLKCIPHER_WALK_SLOW | BLKCIPHER_WALK_COPY |
BLKCIPHER_WALK_DIFF); BLKCIPHER_WALK_DIFF);
if (!scatterwalk_aligned(&walk->in, walk->alignmask) || if (!scatterwalk_aligned(&walk->in, walk->alignmask) ||
-3
View File
@@ -1305,9 +1305,6 @@ static void bprm_fill_uid(struct linux_binprm *bprm)
if (bprm->file->f_path.mnt->mnt_flags & MNT_NOSUID) if (bprm->file->f_path.mnt->mnt_flags & MNT_NOSUID)
return; return;
if (current->no_new_privs)
return;
inode = file_inode(bprm->file); inode = file_inode(bprm->file);
mode = ACCESS_ONCE(inode->i_mode); mode = ACCESS_ONCE(inode->i_mode);
if (!(mode & (S_ISUID|S_ISGID))) if (!(mode & (S_ISUID|S_ISGID)))
-31
View File
@@ -438,37 +438,6 @@ posix_acl_create(struct posix_acl **acl, gfp_t gfp, umode_t *mode_p)
} }
EXPORT_SYMBOL(posix_acl_create); EXPORT_SYMBOL(posix_acl_create);
/**
* posix_acl_update_mode - update mode in set_acl
*
* Update the file mode when setting an ACL: compute the new file permission
* bits based on the ACL. In addition, if the ACL is equivalent to the new
* file mode, set *acl to NULL to indicate that no ACL should be set.
*
* As with chmod, clear the setgit bit if the caller is not in the owning group
* or capable of CAP_FSETID (see inode_change_ok).
*
* Called from set_acl inode operations.
*/
int posix_acl_update_mode(struct inode *inode, umode_t *mode_p,
struct posix_acl **acl)
{
umode_t mode = inode->i_mode;
int error;
error = posix_acl_equiv_mode(*acl, &mode);
if (error < 0)
return error;
if (error == 0)
*acl = NULL;
if (!in_group_p(inode->i_gid) &&
!capable_wrt_inode_uidgid(inode, CAP_FSETID))
mode &= ~S_ISGID;
*mode_p = mode;
return 0;
}
EXPORT_SYMBOL(posix_acl_update_mode);
int int
posix_acl_chmod(struct posix_acl **acl, gfp_t gfp, umode_t mode) posix_acl_chmod(struct posix_acl **acl, gfp_t gfp, umode_t mode)
{ {
+2
View File
@@ -190,12 +190,14 @@ struct pm_sleep_state {
/* kernel/power/suspend.c */ /* kernel/power/suspend.c */
extern struct pm_sleep_state pm_states[]; extern struct pm_sleep_state pm_states[];
extern bool valid_state(suspend_state_t state);
extern int suspend_devices_and_enter(suspend_state_t state); extern int suspend_devices_and_enter(suspend_state_t state);
#else /* !CONFIG_SUSPEND */ #else /* !CONFIG_SUSPEND */
static inline int suspend_devices_and_enter(suspend_state_t state) static inline int suspend_devices_and_enter(suspend_state_t state)
{ {
return -ENOSYS; return -ENOSYS;
} }
static inline bool valid_state(suspend_state_t state) { return false; }
#endif /* !CONFIG_SUSPEND */ #endif /* !CONFIG_SUSPEND */
#ifdef CONFIG_PM_TEST_SUSPEND #ifdef CONFIG_PM_TEST_SUSPEND
+1 -1
View File
@@ -66,7 +66,7 @@ void freeze_wake(void)
} }
EXPORT_SYMBOL_GPL(freeze_wake); EXPORT_SYMBOL_GPL(freeze_wake);
static bool valid_state(suspend_state_t state) bool valid_state(suspend_state_t state)
{ {
/* /*
* PM_SUSPEND_STANDBY and PM_SUSPEND_MEM states need low level * PM_SUSPEND_STANDBY and PM_SUSPEND_MEM states need low level