mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
Merge branch 'kbuild/rc-fixes' into kbuild/kconfig
We need to revert the temporary hack in 71ebc01, hence the merge.
This commit is contained in:
commit
239060b93b
8483 changed files with 523357 additions and 574807 deletions
|
|
@ -53,10 +53,6 @@ config GENERIC_BUG
|
|||
default y
|
||||
depends on BUG
|
||||
|
||||
config GENERIC_TIME
|
||||
bool
|
||||
default y
|
||||
|
||||
config GENERIC_CLOCKEVENTS
|
||||
bool
|
||||
default y
|
||||
|
|
|
|||
|
|
@ -210,9 +210,9 @@ void free_irqs(void)
|
|||
list_for_each(ele, &list) {
|
||||
chan = list_entry(ele, struct chan, free_list);
|
||||
|
||||
if (chan->input)
|
||||
if (chan->input && chan->enabled)
|
||||
free_irq(chan->line->driver->read_irq, chan);
|
||||
if (chan->output)
|
||||
if (chan->output && chan->enabled)
|
||||
free_irq(chan->line->driver->write_irq, chan);
|
||||
chan->enabled = 0;
|
||||
}
|
||||
|
|
@ -231,9 +231,9 @@ static void close_one_chan(struct chan *chan, int delay_free_irq)
|
|||
spin_unlock_irqrestore(&irqs_to_free_lock, flags);
|
||||
}
|
||||
else {
|
||||
if (chan->input)
|
||||
if (chan->input && chan->enabled)
|
||||
free_irq(chan->line->driver->read_irq, chan);
|
||||
if (chan->output)
|
||||
if (chan->output && chan->enabled)
|
||||
free_irq(chan->line->driver->write_irq, chan);
|
||||
chan->enabled = 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
#include "linux/slab.h"
|
||||
#include "linux/sound.h"
|
||||
#include "linux/soundcard.h"
|
||||
#include "linux/smp_lock.h"
|
||||
#include "asm/uaccess.h"
|
||||
#include "init.h"
|
||||
#include "os.h"
|
||||
|
|
@ -186,7 +187,9 @@ static int hostaudio_open(struct inode *inode, struct file *file)
|
|||
int ret;
|
||||
|
||||
#ifdef DEBUG
|
||||
kparam_block_sysfs_write(dsp);
|
||||
printk(KERN_DEBUG "hostaudio: open called (host: %s)\n", dsp);
|
||||
kparam_unblock_sysfs_write(dsp);
|
||||
#endif
|
||||
|
||||
state = kmalloc(sizeof(struct hostaudio_state), GFP_KERNEL);
|
||||
|
|
@ -198,7 +201,12 @@ static int hostaudio_open(struct inode *inode, struct file *file)
|
|||
if (file->f_mode & FMODE_WRITE)
|
||||
w = 1;
|
||||
|
||||
kparam_block_sysfs_write(dsp);
|
||||
lock_kernel();
|
||||
ret = os_open_file(dsp, of_set_rw(OPENFLAGS(), r, w), 0);
|
||||
unlock_kernel();
|
||||
kparam_unblock_sysfs_write(dsp);
|
||||
|
||||
if (ret < 0) {
|
||||
kfree(state);
|
||||
return ret;
|
||||
|
|
@ -254,11 +262,17 @@ static int hostmixer_open_mixdev(struct inode *inode, struct file *file)
|
|||
if (file->f_mode & FMODE_WRITE)
|
||||
w = 1;
|
||||
|
||||
kparam_block_sysfs_write(mixer);
|
||||
lock_kernel();
|
||||
ret = os_open_file(mixer, of_set_rw(OPENFLAGS(), r, w), 0);
|
||||
unlock_kernel();
|
||||
kparam_unblock_sysfs_write(mixer);
|
||||
|
||||
if (ret < 0) {
|
||||
kparam_block_sysfs_write(dsp);
|
||||
printk(KERN_ERR "hostaudio_open_mixdev failed to open '%s', "
|
||||
"err = %d\n", dsp, -ret);
|
||||
kparam_unblock_sysfs_write(dsp);
|
||||
kfree(state);
|
||||
return ret;
|
||||
}
|
||||
|
|
@ -314,8 +328,10 @@ MODULE_LICENSE("GPL");
|
|||
|
||||
static int __init hostaudio_init_module(void)
|
||||
{
|
||||
__kernel_param_lock();
|
||||
printk(KERN_INFO "UML Audio Relay (host dsp = %s, host mixer = %s)\n",
|
||||
dsp, mixer);
|
||||
__kernel_param_unlock();
|
||||
|
||||
module_data.dev_audio = register_sound_dsp(&hostaudio_fops, -1);
|
||||
if (module_data.dev_audio < 0) {
|
||||
|
|
|
|||
|
|
@ -25,11 +25,6 @@
|
|||
#include "net_kern.h"
|
||||
#include "net_user.h"
|
||||
|
||||
static inline void set_ether_mac(struct net_device *dev, unsigned char *addr)
|
||||
{
|
||||
memcpy(dev->dev_addr, addr, ETH_ALEN);
|
||||
}
|
||||
|
||||
#define DRIVER_NAME "uml-netdev"
|
||||
|
||||
static DEFINE_SPINLOCK(opened_lock);
|
||||
|
|
@ -266,7 +261,7 @@ static int uml_net_set_mac(struct net_device *dev, void *addr)
|
|||
struct sockaddr *hwaddr = addr;
|
||||
|
||||
spin_lock_irq(&lp->lock);
|
||||
set_ether_mac(dev, hwaddr->sa_data);
|
||||
eth_mac_addr(dev, hwaddr->sa_data);
|
||||
spin_unlock_irq(&lp->lock);
|
||||
|
||||
return 0;
|
||||
|
|
@ -380,7 +375,6 @@ static const struct net_device_ops uml_netdev_ops = {
|
|||
.ndo_tx_timeout = uml_net_tx_timeout,
|
||||
.ndo_set_mac_address = uml_net_set_mac,
|
||||
.ndo_change_mtu = uml_net_change_mtu,
|
||||
.ndo_set_mac_address = eth_mac_addr,
|
||||
.ndo_validate_addr = eth_validate_addr,
|
||||
};
|
||||
|
||||
|
|
@ -478,7 +472,7 @@ static void eth_configure(int n, void *init, char *mac,
|
|||
((*transport->user->init)(&lp->user, dev) != 0))
|
||||
goto out_unregister;
|
||||
|
||||
set_ether_mac(dev, device->mac);
|
||||
eth_mac_addr(dev, device->mac);
|
||||
dev->mtu = transport->user->mtu;
|
||||
dev->netdev_ops = ¨_netdev_ops;
|
||||
dev->ethtool_ops = ¨_net_ethtool_ops;
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@
|
|||
#include "linux/mm.h"
|
||||
#include "linux/slab.h"
|
||||
#include "linux/vmalloc.h"
|
||||
#include "linux/smp_lock.h"
|
||||
#include "linux/blkpg.h"
|
||||
#include "linux/genhd.h"
|
||||
#include "linux/spinlock.h"
|
||||
|
|
@ -1098,6 +1099,7 @@ static int ubd_open(struct block_device *bdev, fmode_t mode)
|
|||
struct ubd *ubd_dev = disk->private_data;
|
||||
int err = 0;
|
||||
|
||||
lock_kernel();
|
||||
if(ubd_dev->count == 0){
|
||||
err = ubd_open_dev(ubd_dev);
|
||||
if(err){
|
||||
|
|
@ -1115,7 +1117,8 @@ static int ubd_open(struct block_device *bdev, fmode_t mode)
|
|||
if(--ubd_dev->count == 0) ubd_close_dev(ubd_dev);
|
||||
err = -EROFS;
|
||||
}*/
|
||||
out:
|
||||
out:
|
||||
unlock_kernel();
|
||||
return err;
|
||||
}
|
||||
|
||||
|
|
@ -1123,8 +1126,10 @@ static int ubd_release(struct gendisk *disk, fmode_t mode)
|
|||
{
|
||||
struct ubd *ubd_dev = disk->private_data;
|
||||
|
||||
lock_kernel();
|
||||
if(--ubd_dev->count == 0)
|
||||
ubd_close_dev(ubd_dev);
|
||||
unlock_kernel();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -94,7 +94,6 @@ dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, int nelems,
|
|||
|
||||
#define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f)
|
||||
#define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h)
|
||||
#define dma_is_consistent(d, h) (1)
|
||||
|
||||
static inline int
|
||||
dma_get_cache_alignment(void)
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@
|
|||
set_pud(pud, __pud(_PAGE_TABLE + __pa(pmd)))
|
||||
|
||||
#ifdef CONFIG_64BIT
|
||||
#define set_pud(pudptr, pudval) set_64bit((phys_t *) (pudptr), pud_val(pudval))
|
||||
#define set_pud(pudptr, pudval) set_64bit((u64 *) (pudptr), pud_val(pudval))
|
||||
#else
|
||||
#define set_pud(pudptr, pudval) (*(pudptr) = (pudval))
|
||||
#endif
|
||||
|
|
@ -73,7 +73,7 @@ static inline int pgd_newpage(pgd_t pgd)
|
|||
static inline void pgd_mkuptodate(pgd_t pgd) { pgd_val(pgd) &= ~_PAGE_NEWPAGE; }
|
||||
|
||||
#ifdef CONFIG_64BIT
|
||||
#define set_pmd(pmdptr, pmdval) set_64bit((phys_t *) (pmdptr), pmd_val(pmdval))
|
||||
#define set_pmd(pmdptr, pmdval) set_64bit((u64 *) (pmdptr), pmd_val(pmdval))
|
||||
#else
|
||||
#define set_pmd(pmdptr, pmdval) (*(pmdptr) = (pmdval))
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -161,6 +161,9 @@ extern int os_stat_filesystem(char *path, long *bsize_out,
|
|||
long *spare_out);
|
||||
extern int os_change_dir(char *dir);
|
||||
extern int os_fchange_dir(int fd);
|
||||
extern unsigned os_major(unsigned long long dev);
|
||||
extern unsigned os_minor(unsigned long long dev);
|
||||
extern unsigned long long os_makedev(unsigned major, unsigned minor);
|
||||
|
||||
/* start_up.c */
|
||||
extern void os_early_checks(void);
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ void start_thread(struct pt_regs *regs, unsigned long eip, unsigned long esp)
|
|||
PT_REGS_SP(regs) = esp;
|
||||
}
|
||||
|
||||
static long execve1(char *file, char __user * __user *argv,
|
||||
static long execve1(const char *file, char __user * __user *argv,
|
||||
char __user *__user *env)
|
||||
{
|
||||
long error;
|
||||
|
|
@ -61,7 +61,7 @@ static long execve1(char *file, char __user * __user *argv,
|
|||
return error;
|
||||
}
|
||||
|
||||
long um_execve(char *file, char __user *__user *argv, char __user *__user *env)
|
||||
long um_execve(const char *file, char __user *__user *argv, char __user *__user *env)
|
||||
{
|
||||
long err;
|
||||
|
||||
|
|
@ -71,7 +71,7 @@ long um_execve(char *file, char __user *__user *argv, char __user *__user *env)
|
|||
return err;
|
||||
}
|
||||
|
||||
long sys_execve(char __user *file, char __user *__user *argv,
|
||||
long sys_execve(const char __user *file, char __user *__user *argv,
|
||||
char __user *__user *env)
|
||||
{
|
||||
long error;
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
extern long um_execve(char *file, char __user *__user *argv, char __user *__user *env);
|
||||
extern long um_execve(const char *file, char __user *__user *argv, char __user *__user *env);
|
||||
|
|
|
|||
|
|
@ -58,6 +58,9 @@ EXPORT_SYMBOL(os_accept_connection);
|
|||
EXPORT_SYMBOL(os_rcv_fd);
|
||||
EXPORT_SYMBOL(run_helper);
|
||||
EXPORT_SYMBOL(start_thread);
|
||||
EXPORT_SYMBOL(os_major);
|
||||
EXPORT_SYMBOL(os_minor);
|
||||
EXPORT_SYMBOL(os_makedev);
|
||||
|
||||
EXPORT_SYMBOL(add_sigio_fd);
|
||||
EXPORT_SYMBOL(ignore_sigio_fd);
|
||||
|
|
|
|||
|
|
@ -7,9 +7,6 @@
|
|||
#include "linux/ptrace.h"
|
||||
#include "linux/sched.h"
|
||||
#include "asm/uaccess.h"
|
||||
#ifdef CONFIG_PROC_MM
|
||||
#include "proc_mm.h"
|
||||
#endif
|
||||
#include "skas_ptrace.h"
|
||||
|
||||
|
||||
|
|
@ -158,24 +155,6 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
|
|||
break;
|
||||
}
|
||||
#endif
|
||||
#ifdef CONFIG_PROC_MM
|
||||
case PTRACE_SWITCH_MM: {
|
||||
struct mm_struct *old = child->mm;
|
||||
struct mm_struct *new = proc_mm_get_mm(data);
|
||||
|
||||
if (IS_ERR(new)) {
|
||||
ret = PTR_ERR(new);
|
||||
break;
|
||||
}
|
||||
|
||||
atomic_inc(&new->mm_users);
|
||||
child->mm = new;
|
||||
child->active_mm = new;
|
||||
mmput(old);
|
||||
ret = 0;
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
#ifdef PTRACE_ARCH_PRCTL
|
||||
case PTRACE_ARCH_PRCTL:
|
||||
/* XXX Calls ptrace on the host - needs some SMP thinking */
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ int kernel_execve(const char *filename, char *const argv[], char *const envp[])
|
|||
|
||||
fs = get_fs();
|
||||
set_fs(KERNEL_DS);
|
||||
ret = um_execve((char *)filename, (char __user *__user *)argv,
|
||||
ret = um_execve(filename, (char __user *__user *)argv,
|
||||
(char __user *__user *) envp);
|
||||
set_fs(fs);
|
||||
|
||||
|
|
|
|||
|
|
@ -102,16 +102,16 @@ static void __init setup_itimer(void)
|
|||
clockevents_register_device(&itimer_clockevent);
|
||||
}
|
||||
|
||||
void read_persistent_clock(struct timespec *ts)
|
||||
{
|
||||
long long nsecs = os_nsecs();
|
||||
|
||||
set_normalized_timespec(ts, nsecs / NSEC_PER_SEC,
|
||||
nsecs % NSEC_PER_SEC);
|
||||
}
|
||||
|
||||
void __init time_init(void)
|
||||
{
|
||||
long long nsecs;
|
||||
|
||||
timer_init();
|
||||
|
||||
nsecs = os_nsecs();
|
||||
set_normalized_timespec(&wall_to_monotonic, -nsecs / NSEC_PER_SEC,
|
||||
-nsecs % NSEC_PER_SEC);
|
||||
set_normalized_timespec(&xtime, nsecs / NSEC_PER_SEC,
|
||||
nsecs % NSEC_PER_SEC);
|
||||
late_time_init = setup_itimer;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -561,3 +561,18 @@ int os_lock_file(int fd, int excl)
|
|||
out:
|
||||
return err;
|
||||
}
|
||||
|
||||
unsigned os_major(unsigned long long dev)
|
||||
{
|
||||
return major(dev);
|
||||
}
|
||||
|
||||
unsigned os_minor(unsigned long long dev)
|
||||
{
|
||||
return minor(dev);
|
||||
}
|
||||
|
||||
unsigned long long os_makedev(unsigned major, unsigned minor)
|
||||
{
|
||||
return makedev(major, minor);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -103,6 +103,10 @@ EXPORT_SYMBOL_PROTO(getuid);
|
|||
EXPORT_SYMBOL_PROTO(fsync);
|
||||
EXPORT_SYMBOL_PROTO(fdatasync);
|
||||
|
||||
EXPORT_SYMBOL_PROTO(lstat64);
|
||||
EXPORT_SYMBOL_PROTO(fstat64);
|
||||
EXPORT_SYMBOL_PROTO(mknod);
|
||||
|
||||
/* Export symbols used by GCC for the stack protector. */
|
||||
extern void __stack_smash_handler(void *) __attribute__((weak));
|
||||
EXPORT_SYMBOL(__stack_smash_handler);
|
||||
|
|
|
|||
Loading…
Reference in a new issue