diff --git a/AndroidKernel.mk b/AndroidKernel.mk index 67ab09710b7..5d45883c642 100644 --- a/AndroidKernel.mk +++ b/AndroidKernel.mk @@ -19,7 +19,6 @@ KERNEL_HEADERS_INSTALL := $(KERNEL_OUT)/usr KERNEL_MODULES_INSTALL := system KERNEL_MODULES_OUT := $(TARGET_OUT)/lib/modules KERNEL_IMG=$(KERNEL_OUT)/arch/arm/boot/Image -CROSS_COMPILE_PATH=$(ANDROID_BUILD_TOP)/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8/bin/ DTS_NAMES ?= $(shell $(PERL) -e 'while (<>) {$$a = $$1 if /CONFIG_ARCH_((?:MSM|QSD|MPQ)[a-zA-Z0-9]+)=y/; $$r = $$1 if /CONFIG_MSM_SOC_REV_(?!NONE)(\w+)=y/; $$arch = $$arch.lc("$$a$$r ") if /CONFIG_ARCH_((?:MSM|QSD|MPQ)[a-zA-Z0-9]+)=y/} print $$arch;' $(KERNEL_CONFIG)) KERNEL_USE_OF ?= $(shell $(PERL) -e '$$of = "n"; while (<>) { if (/CONFIG_USE_OF=y/) { $$of = "y"; break; } } print $$of;' kernel/arch/arm/configs/$(KERNEL_DEFCONFIG)) @@ -72,30 +71,30 @@ $(KERNEL_OUT): mkdir -p $(KERNEL_OUT) $(KERNEL_CONFIG): $(KERNEL_OUT) - $(MAKE) -C kernel O=../$(KERNEL_OUT) ARCH=arm CROSS_COMPILE=$(CROSS_COMPILE_PATH)arm-eabi- $(KERNEL_DEFCONFIG) + $(MAKE) -C kernel O=../$(KERNEL_OUT) ARCH=arm CROSS_COMPILE=arm-linux-androideabi- $(KERNEL_DEFCONFIG) $(KERNEL_OUT)/piggy : $(TARGET_PREBUILT_INT_KERNEL) $(hide) gunzip -c $(KERNEL_OUT)/arch/arm/boot/compressed/piggy.gzip > $(KERNEL_OUT)/piggy $(TARGET_PREBUILT_INT_KERNEL): $(KERNEL_OUT) $(KERNEL_CONFIG) $(KERNEL_HEADERS_INSTALL) - $(MAKE) -C kernel O=../$(KERNEL_OUT) ARCH=arm CROSS_COMPILE=$(CROSS_COMPILE_PATH)arm-eabi- - $(MAKE) -C kernel O=../$(KERNEL_OUT) ARCH=arm CROSS_COMPILE=$(CROSS_COMPILE_PATH)arm-eabi- modules - $(MAKE) -C kernel O=../$(KERNEL_OUT) INSTALL_MOD_PATH=../../$(KERNEL_MODULES_INSTALL) INSTALL_MOD_STRIP=1 ARCH=arm CROSS_COMPILE=$(CROSS_COMPILE_PATH)arm-eabi- modules_install + $(MAKE) -C kernel O=../$(KERNEL_OUT) ARCH=arm CROSS_COMPILE=arm-linux-androideabi- + $(MAKE) -C kernel O=../$(KERNEL_OUT) ARCH=arm CROSS_COMPILE=arm-linux-androideabi- modules + $(MAKE) -C kernel O=../$(KERNEL_OUT) INSTALL_MOD_PATH=../../$(KERNEL_MODULES_INSTALL) INSTALL_MOD_STRIP=1 ARCH=arm CROSS_COMPILE=arm-linux-androideabi- modules_install $(mv-modules) $(clean-module-folder) $(append-dtb) $(KERNEL_HEADERS_INSTALL): $(KERNEL_OUT) $(KERNEL_CONFIG) - $(MAKE) -C kernel O=../$(KERNEL_OUT) ARCH=arm CROSS_COMPILE=$(CROSS_COMPILE_PATH)arm-eabi- headers_install + $(MAKE) -C kernel O=../$(KERNEL_OUT) ARCH=arm CROSS_COMPILE=arm-linux-androideabi- headers_install kerneltags: $(KERNEL_OUT) $(KERNEL_CONFIG) - $(MAKE) -C kernel O=../$(KERNEL_OUT) ARCH=arm CROSS_COMPILE=$(CROSS_COMPILE_PATH)arm-eabi- tags + $(MAKE) -C kernel O=../$(KERNEL_OUT) ARCH=arm CROSS_COMPILE=arm-linux-androideabi- tags kernelconfig: $(KERNEL_OUT) $(KERNEL_CONFIG) env KCONFIG_NOTIMESTAMP=true \ - $(MAKE) -C kernel O=../$(KERNEL_OUT) ARCH=arm CROSS_COMPILE=$(CROSS_COMPILE_PATH)arm-eabi- menuconfig + $(MAKE) -C kernel O=../$(KERNEL_OUT) ARCH=arm CROSS_COMPILE=arm-linux-androideabi- menuconfig env KCONFIG_NOTIMESTAMP=true \ - $(MAKE) -C kernel O=../$(KERNEL_OUT) ARCH=arm CROSS_COMPILE=$(CROSS_COMPILE_PATH)arm-eabi- savedefconfig + $(MAKE) -C kernel O=../$(KERNEL_OUT) ARCH=arm CROSS_COMPILE=arm-linux-androideabi- savedefconfig cp $(KERNEL_OUT)/defconfig kernel/arch/arm/configs/$(KERNEL_DEFCONFIG) endif diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 4b544b71f35..e4096309609 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile @@ -80,6 +80,7 @@ arch-$(CONFIG_CPU_32v3) :=-D__LINUX_ARM_ARCH__=3 -march=armv3 # doesn't even support -march=armv7-a, since in that situation we would have # bigger problems. arch-$(CONFIG_ARCH_MSM_KRAIT) :=-D__LINUX_ARM_ARCH__=7 $(call cc-option,-mcpu=cortex-a15,-march=armv7-a) +arch-$(CONFIG_MSM_CORTEX_A7) :=-D__LINUX_ARM_ARCH__=7 $(call cc-option,-mcpu=cortex-a15,-march=armv7-a) # This selects how we optimise for the processor. tune-$(CONFIG_CPU_ARM610) :=-mtune=arm610 diff --git a/arch/arm/mach-msm/board-8974-gpiomux.c b/arch/arm/mach-msm/board-8974-gpiomux.c index 5d4d3795231..2c571c62cb8 100755 --- a/arch/arm/mach-msm/board-8974-gpiomux.c +++ b/arch/arm/mach-msm/board-8974-gpiomux.c @@ -122,7 +122,7 @@ static struct msm_gpiomux_config mdm_configs[] __initdata = { }, }; -static struct gpiomux_setting gpio_uart_config = { +static struct gpiomux_setting gpio_uart_config __initdata = { .func = GPIOMUX_FUNC_2, .drv = GPIOMUX_DRV_16MA, .pull = GPIOMUX_PULL_NONE, diff --git a/arch/arm/mach-msm/ext-buck-control.c b/arch/arm/mach-msm/ext-buck-control.c index e0c349a9d11..e141bc9d4c2 100644 --- a/arch/arm/mach-msm/ext-buck-control.c +++ b/arch/arm/mach-msm/ext-buck-control.c @@ -100,7 +100,7 @@ static int msm_ext_buck_probe(struct platform_device *pdev) return ret; } -static struct of_device_id msm_ext_buck_table[] = { +static struct of_device_id msm_ext_buck_table[] __initdata = { {.compatible = "qcom,ext-buck-control"}, {}, }; diff --git a/arch/arm/mach-msm/gdsc.c b/arch/arm/mach-msm/gdsc.c index ea4865d1f83..ae442db89ab 100644 --- a/arch/arm/mach-msm/gdsc.c +++ b/arch/arm/mach-msm/gdsc.c @@ -146,7 +146,7 @@ static struct regulator_ops gdsc_ops = { static int __devinit gdsc_probe(struct platform_device *pdev) { - static atomic_t gdsc_count = ATOMIC_INIT(-1); + static atomic_t gdsc_count __initdata = ATOMIC_INIT(-1); struct regulator_init_data *init_data; struct resource *res; struct gdsc *sc; @@ -274,7 +274,7 @@ static int __devexit gdsc_remove(struct platform_device *pdev) return 0; } -static struct of_device_id gdsc_match_table[] = { +static struct of_device_id gdsc_match_table[] __initdata = { { .compatible = "qcom,gdsc" }, {} }; diff --git a/arch/arm/mach-msm/krait-regulator-pmic.c b/arch/arm/mach-msm/krait-regulator-pmic.c index 2f4185eea9b..fa37949b9ba 100644 --- a/arch/arm/mach-msm/krait-regulator-pmic.c +++ b/arch/arm/mach-msm/krait-regulator-pmic.c @@ -72,7 +72,7 @@ struct krait_vreg_pmic_chip { static struct krait_vreg_pmic_chip *the_chip; -static struct of_device_id krait_vreg_pmic_match_table[] = { +static struct of_device_id krait_vreg_pmic_match_table[] __initdata = { { .compatible = KRAIT_REG_PMIC_DEV_NAME }, {} }; diff --git a/arch/arm/mach-msm/krait-regulator.c b/arch/arm/mach-msm/krait-regulator.c index b0a1a7c76e0..85713f2c42a 100644 --- a/arch/arm/mach-msm/krait-regulator.c +++ b/arch/arm/mach-msm/krait-regulator.c @@ -1400,7 +1400,7 @@ static int __devexit krait_power_remove(struct platform_device *pdev) return 0; } -static struct of_device_id krait_power_match_table[] = { +static struct of_device_id krait_power_match_table[] __initdata = { { .compatible = "qcom,krait-regulator", }, {} }; @@ -1415,7 +1415,7 @@ static struct platform_driver krait_power_driver = { }, }; -static struct of_device_id krait_pdn_match_table[] = { +static struct of_device_id krait_pdn_match_table[] __initdata = { { .compatible = "qcom,krait-pdn", }, {} }; diff --git a/arch/arm/mach-msm/lpm_levels.c b/arch/arm/mach-msm/lpm_levels.c index bd281318f4d..0197957729d 100644 --- a/arch/arm/mach-msm/lpm_levels.c +++ b/arch/arm/mach-msm/lpm_levels.c @@ -99,7 +99,7 @@ static struct notifier_block __refdata lpm_cpu_nblk = { }; static uint32_t allowed_l2_mode; -static uint32_t sysfs_dbg_l2_mode = MSM_SPM_L2_MODE_POWER_COLLAPSE; +static uint32_t sysfs_dbg_l2_mode __refdata = MSM_SPM_L2_MODE_POWER_COLLAPSE; static uint32_t default_l2_mode; @@ -1100,7 +1100,7 @@ fail: return -EFAULT; } -static struct of_device_id cpu_modes_mtch_tbl[] = { +static struct of_device_id cpu_modes_mtch_tbl[] __initdata = { {.compatible = "qcom,cpu-modes"}, {}, }; @@ -1114,7 +1114,7 @@ static struct platform_driver cpu_modes_driver = { }, }; -static struct of_device_id system_modes_mtch_tbl[] = { +static struct of_device_id system_modes_mtch_tbl[] __initdata = { {.compatible = "qcom,system-modes"}, {}, }; @@ -1128,7 +1128,7 @@ static struct platform_driver system_modes_driver = { }, }; -static struct of_device_id lpm_levels_match_table[] = { +static struct of_device_id lpm_levels_match_table[] __initdata = { {.compatible = "qcom,lpm-levels"}, {}, }; diff --git a/arch/arm/mach-msm/mpm-of.c b/arch/arm/mach-msm/mpm-of.c index f1bf64fd83d..0a4da5b8f2c 100644 --- a/arch/arm/mach-msm/mpm-of.c +++ b/arch/arm/mach-msm/mpm-of.c @@ -98,7 +98,7 @@ enum mpm_reg_offsets { MSM_MPM_REG_STATUS, }; -static DEFINE_SPINLOCK(msm_mpm_lock); +static __refdata DEFINE_SPINLOCK(msm_mpm_lock); static uint32_t msm_mpm_enabled_irq[MSM_MPM_REG_WIDTH]; static uint32_t msm_mpm_wake_irq[MSM_MPM_REG_WIDTH]; @@ -113,7 +113,7 @@ enum { MSM_MPM_DEBUG_NON_DETECTABLE_IRQ_IDLE = BIT(3), }; -static int msm_mpm_debug_mask = 1; +static int msm_mpm_debug_mask __refdata = 1; module_param_named( debug_mask, msm_mpm_debug_mask, int, S_IRUGO | S_IWUSR | S_IWGRP ); @@ -721,12 +721,12 @@ static int __devinit msm_mpm_dev_probe(struct platform_device *pdev) return 0; } -static inline int __init mpm_irq_domain_linear_size(struct irq_domain *d) +static inline int mpm_irq_domain_linear_size(struct irq_domain *d) { return d->revmap_data.linear.size; } -static inline int __init mpm_irq_domain_legacy_size(struct irq_domain *d) +static inline int mpm_irq_domain_legacy_size(struct irq_domain *d) { return d->revmap_data.legacy.size; } diff --git a/arch/arm/mach-msm/msm-pm.c b/arch/arm/mach-msm/msm-pm.c index cb65a7031b1..c0fefbca56f 100644 --- a/arch/arm/mach-msm/msm-pm.c +++ b/arch/arm/mach-msm/msm-pm.c @@ -56,7 +56,7 @@ #define MAX_BUF_SIZE 512 -static int msm_pm_debug_mask = 1; +static int msm_pm_debug_mask __refdata = 1; module_param_named( debug_mask, msm_pm_debug_mask, int, S_IRUGO | S_IWUSR | S_IWGRP ); @@ -113,14 +113,14 @@ static char *msm_pm_sleep_mode_labels[MSM_PM_SLEEP_MODE_NR] = { "standalone_power_collapse", }; -static bool msm_pm_ldo_retention_enabled = true; +static bool msm_pm_ldo_retention_enabled __refdata = true; static bool msm_no_ramp_down_pc; static struct msm_pm_sleep_status_data *msm_pm_slp_sts; DEFINE_PER_CPU(struct clk *, cpu_clks); static struct clk *l2_clk; static int cpu_count; -static DEFINE_SPINLOCK(cpu_cnt_lock); +static __refdata DEFINE_SPINLOCK(cpu_cnt_lock); #define SCM_HANDOFF_LOCK_ID "S:7" static bool need_scm_handoff_lock; static remote_spinlock_t scm_handoff_lock; @@ -134,7 +134,7 @@ static void __iomem *msm_pc_debug_counters; * Default the l2 flush flag to OFF so the caches are flushed during power * collapse unless the explicitly voted by lpm driver. */ -static enum msm_pm_l2_scm_flag msm_pm_flush_l2_flag = MSM_SCM_L2_OFF; +static enum msm_pm_l2_scm_flag msm_pm_flush_l2_flag __refdata = MSM_SCM_L2_OFF; void msm_pm_set_l2_flush_flag(enum msm_pm_l2_scm_flag flag) { @@ -148,7 +148,7 @@ static enum msm_pm_l2_scm_flag msm_pm_get_l2_flush_flag(void) } static cpumask_t retention_cpus; -static DEFINE_SPINLOCK(retention_lock); +static __refdata DEFINE_SPINLOCK(retention_lock); static int msm_pm_get_pc_mode(struct device_node *node, const char *key, uint32_t *pc_mode_val) @@ -991,7 +991,7 @@ static int msm_cpu_status_probe(struct platform_device *pdev) return 0; }; -static struct of_device_id msm_slp_sts_match_tbl[] = { +static struct of_device_id msm_slp_sts_match_tbl[] __initdata= { {.compatible = "qcom,cpu-sleep-status"}, {}, }; @@ -1005,7 +1005,7 @@ static struct platform_driver msm_cpu_status_driver = { }, }; -static struct of_device_id msm_snoc_clnt_match_tbl[] = { +static struct of_device_id msm_snoc_clnt_match_tbl[] __initdata = { {.compatible = "qcom,pm-snoc-client"}, {}, }; @@ -1272,7 +1272,7 @@ static int msm_cpu_pm_probe(struct platform_device *pdev) return ret; } -static struct of_device_id msm_cpu_pm_table[] = { +static struct of_device_id msm_cpu_pm_table[] __initdata = { {.compatible = "qcom,pm-8x60"}, {}, }; diff --git a/arch/arm/mach-msm/pm-data.c b/arch/arm/mach-msm/pm-data.c index 04f4237a4a8..41038028fd8 100644 --- a/arch/arm/mach-msm/pm-data.c +++ b/arch/arm/mach-msm/pm-data.c @@ -13,7 +13,7 @@ #include "pm.h" -struct msm_pm_platform_data msm_pm_sleep_modes[] = { +struct msm_pm_platform_data msm_pm_sleep_modes[] __refdata = { [MSM_PM_MODE(0, MSM_PM_SLEEP_MODE_POWER_COLLAPSE)] = { .idle_supported = 1, .suspend_supported = 1, diff --git a/arch/arm/mach-msm/rpm-smd.c b/arch/arm/mach-msm/rpm-smd.c index 2a01a3695f6..c95f3dc673e 100644 --- a/arch/arm/mach-msm/rpm-smd.c +++ b/arch/arm/mach-msm/rpm-smd.c @@ -73,7 +73,7 @@ struct msm_rpm_driver_data { #define MAX_ERR_BUFFER_SIZE 128 #define INIT_ERROR 1 -static ATOMIC_NOTIFIER_HEAD(msm_rpm_sleep_notifier); +static __refdata ATOMIC_NOTIFIER_HEAD(msm_rpm_sleep_notifier); static bool standalone; int msm_rpm_register_notifier(struct notifier_block *nb) @@ -314,7 +314,7 @@ static void tr_update(struct slp_buf *s, char *buf) int msm_rpm_smd_buffer_request(char *buf, uint32_t size, gfp_t flag) { struct slp_buf *slp; - static DEFINE_SPINLOCK(slp_buffer_lock); + static __refdata DEFINE_SPINLOCK(slp_buffer_lock); unsigned long flags; if (size > MAX_SLEEP_BUFFER) @@ -452,7 +452,7 @@ struct msm_rpm_wait_data { int errno; struct completion ack; }; -DEFINE_SPINLOCK(msm_rpm_list_lock); +__refdata DEFINE_SPINLOCK(msm_rpm_list_lock); struct msm_rpm_ack_msg { uint32_t req; @@ -1403,7 +1403,7 @@ fail: return -EINVAL; } -static struct of_device_id msm_rpm_match_table[] = { +static struct of_device_id msm_rpm_match_table[] __initdata = { {.compatible = "qcom,rpm-smd"}, {}, }; diff --git a/scripts/gcc-wrapper.py b/scripts/gcc-wrapper.py index f503aa2edf3..4cd0db1f4b6 100755 --- a/scripts/gcc-wrapper.py +++ b/scripts/gcc-wrapper.py @@ -42,6 +42,9 @@ import subprocess allowed_warnings = set([ "return_address.c:62", "hci_conn.c:407", + "cpufreq_interactive.c:804", + "cpufreq_interactive.c:847", + "ene_ub6250.c:2118", ]) # Capture the name of the object file, can find it.