Merge branch 'android-3.10' into 'dev-kernel-3.10'
Sumit Singh [Mon, 11 May 2015 09:17:22 +0000 (14:17 +0530)]
Conflicts:
drivers/misc/Kconfig
drivers/misc/Makefile
drivers/staging/android/Kconfig
drivers/staging/android/alarm-dev.c
drivers/staging/android/logger.c
drivers/staging/android/uapi/android_alarm.h
drivers/usb/gadget/android.c
lib/lz4/lz4_compress.c
lib/lz4/lz4_decompress.c
lib/lz4/lz4hc_compress.c

Bug 200091315

Change-Id: I8e69ba55d2fa8e4f955b2838bb211a8481167670
Signed-off-by: Sumit Singh <sumsingh@nvidia.com>

38 files changed:
1  2 
Documentation/filesystems/proc.txt
drivers/base/power/wakeup.c
drivers/cpufreq/cpufreq_interactive.c
drivers/md/dm-verity.c
drivers/misc/Kconfig
drivers/misc/Makefile
drivers/staging/android/Kconfig
drivers/staging/android/Makefile
drivers/staging/android/fiq_debugger/fiq_debugger.c
drivers/usb/gadget/Kconfig
drivers/usb/gadget/android.c
fs/debugfs/inode.c
fs/devpts/inode.c
fs/ecryptfs/file.c
fs/ext2/super.c
fs/ext3/super.c
fs/ext4/super.c
fs/fuse/inode.c
fs/hpfs/super.c
fs/nfsd/vfs.c
fs/proc/base.c
fs/proc/root.c
fs/proc/task_mmu.c
fs/pstore/inode.c
fs/reiserfs/super.c
fs/ubifs/super.c
fs/udf/super.c
include/linux/fs.h
include/linux/mm.h
mm/mlock.c
net/ipv4/fib_frontend.c
net/ipv4/fib_semantics.c
net/ipv4/ipmr.c
net/ipv4/ping.c
net/ipv6/ip6mr.c
security/selinux/avc.c
security/selinux/hooks.c
security/selinux/ss/policydb.c

Simple merge
Simple merge
@@@ -411,16 -403,23 +411,16 @@@ static void cpufreq_interactive_timer(u
        spin_lock_irqsave(&pcpu->target_freq_lock, flags);
        do_div(cputime_speedadj, delta_time);
        loadadjfreq = (unsigned int)cputime_speedadj * 100;
-       cpu_load = loadadjfreq / pcpu->target_freq;
+       cpu_load = loadadjfreq / pcpu->policy->cur;
        tunables->boosted = tunables->boost_val || now < tunables->boostpulse_endtime;
  
 +      new_freq = choose_freq(pcpu, loadadjfreq);
        if (cpu_load >= tunables->go_hispeed_load || tunables->boosted) {
 -              if (pcpu->target_freq < tunables->hispeed_freq) {
 -                      new_freq = tunables->hispeed_freq;
 -              } else {
 -                      new_freq = choose_freq(pcpu, loadadjfreq);
 -
 -                      if (new_freq < tunables->hispeed_freq)
 -                              new_freq = tunables->hispeed_freq;
 -              }
 -      } else {
 -              new_freq = choose_freq(pcpu, loadadjfreq);
 -              if (new_freq > tunables->hispeed_freq &&
 -                              pcpu->target_freq < tunables->hispeed_freq)
 -                      new_freq = tunables->hispeed_freq;
 +              new_freq = max(new_freq, tunables->hispeed_freq);
 +              if (pcpu->target_freq < tunables->hispeed_freq &&
 +                              tunables->boost_factor)
 +                      new_freq = min((pcpu->target_freq
 +                                      * tunables->boost_factor), tunables->hispeed_freq);
        }
  
        if (pcpu->target_freq >= tunables->hispeed_freq &&
Simple merge
@@@ -547,138 -531,12 +547,144 @@@ config SRA
          the genalloc API. It is supposed to be used for small on-chip SRAM
          areas found on many SoCs.
  
 +config BCM4329_RFKILL
 +      bool "Enable BCM4329 RFKILL driver"
 +      default n
 +      ---help---
 +      Adds BCM4329 RFKILL driver for Broadcom BCM4329 chipset
 +
 +config TEGRA_CRYPTO_DEV
 +      bool "Device node to access tegra aes hardware"
 +      ---help---
 +      Dev node /dev/tegra-crypto in order to get access to tegra aes
 +      hardware from user space
 +
 +config TEGRA_CPC
 +      bool "Tegra content protection controller"
 +      depends on I2C
 +      ---help---
 +      This driver allows authenticated IO access to storage blocks on
 +      CPC controller via i2c.
 +
 +config MAX1749_VIBRATOR
 +      bool "MAX1749 vibrator device driver"
 +      depends on ANDROID_TIMED_OUTPUT
 +      default n
 +      ---help---
 +      Adds a timed output vibrator device node for MAX1749 vibrator motor
 +
 +config APANIC
 +      bool "Android kernel panic diagnostics driver"
 +      default n
 +      ---help---
 +       Driver which handles kernel panics and attempts to write
 +       critical debugging data to flash.
 +
 +config APANIC_PLABEL
 +      string "Android panic dump flash partition label"
 +      default "kpanic"
 +      ---help---
 +       If your platform uses a different flash partition label for storing
 +       crashdumps, enter it here.
 +
 +config THERM_EST
 +      bool "Thermal estimator driver"
 +      depends on THERMAL
 +      default n
 +      ---help---
 +      Thermal driver which estimates temperature based of other sensors.
 +
 +config TEGRA_THROUGHPUT
 +      bool "Device node to set throughput target"
 +      depends on TEGRA_DC && TEGRA_DC_EXTENSIONS
 +      default y
 +      ---help---
 +      Dev node /dev/tegra-throughput used to set a throughput target.
 +
 +config FAN_THERM_EST
 +      bool "Fan driving temp estimator"
 +      depends on THERMAL
 +      ---help---
 +      Thermal driver that estimates the fan driving temperature based on
 +      other sensors.
 +
 +      This enables a virtual sensor that polls other registered thermal
 +      zone devices for temperature updates.
 +
 +config BLUEDROID_PM
 +        tristate "Bluedroid_pm driver support"
 +        help
 +          Bluetooth Bluedroid power management Driver.
 +          This driver provides power control and dynamic active power saving
 +          mechanism for bluetooth radio devices.
 +
 +          Say Y here to compile support for bluedroid_pm support into the kernel
 +          or say M to compile it as module (bluedroid_pm).
 +
 +config CPULOAD_MONITOR
 +      bool "Publish cpu load measures in sysfs"
 +      depends on CPU_FREQ
 +      default y
 +      ---help---
 +      Publish cpu load measured in sysfs, to be used by user space cpu
 +      frequency controllers.
 +
 +config SIM_MAX77660
 +        tristate "Maxim SIM MAX77660"
 +        depends on MFD_MAX77660
 +       ---help---
 +       If you say yes, SIM drv of Maxim MAX77660 will be enabled.
 +       It supports SIM Card detection and SIM configuration of Max77660.
 +
 +config SIM_PALMAS
 +      tristate "Palmas SIM driver"
 +      depends on MFD_PALMAS
 +      ---help---
 +      If yes, the Palmas SIM driver will be enabled. It supports SIM card
 +      detection and SIM configuration for Palmas PMICs.
 +
 +config PALMAS_LDOUSB_INPUT
 +        tristate "Palmas LDOUSB input driver support"
 +        depends on MFD_PALMAS
 +       ---help---
 +          Say Y here to enable palmas LDOUSB input selection based on
 +          battery voltage.
 +
 +config MODS
 +      tristate "NVIDIA MODS driver"
 +      default n
 +      ---help---
 +      The NVIDIA MODS driver gives user space software direct access
 +      to hardware. The NVIDIA Diagnostic Software uses this to test hardware.
 +      This driver should normally be disabled in all production builds.
 +
 +      Say Y here to compile the NVIDIA MODS driver into the kernel or say M
 +      to compile it as a module.
 +
 +      If unsure, say N here.
 +
 +config TEGRA_PROC_POWER_MODEL
 +      bool
 +      help
 +        A simple model of processor power relating voltage, frequency,
 +        cores, and chip specific data. Used by various drivers.
 +
 +config NV_GAMEPAD_RESET
 +      tristate "Nvidia Gamepad Reset Driver"
 +      help
 +       This driver provides an interface that can be used to recover
 +       gamepad uC when needed
 +
 +config SAF775x_HWDEP
 +        tristate "SAF775x HWDEP Driver"
 +        depends on I2C
 +
+ config UID_CPUTIME
+       tristate "Per-UID cpu time statistics"
+       depends on PROFILING
+       help
+         Per UID based cpu time statistics exported to /proc/uid_cputime
  source "drivers/misc/c2port/Kconfig"
  source "drivers/misc/eeprom/Kconfig"
  source "drivers/misc/cb710/Kconfig"
@@@ -57,37 -54,4 +57,38 @@@ obj-$(CONFIG_INTEL_MEI)             += mei
  obj-$(CONFIG_VMWARE_VMCI)     += vmw_vmci/
  obj-$(CONFIG_LATTICE_ECP3_CONFIG)     += lattice-ecp3-config.o
  obj-$(CONFIG_SRAM)            += sram.o
 +obj-$(CONFIG_SENSORS_NCT1008) += nct1008.o
 +obj-$(CONFIG_BCM4329_RFKILL)  += bcm4329_rfkill.o
 +CFLAGS_tegra-cryptodev.o       = -Werror
 +obj-$(CONFIG_TEGRA_CRYPTO_DEV)        += tegra-cryptodev.o
 +obj-$(CONFIG_TEGRA_BB_SUPPORT)        += tegra-baseband/
 +obj-$(CONFIG_TEGRA_CEC_SUPPORT)       += tegra-cec/
 +obj-$(CONFIG_MAX1749_VIBRATOR)        += max1749.o
 +obj-$(CONFIG_APANIC)          += apanic.o
 +obj-$(CONFIG_THERM_EST)               += therm_est.o
 +CFLAGS_tegra-throughput.o      = -Werror
 +ifeq ($(CONFIG_ARM64),y)
 +CFLAGS_tegra-throughput.o       += -Iarch/arm/mach-tegra/include
 +endif
 +obj-$(CONFIG_TEGRA_THROUGHPUT)        += tegra-throughput.o
 +obj-$(CONFIG_SND_SOC_TEGRA_CS42L73)   += a2220.o
 +obj-$(CONFIG_SND_SOC_TEGRA_RT5640)    += tfa9887.o
 +obj-$(CONFIG_FAN_THERM_EST)   += therm_fan_est.o
 +obj-$(CONFIG_BLUEDROID_PM)      += bluedroid_pm.o
 +obj-$(CONFIG_CPULOAD_MONITOR) += cpuload.o
 +obj-$(CONFIG_SIM_MAX77660)    += max77660-sim.o
 +obj-$(CONFIG_SIM_PALMAS)      += palmas-sim.o
 +obj-$(CONFIG_PALMAS_LDOUSB_INPUT)     += palmas-ldousb-in.o
 +obj-y                         += issp/
 +obj-$(CONFIG_TEGRA_PROFILER)    += tegra-profiler/
 +obj-$(CONFIG_MTK_GPS)         += gps/
 +obj-$(CONFIG_PLATFORM_TEGRA)  += tegra-fuse/
 +obj-$(CONFIG_DENVER_CPU)      += force_idle_t132.o
 +obj-$(CONFIG_ARCH_TEGRA)        +=tegra_timerinfo.o
 +obj-$(CONFIG_MODS)            += mods/
 +obj-$(CONFIG_DENVER_CPU)      += idle_test_t132.o
 +obj-$(CONFIG_TEGRA_PROC_POWER_MODEL) += tegra_ppm.o
 +obj-$(CONFIG_NV_GAMEPAD_RESET)        += nv_gamepad_reset.o
 +obj-$(CONFIG_SAF775x_HWDEP)   += saf775x/
 +obj-$(CONFIG_TEGRA_CPC)               += tegra_cpc.o
+ obj-$(CONFIG_UID_CPUTIME) += uid_cputime.o
@@@ -61,55 -44,37 +44,46 @@@ config ANDROID_LOW_MEMORY_KILLER_AUTODE
          /sys/module/lowmemorykiller/parameters/adj and convert them
          to oom_score_adj values.
  
 -config SYNC
 -      bool "Synchronization framework"
 -      default n
 -      select ANON_INODES
 -      help
 -        This option enables the framework for synchronization between multiple
 -        drivers.  Sync implementations can take advantage of hardware
 -        synchronization built into devices like GPUs.
 -
 -config SW_SYNC
 -      bool "Software synchronization objects"
 -      default n
 -      depends on SYNC
 -      help
 -        A sync object driver that uses a 32bit counter to coordinate
 -        syncrhronization.  Useful when there is no hardware primitive backing
 -        the synchronization.
 -
 -config SW_SYNC_USER
 -      bool "Userspace API for SW_SYNC"
 -      default n
 -      depends on SW_SYNC
 -      help
 -        Provides a user space API to the sw sync object.
 -        *WARNING* improper use of this can result in deadlocking kernel
 -        drivers from userspace.
 +config ANDROID_LOW_MEMORY_KILLER_AUTODETECT_OOM_ADJ_VALUES
 +      bool "Android Low Memory Killer: detect oom_adj values"
 +      depends on ANDROID_LOW_MEMORY_KILLER
 +      default y
 +      ---help---
 +        Detect oom_adj values written to
 +        /sys/module/lowmemorykiller/parameters/adj and convert them
 +        to oom_score_adj values.
  
- config ANDROID_INTF_ALARM_DEV
-       bool "Android alarm driver"
-       depends on RTC_CLASS
-       default n
-       ---help---
-         Provides non-wakeup and rtc backed wakeup alarms based on rtc or
-         elapsed realtime, and a non-wakeup alarm on the monotonic clock.
-         Also exports the alarm interface to user-space.
  source "drivers/staging/android/ion/Kconfig"
  
 +endif # if ANDROID
 +
  source "drivers/staging/android/fiq_debugger/Kconfig"
  
 -endif # if ANDROID
 +config SYNC
 +        bool "Synchronization framework"
 +        default n
 +        select ANON_INODES
 +        help
 +          This option enables the framework for synchronization between multiple
 +          drivers.  Sync implementations can take advantage of hardware
 +          synchronization built into devices like GPUs.
 +
 +config SW_SYNC
 +        bool "Software synchronization objects"
 +        default n
 +        depends on SYNC
 +        help
 +          A sync object driver that uses a 32bit counter to coordinate
 +          syncrhronization.  Useful when there is no hardware primitive backing
 +          the synchronization.
 +
 +config SW_SYNC_USER
 +        bool "Userspace API for SW_SYNC"
 +        default n
 +        depends on SW_SYNC
 +        help
 +          Provides a user space API to the sw sync object.
 +          *WARNING* improper use of this can result in deadlocking kernel
 +          drivers from userspace.
  
  endmenu
@@@ -1,9 -1,9 +1,8 @@@
  ccflags-y += -I$(src)                 # needed for trace events
  
  obj-y                                 += ion/
 -obj-$(CONFIG_FIQ_DEBUGGER)            += fiq_debugger/
  
  obj-$(CONFIG_ASHMEM)                  += ashmem.o
- obj-$(CONFIG_ANDROID_LOGGER)          += logger.o
  obj-$(CONFIG_ANDROID_TIMED_OUTPUT)    += timed_output.o
  obj-$(CONFIG_ANDROID_TIMED_GPIO)      += timed_gpio.o
  obj-$(CONFIG_ANDROID_LOW_MEMORY_KILLER)       += lowmemorykiller.o
Simple merge
  
  #include "gadget_chips.h"
  
 +#include "f_nvusb.c"
  #include "f_fs.c"
  #include "f_audio_source.c"
+ #include "f_midi.c"
  #include "f_mass_storage.c"
  #include "f_mtp.c"
  #include "f_accessory.c"
@@@ -1298,31 -940,60 +1305,85 @@@ static struct android_usb_function audi
        .attributes     = audio_source_function_attributes,
  };
  
 +static int
 +nvusb_function_init(struct android_usb_function *f,
 +              struct usb_composite_dev *cdev)
 +{
 +      return 0;
 +}
 +
 +static void nvusb_function_cleanup(struct android_usb_function *f)
 +{
 +}
 +
 +static int
 +nvusb_function_bind_config(struct android_usb_function *f,
 +              struct usb_configuration *c)
 +{
 +      return nvusb_bind_config(c);
 +}
 +
 +static struct android_usb_function nvusb_function = {
 +      .name           = "nvusb",
 +      .init           = nvusb_function_init,
 +      .cleanup        = nvusb_function_cleanup,
 +      .bind_config    = nvusb_function_bind_config,
 +};
 +
+ static int midi_function_init(struct android_usb_function *f,
+                                       struct usb_composite_dev *cdev)
+ {
+       struct midi_alsa_config *config;
+       config = kzalloc(sizeof(struct midi_alsa_config), GFP_KERNEL);
+       f->config = config;
+       if (!config)
+               return -ENOMEM;
+       config->card = -1;
+       config->device = -1;
+       return 0;
+ }
+ static void midi_function_cleanup(struct android_usb_function *f)
+ {
+       kfree(f->config);
+ }
+ static int midi_function_bind_config(struct android_usb_function *f,
+                                               struct usb_configuration *c)
+ {
+       struct midi_alsa_config *config = f->config;
+       return f_midi_bind_config(c, SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1,
+                       MIDI_INPUT_PORTS, MIDI_OUTPUT_PORTS, MIDI_BUFFER_SIZE,
+                       MIDI_QUEUE_LENGTH, config);
+ }
+ static ssize_t midi_alsa_show(struct device *dev,
+               struct device_attribute *attr, char *buf)
+ {
+       struct android_usb_function *f = dev_get_drvdata(dev);
+       struct midi_alsa_config *config = f->config;
+       /* print ALSA card and device numbers */
+       return sprintf(buf, "%d %d\n", config->card, config->device);
+ }
+ static DEVICE_ATTR(alsa, S_IRUGO, midi_alsa_show, NULL);
+ static struct device_attribute *midi_function_attributes[] = {
+       &dev_attr_alsa,
+       NULL
+ };
+ static struct android_usb_function midi_function = {
+       .name           = "midi",
+       .init           = midi_function_init,
+       .cleanup        = midi_function_cleanup,
+       .bind_config    = midi_function_bind_config,
+       .attributes     = midi_function_attributes,
+ };
  static struct android_usb_function *supported_functions[] = {
        &ffs_function,
        &acm_function,
        &mass_storage_function,
        &accessory_function,
        &audio_source_function,
 +      &nvusb_function,
 +#ifdef CONFIG_TARGET_CORE
 +      &uasp_function,
 +#endif
+       &midi_function,
        NULL
  };
  
Simple merge
Simple merge
Simple merge
diff --cc fs/ext2/super.c
Simple merge
diff --cc fs/ext3/super.c
Simple merge
diff --cc fs/ext4/super.c
Simple merge
diff --cc fs/fuse/inode.c
Simple merge
diff --cc fs/hpfs/super.c
Simple merge
diff --cc fs/nfsd/vfs.c
Simple merge
diff --cc fs/proc/base.c
Simple merge
diff --cc fs/proc/root.c
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc fs/udf/super.c
@@@ -629,13 -629,8 +629,14 @@@ static int udf_remount_fs(struct super_
        struct udf_options uopt;
        struct udf_sb_info *sbi = UDF_SB(sb);
        int error = 0;
+       sync_filesystem(sb);
  
 +      if (sbi->s_lvid_bh) {
 +              int write_rev = le16_to_cpu(udf_sb_lvidiu(sbi)->minUDFWriteRev);
 +              if (write_rev > UDF_MAX_WRITE_VERSION && !(*flags & MS_RDONLY))
 +                      return -EACCES;
 +      }
 +
        uopt.flags = sbi->s_flags;
        uopt.uid   = sbi->s_uid;
        uopt.gid   = sbi->s_gid;
Simple merge
Simple merge
diff --cc mm/mlock.c
Simple merge
Simple merge
Simple merge
diff --cc net/ipv4/ipmr.c
Simple merge
diff --cc net/ipv4/ping.c
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge