Blackfin arch: Fix BUG - Kernel does not link when CONFIG_CPU_FREQ_STAT=m
to reproduce:
$ make BF537-STAMP_defconfig
$ make menuconfig
CPU Frequency scaling --->
[*] CPU Frequency scaling
<M> CPU frequency translation statistics
$ make
arch/blackfin/mach-common/built-in.o: In function `bfin_target':
arch/blackfin/mach-common/cpufreq.c:(.text+0xf1e): undefined reference to
`cpufreq_frequency_table_target'
arch/blackfin/mach-common/built-in.o: In function `bfin_verify_speed':
arch/blackfin/mach-common/cpufreq.c:(.text+0x1056): undefined reference to
`cpufreq_frequency_table_verify'
arch/blackfin/mach-common/built-in.o: In function `__bfin_cpu_init':
arch/blackfin/mach-common/cpufreq.c:(.init.text+0x554): undefined reference to
`cpufreq_frequency_table_get_attr'
arch/blackfin/mach-common/cpufreq.c:(.init.text+0x56a): undefined reference to
`cpufreq_frequency_table_cpuinfo'
arch/blackfin/mach-common/built-in.o: In function `sys_call_table':
(.data+0x83c): undefined reference to
`cpufreq_freq_attr_scaling_available_freqs'
make: *** [.tmp_vmlinux1] Error 1
Blackfin wants CPU_FREQ_TABLE
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Bryan Wu <cooloney@kernel.org>
Sonic Zhang [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: Fix bug - hardware breakpoint doesn't always work in kgdb
Hardware breakpoint doesn't always work in kgdb. It works at the first
two times, but if you repeatedly trigger that hardware breakpoint, it
would slip over that point once in two times.
Fix it by always setting hw bp skip to 0. gdb does skip after hw bp trap.
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com> Signed-off-by: Bryan Wu <cooloney@kernel.org>
Blackfin arch: Convert Blackfin GPIO driver to use common gpiolib/gpiochip infrastructure
- This patch adds support for ARCH_WANT_OPTIONAL_GPIOLIB.
- It may be changed in future to ARCH_REQUIRE_GPIOLIB.
- Change GPIO_BANK_NUM use DIV_ROUND_UP( , ) macro
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Bryan Wu <cooloney@kernel.org>
Blackfin arch: Cleanup and unify Blackfin IRQ and GPIO IRQ handling
- Remove SSYNC()
- Use irq_to_gpio where applicable
- Remove gpio_edge_triggered bitfield, check irq_desc fields instead.
- Remove gpio_both_edge_triggeredb bitfield, check irq_desc fields
instead.
- Use BITMAP and bitops on gpio_enabled
- Preferably use 32-bit
- Looking at the disassembly this indeed saves quite a few instructions.
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Bryan Wu <cooloney@kernel.org>
Mike Frysinger [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: remove useless SSYNC() in irq priority code
- remove SSYNC() left over from irq init split
- do not force SSYNC() when masking/unmasking IRQs in the SIC
as any order enforced by the hardware should already be enforced
by software
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com> Signed-off-by: Bryan Wu <cooloney@kernel.org>
Bryan Wu [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: fix bug - gpio_bank() macros messed up bank number caculating with positioning a gpio
The whole story:
Before BF51x merged, all the MAX_BLACKFIN_GPIOS are integral multiple of GPIO_BANKSIZE (= 16).
But BF51x provides MAX_BLACKFIN_GPIOS = 40 which includes 3 banks and the 3rd bank has only 8
GPIO pins.
Therefore, gpio_bank() macros is correct when you try to find a GPIO in which bank (GPIO_35 is
in bank 2). But on BF51x gpio_bank(MAX_BLACKFIN_GPIOS) only gives out 2 banks instead of 3
banks for some static array initialization.
This patch add a new macros gpio_bank_n() and GPIO_BANK_NUM to do bank number caculating and
remain the gpio_bank() macros for positioning a gpio in which bank.
Mike Frysinger [Tue, 18 Nov 2008 09:48:22 +0000 (17:48 +0800)]
Blackfin arch: update defconfig file for all boards
- do not bother generating deprecated /sys files by default now since
mdev does not need it
- Don't built-in char sport driver and build it as a module in defconfig
- disable CONFIG_DEVKMEM by default
- enable spi flash driver on boards that have one
- switch config to the NAND platfrom driver rather than the bfin async one
- do not make BFIN_DMA_5XX optional since a large portion of our code relies
on dma functions existing
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com> Signed-off-by: Bryan Wu <cooloney@kernel.org>
Graf Yang [Tue, 28 Oct 2008 06:00:52 +0000 (14:00 +0800)]
Blackfin arch: fix bug - kernel with SMP patch can not bootup
The original code defined _exception_stack but not alloc space for the exception
stack. In exception, this area is over written by exception stack. Common kernel
luckly boot up, but SMP kernel stuck.
Signed-off-by: Graf Yang <graf.yang@analog.com> Signed-off-by: Bryan Wu <cooloney@kernel.org>
Linus Torvalds [Wed, 7 Jan 2009 05:17:57 +0000 (21:17 -0800)]
Fix up 64-bit byte swaps for most 32-bit architectures
The __SWAB_64_THRU_32__ case of a 64-bit byte swap was depending on the
no-longer-existant ___swab32() method (three underscores). We got rid
of some of the worst indirection and complexity, and now it should just
use the 32-bit swab function that was defined right above it.
Reported-and-tested-by: Nicolas Pitre <nico@cam.org> Reported-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Harvey Harrison [Tue, 6 Jan 2009 22:56:21 +0000 (14:56 -0800)]
byteorder: only use linux/swab.h
The first step to make swab.h a regular header that will
include an asm/swab.h with arch overrides.
Avoid the gratuitous differences introduced in the new
linux/swab.h by naming the ___constant_swabXX bits and
__fswabXX bits exactly as found in the old implementation
in byteorder/swab[b].h
Use this new swab.h in byteorder/[big|little]_endian.h and
remove the two old swab headers.
Although the inclusion of asm/byteorder.h looks strange in
linux/swab.h, this will allow each arch to move the actual
arch overrides for the swab bits in an asm file and then
the includes can be cleaned up without requiring a flag day
for all arches at once.
Keep providing __fswabXX in case some userspace was using them
directly, but the revised __swabXX should be used instead in
any new code and will always do constant folding not dependent
on the optimization level, which means the __constant versions
can be phased out in-kernel.
Arches that use the old-style arch macros will lose their
optimized versions until they move to the new style, but at
least they will still compile. Many arches have already moved
and the patches to move the remaining arches are trivial.
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Wed, 7 Jan 2009 02:06:44 +0000 (18:06 -0800)]
Merge branch 'drm-next' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6
* 'drm-next' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied/drm-2.6:
drm: fix ordering of driver unload vs agp unload.
drm/i915: Respect the other stolen memory sizes we know of.
drm/i915: Non-mobile parts don't have integrated TV-out.
drm/i915: Add support for integrated HDMI on G4X hardware.
drm/i915: Pin cursor bo and unpin old bo when setting cursor.
drm/i915: Don't allow objects to get bound while VT switched.
Eric Anholt [Wed, 24 Dec 2008 02:42:32 +0000 (18:42 -0800)]
drm/i915: Don't allow objects to get bound while VT switched.
This avoids a BUG_ON in the enter_vt path due to objects being in the GTT
when we shouldn't have ever let them be (as we're not supposed to touch the
device during that time).
This was triggered by a change in the 2D driver to use the GTT mapping of
objects after pinning them to improve software fallback performance.
Signed-off-by: Eric Anholt <eric@anholt.net> Signed-off-by: Dave Airlie <airlied@linux.ie>
Linus Torvalds [Wed, 7 Jan 2009 01:14:01 +0000 (17:14 -0800)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (29 commits)
Input: i8042 - add Dell Vostro 1510 to nomux list
Input: gtco - use USB endpoint API
Input: add support for Maple controller as a joystick
Input: atkbd - broaden the Dell DMI signatures
Input: HIL drivers - add MODULE_ALIAS()
Input: map_to_7segment.h - convert to __inline__ for userspace
Input: add support for enhanced rotary controller on pxa930 and pxa935
Input: add support for trackball on pxa930 and pxa935
Input: add da9034 touchscreen support
Input: ads7846 - strict_strtoul takes unsigned long
Input: make some variables and functions static
Input: add tsc2007 based touchscreen driver
Input: psmouse - add module parameters to control OLPC touchpad delays
Input: i8042 - add Gigabyte M912 netbook to noloop exception table
Input: atkbd - Samsung NC10 key repeat fix
Input: atkbd - add keyboard quirk for HP Pavilion ZV6100 laptop
Input: libps2 - handle 0xfc responses from devices
Input: add support for Wacom W8001 penabled serial touchscreen
Input: synaptics - report multi-taps only if supported by the device
Input: add joystick driver for Walkera WK-0701 RC transmitter
...
Linus Torvalds [Wed, 7 Jan 2009 01:11:39 +0000 (17:11 -0800)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6:
CRED: Fix regression in cap_capable() as shown up by sys_faccessat() [ver #3]
Revert "CRED: Fix regression in cap_capable() as shown up by sys_faccessat() [ver #2]"
SELinux: shrink sizeof av_inhert selinux_class_perm and context
CRED: Fix regression in cap_capable() as shown up by sys_faccessat() [ver #2]
keys: fix sparse warning by adding __user annotation to cast
smack: Add support for unlabeled network hosts and networks
selinux: Deprecate and schedule the removal of the the compat_net functionality
netlabel: Update kernel configuration API
Linus Torvalds [Wed, 7 Jan 2009 01:10:33 +0000 (17:10 -0800)]
Merge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
sched: fix section mismatch
sched: fix double kfree in failure path
sched: clean up arch_reinit_sched_domains()
sched: mark sched_create_sysfs_power_savings_entries() as __init
getrusage: RUSAGE_THREAD should return ru_utime and ru_stime
sched: fix sched_slice()
sched_clock: prevent scd->clock from moving backwards, take #2
sched: sched.c declare variables before they get used
Linus Torvalds [Wed, 7 Jan 2009 01:10:19 +0000 (17:10 -0800)]
Merge branch 'irq-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'irq-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
genirq: provide irq_to_desc() to non-genirq architectures too
Linus Torvalds [Wed, 7 Jan 2009 01:10:04 +0000 (17:10 -0800)]
Merge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
rcu: fix rcutorture bug
rcu: eliminate synchronize_rcu_xxx macro
rcu: make treercu safe for suspend and resume
rcu: fix rcutree grace-period-latency bug on small systems
futex: catch certain assymetric (get|put)_futex_key calls
futex: make futex_(get|put)_key() calls symmetric
locking, percpu counters: introduce separate lock classes
swiotlb: clean up EXPORT_SYMBOL usage
swiotlb: remove unnecessary declaration
swiotlb: replace architecture-specific swiotlb.h with linux/swiotlb.h
swiotlb: add support for systems with highmem
swiotlb: store phys address in io_tlb_orig_addr array
swiotlb: add hwdev to swiotlb_phys_to_bus() / swiotlb_sg_to_bus()
Linus Torvalds [Wed, 7 Jan 2009 01:09:51 +0000 (17:09 -0800)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
ASoC: Fix SND_SOC_ALL_CODECS handling of dual SPI and I2C control buses
ASoC: Use snd_soc_dapm_nc_pin() in at91sam9g20ek
ASoC: TWL4030: Convert the bitfield enums to VALUE_ENUM type
ASoC: New enum type: value_enum
pxa2xx-ac97: switch AC unit to correct state before probing
ASoC: Clocking fixes for davinci-evm.c
ASoC: Mark non-connected TWL4030 pins for pandora
ASoC: OMAP: Select OMAP pin multiplexing when using Nokia N810 ASoC drivers