1. 12 11月, 2012 2 次提交
  2. 04 11月, 2012 1 次提交
  3. 29 10月, 2012 3 次提交
    • W
      ARM: 7567/1: io: avoid GCC's offsettable addressing modes for halfword accesses · 7629a9f6
      Will Deacon 提交于
      Using the 'o' memory constraint in inline assembly can result in GCC
      generating invalid immediate offsets for memory access instructions with
      reduced addressing capabilities (i.e. smaller than 12-bit immediate
      offsets):
      
        http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54983
      
      As there is no constraint to specify the exact addressing mode we need,
      fallback to using 'Q' exclusively for halfword I/O accesses. This may
      emit an additional add instruction (using an extra register) in order
      to construct the address but it will always be accepted by GAS.
      Reported-by: NBastian Hecht <hechtb@googlemail.com>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      7629a9f6
    • P
      ARM: 7566/1: vfp: fix save and restore when running on pre-VFPv3 and CONFIG_VFPv3 set · 39141ddf
      Paul Walmsley 提交于
      After commit 846a1368 ("ARM: vfp: fix
      saving d16-d31 vfp registers on v6+ kernels"), the OMAP 2430SDP board
      started crashing during boot with omap2plus_defconfig:
      
      [    3.875122] mmcblk0: mmc0:e624 SD04G 3.69 GiB
      [    3.915954]  mmcblk0: p1
      [    4.086639] Internal error: Oops - undefined instruction: 0 [#1] SMP ARM
      [    4.093719] Modules linked in:
      [    4.096954] CPU: 0    Not tainted  (3.6.0-02232-g759e00b8 #570)
      [    4.103149] PC is at vfp_reload_hw+0x1c/0x44
      [    4.107666] LR is at __und_usr_fault_32+0x0/0x8
      
      It turns out that the context save/restore fix unmasked a latent bug
      in commit 5aaf2544 ("ARM: 6203/1: Make
      VFPv3 usable on ARMv6").  When CONFIG_VFPv3 is set, but the kernel is
      booted on a pre-VFPv3 core, the code attempts to save and restore the
      d16-d31 VFP registers.  These are only present on non-D16 VFPv3+, so
      this results in an undefined instruction exception.  The code didn't
      crash before commit 846a1368 because the save and restore code was
      only touching d0-d15, present on all VFP.
      
      Fix by implementing a request from Russell King to add a new HWCAP
      flag that affirmatively indicates the presence of the d16-d31
      registers:
      
         http://marc.info/?l=linux-arm-kernel&m=135013547905283&w=2
      
      and some feedback from Måns to clarify the name of the HWCAP flag.
      Signed-off-by: NPaul Walmsley <paul@pwsan.com>
      Cc: Tony Lindgren <tony@atomide.com>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Dave Martin <dave.martin@linaro.org>
      Cc: Måns Rullgård <mans.rullgard@linaro.org>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      39141ddf
    • F
      ARM: 7565/1: sched: stop sched_clock() during suspend · 6a4dae5e
      Felipe Balbi 2 提交于
      The scheduler imposes a requirement to sched_clock()
      which is to stop the clock during suspend, if we don't
      do that any RT thread will be rescheduled in the future
      which might cause any sort of problems.
      
      This became an issue on OMAP when we converted omap-i2c.c
      to use threaded IRQs, it turned out that depending on how
      much time we spent on suspend, the I2C IRQ thread would
      end up being rescheduled so far in the future that I2C
      transfers would timeout and, because omap_hsmmc depends
      on an I2C-connected device to detect if an MMC card is
      inserted in the slot, our rootfs would just vanish.
      
      arch/arm/kernel/sched_clock.c already had an optional
      implementation (sched_clock_needs_suspend()) which would
      handle scheduler's requirement properly, what this patch
      does is simply to make that implementation non-optional.
      
      Note that this has the side-effect that printk timings
      won't reflect the actual time spent on suspend so other
      methods to measure that will have to be used.
      
      This has been tested with beagleboard XM (OMAP3630) and
      pandaboard rev A3 (OMAP4430). Suspend to RAM is now working
      after this patch.
      
      Thanks to Kevin Hilman for helping out with debugging.
      Acked-by: NKevin Hilman <khilman@ti.com>
      Acked-by: NLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NFelipe Balbi <balbi@ti.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      6a4dae5e
  4. 23 10月, 2012 1 次提交
  5. 22 10月, 2012 2 次提交
    • L
      ARM: 7560/1: SMP_TWD: use DIV_ROUND_CLOSEST() for periodic mode · ad17a26e
      Linus Walleij 提交于
      The periodic mode is currently calculated by a simple division
      but we should pay more attention to our integer arithmetics.
      Also delete a comment that does not make any sense.
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      ad17a26e
    • W
      ARM: 7559/1: smp: switch away from the idmap before updating init_mm.mm_count · 5f40b909
      Will Deacon 提交于
      When booting a secondary CPU, the primary CPU hands two sets of page
      tables via the secondary_data struct:
      
      	(1) swapper_pg_dir: a normal, cacheable, shared (if SMP) mapping
      	    of the kernel image (i.e. the tables used by init_mm).
      
      	(2) idmap_pgd: an uncached mapping of the .idmap.text ELF
      	    section.
      
      The idmap is generally used when enabling and disabling the MMU, which
      includes early CPU boot. In this case, the secondary CPU switches to
      swapper as soon as it enters C code:
      
      	struct mm_struct *mm = &init_mm;
      	unsigned int cpu = smp_processor_id();
      
      	/*
      	 * All kernel threads share the same mm context; grab a
      	 * reference and switch to it.
      	 */
      	atomic_inc(&mm->mm_count);
      	current->active_mm = mm;
      	cpumask_set_cpu(cpu, mm_cpumask(mm));
      	cpu_switch_mm(mm->pgd, mm);
      
      This causes a problem on ARMv7, where the identity mapping is treated as
      strongly-ordered leading to architecturally UNPREDICTABLE behaviour of
      exclusive accesses, such as those used by atomic_inc.
      
      This patch re-orders the secondary_start_kernel function so that we
      switch to swapper before performing any exclusive accesses.
      
      Cc: <stable@vger.kernel.org>
      Cc: David McKay <david.mckay@st.com>
      Reported-by: NGilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      5f40b909
  6. 18 10月, 2012 2 次提交
  7. 14 10月, 2012 2 次提交
    • R
      ARM: config: make sure that platforms are ordered by option string · 93e22567
      Russell King 提交于
      The large platform selection choice should be sorted by option string
      so it's easy to find the platform you're looking for.  Fix the few
      options which are out of this order.
      Acked-by: NTony Lindgren <tony@atomide.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      93e22567
    • R
      ARM: config: sort select statements alphanumerically · b1b3f49c
      Russell King 提交于
      As suggested by Andrew Morton:
      
        This is a pet peeve of mine.  Any time there's a long list of items
        (header file inclusions, kconfig entries, array initalisers, etc) and
        someone wants to add a new item, they *always* go and stick it at the
        end of the list.
      
        Guys, don't do this.  Either put the new item into a randomly-chosen
        position or, probably better, alphanumerically sort the list.
      
      lets sort all our select statements alphanumerically.  This commit was
      created by the following perl:
      
      while (<>) {
      	while (/\\\s*$/) {
      		$_ .= <>;
      	}
      	undef %selects if /^\s*config\s+/;
      	if (/^\s+select\s+(\w+).*/) {
      		if (defined($selects{$1})) {
      			if ($selects{$1} eq $_) {
      				print STDERR "Warning: removing duplicated $1 entry\n";
      			} else {
      				print STDERR "Error: $1 differently selected\n".
      					"\tOld: $selects{$1}\n".
      					"\tNew: $_\n";
      				exit 1;
      			}
      		}
      		$selects{$1} = $_;
      		next;
      	}
      	if (%selects and (/^\s*$/ or /^\s+help/ or /^\s+---help---/ or
      			  /^endif/ or /^endchoice/)) {
      		foreach $k (sort (keys %selects)) {
      			print "$selects{$k}";
      		}
      		undef %selects;
      	}
      	print;
      }
      if (%selects) {
      	foreach $k (sort (keys %selects)) {
      		print "$selects{$k}";
      	}
      }
      
      It found two duplicates:
      
      Warning: removing duplicated S5P_SETUP_MIPIPHY entry
      Warning: removing duplicated HARDIRQS_SW_RESEND entry
      
      and they are identical duplicates, hence the shrinkage in the diffstat
      of two lines.
      
      We have four testers reporting success of this change (Tony, Stephen,
      Linus and Sekhar.)
      Acked-by: NJason Cooper <jason@lakedaemon.net>
      Acked-by: NTony Lindgren <tony@atomide.com>
      Acked-by: NStephen Warren <swarren@nvidia.com>
      Acked-by: NLinus Walleij <linus.walleij@linaro.org>
      Acked-by: NSekhar Nori <nsekhar@ti.com>
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      b1b3f49c
  8. 13 10月, 2012 1 次提交
  9. 12 10月, 2012 1 次提交
  10. 10 10月, 2012 10 次提交
    • J
      pinctrl/nomadik: support other alternate-C functions · c22df08c
      Jean-Nicolas Graux 提交于
      Upgrade nomadik pinctrl driver to enable selection of other
      alternate-C[1-4] functions on some specific ux500 SoC pins.
      Handling of those functions is done thanks to PRCM GPIOCR
      registers. This was previously managed in PRCMU driver and
      it was not really convenient. Idea is to provide a common
      way to control all alternate functions.
      
      Note that this improvement does not support the old-fashioned way
      used to control nomadik pins, namely the "nmk_config_pin()" function
      and its derivatives.
      Signed-off-by: NJean-Nicolas Graux <jean-nicolas.graux@stericsson.com>
      Reviewed-by: NPhilippe Langlais <philippe.langlais@stericsson.com>
      Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
      c22df08c
    • A
      ARM: pxa: armcore: fix PCI PIO warnings · bfbad32a
      Arnd Bergmann 提交于
      The it8152 PCI host used on the pxa/cm_x2xx machines
      uses the old-style I/O window registration. This should
      eventually get converted to pci_ioremap_io() but for
      now, let's cast the IT8152_IO_BASE constant to an integer
      type to get rid of the warnings.
      
      Without this patch, building cm_x2xx_defconfig results in:
      
      arch/arm/common/it8152.c: In function 'it8152_pci_setup':
      arch/arm/common/it8152.c:287:18: warning: assignment makes integer from pointer without a cast [enabled by default]
      arch/arm/common/it8152.c:288:16: warning: assignment makes integer from pointer without a cast [enabled by default]
      arch/arm/common/it8152.c:291:17: warning: assignment makes integer from pointer without a cast [enabled by default]
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NIgor Grinberg <grinberg@compulab.co.il>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: Krzysztof Halasa <khc@pm.waw.pl>
      Cc: Mike Rapoport <mike@compulab.co.il>
      Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
      Cc: Eric Miao <eric.y.miao@gmail.com>
      bfbad32a
    • A
      ARM: warnings in arch/arm/include/asm/uaccess.h · 8e7fc18b
      Arnd Bergmann 提交于
      On NOMMU ARM, the __addr_ok() and __range_ok() macros do not evaluate
      their arguments, which may lead to harmless build warnings in some
      code where the variables are not used otherwise. Adding a cast to void
      gets rid of the warning and does not make any semantic changes.
      
      Without this patch, building at91x40_defconfig results in:
      
      fs/read_write.c: In function 'rw_copy_check_uvector':
      fs/read_write.c:684:9: warning: unused variable 'buf' [-Wunused-variable]
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NGreg Ungerer <gerg@uclinux.org>
      Cc: Russell King <rmk+kernel@arm.linux.org.uk>
      8e7fc18b
    • A
      ARM: binfmt_flat: unused variable 'persistent' · f6d5d8a5
      Arnd Bergmann 提交于
      The flat_get_addr_from_rp() macro does not use the 'persistent' argument
      on ARM, causing a harmless compiler warning. A cast to void removes
      that warning.
      
      Without this patch, building at91x40_defconfig results in:
      
      fs/binfmt_flat.c: In function 'load_flat_file':
      fs/binfmt_flat.c:746:17: warning: unused variable 'persistent' [-Wunused-variable]
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NGreg Ungerer <gerg@uclinux.org>
      Cc: Russell King <rmk+kernel@arm.linux.org.uk>
      Cc: Bryan Wu <bryan.wu@canonical.com>
      f6d5d8a5
    • A
      ARM: be really quiet when building with 'make -s' · edc88ceb
      Arnd Bergmann 提交于
      Sometimes we want the kernel build process to only print messages
      on errors, e.g. in automated build testing. This uses the "kecho"
      macro that the build system provides to hide a few informational
      messages. Nothing changes for a regular "make" or "make V=1".
      
      Without this patch, building any ARM kernel results in:
      
        Kernel: arch/arm/boot/Image is ready
        Kernel: arch/arm/boot/zImage is ready
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NNicolas Pitre <nicolas.pitre@linaro.org>
      Cc: Russell King <rmk+kernel@arm.linux.org.uk>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Michal Marek <mmarek@suse.cz>
      edc88ceb
    • A
      ARM: pass -marm to gcc by default for both C and assembler · 91802a8e
      Arnd Bergmann 提交于
      The Linaro cross toolchain and probably others nowadays default to
      building in THUMB2 mode. When building a kernel for a CPU that does
      not support THUMB2, the compiler complains about incorrect flags.
      We can work around this by setting -marm for all non-T2 builds.
      
      -marm was passed unconditionally for C files previously, but nothing was
      passed to the gcc frontend when processing .S files, resulting in a
      warning.  The assembler never defaults to ARM unless -Wa,-mthumb is
      supplied explicitly, so the files were still assembled correctly.
      
      This patch makes sure that -marm is passed for .S files too, and also
      avoids the redundant gcc -marm -mthumb in Thumb kernels.
      
      Without this patch, building assabet_defconfig results in:
      
      usr/initramfs_data.S:1:0: warning: target CPU does not support THUMB instructions [enabled by default]
      arch/arm/nwfpe/entry.S:1:0: warning: target CPU does not support THUMB instructions [enabled by default]
      firmware/cis/PCMLM28.cis.gen.S:1:0: warning: target CPU does not support THUMB instructions [enabled by default]
      (and many more)
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NNicolas Pitre <nico@linaro.org>
      Acked-by: NDave Martin <dave.martin@linaro.org>
      Cc: Russell King <rmk+kernel@arm.linux.org.uk>
      91802a8e
    • A
      ARM: Xen: fix initial build problems · f880b67d
      Arnd Bergmann 提交于
      * The XEN_BALLOON code requires the balloon infrastructure that is not
        getting built on ARM.
      
      * The tmem hypercall is not available on ARM
      
      * ARMv6 does not support cmpxchg on 16-bit words that are used in the
        Xen grant table code, so we must ensure that Xen support is only
        built on ARMv7-only kernels not combined ARMv6/v7 kernels.
      
      * sys-hypervisor.c needs to include linux/err.h in order to use the
        IS_ERR/PTR_ERR/ERR_PTR family of functions.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NIan Campbell <ian.campbell@citrix.com>
      Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
      Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
      Cc: Jeremy Fitzhardinge <jeremy@goop.org>
      Cc: xen-devel@lists.xensource.com
      f880b67d
    • A
      ARM: export default read_current_timer · f3accb12
      Arnd Bergmann 提交于
      read_current_timer is used by get_cycles since "ARM: 7538/1: delay:
      add registration mechanism for delay timer sources", and get_cycles
      can be used by device drivers in loadable modules, so it has to
      be exported.
      
      Without this patch, building imote2_defconfig fails with
      
      ERROR: "read_current_timer" [crypto/tcrypt.ko] undefined!
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Cc: Stephen Boyd <sboyd@codeaurora.org>
      Cc: Jonathan Austin <jonathan.austin@arm.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: Russell King <rmk+kernel@arm.linux.org.uk>
      f3accb12
    • A
      ARM: Fix another build warning in arch/arm/mm/alignment.c · 31d2a638
      Arnd Bergmann 提交于
      One such warning was recently fixed in a761cebf "ARM: Fix build warning
      in arch/arm/mm/alignment.c" but only for the thumb2 case, this fixes
      the other half.
      
      arch/arm/mm/alignment.c: In function 'do_alignment':
      arch/arm/mm/alignment.c:327:15: error: 'offset.un' may be used uninitialized in this function
      arch/arm/mm/alignment.c:748:21: note: 'offset.un' was declared here
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Cc: Russell King <rmk+kernel@arm.linux.org.uk>
      31d2a638
    • A
      ARM: export set_irq_flags · 05c76982
      Arnd Bergmann 提交于
      The recently added Emma Mobile GPIO driver calls set_irq_flags
      and irq_set_chip_and_handler for the interrupts it exports and
      it can be built as a module, which currently fails with
      
      ERROR: "set_irq_flags" [drivers/gpio/gpio-em.ko] undefined!
      
      We either need to replace the call to set_irq_flags with something
      else or export that function. This patch does the latter.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: Magnus Damm <damm@opensource.se>
      Cc: Linus Walleij <linus.walleij@linaro.org>
      Cc: Rafael J. Wysocki <rjw@sisk.pl>
      Cc: Russell King <rmk+kernel@arm.linux.org.uk>
      05c76982
  11. 09 10月, 2012 15 次提交