forked from luck/tmp_suning_uos_patched
Merge tag 'drm-intel-next-2012-04-23' of git://people.freedesktop.org/~danvet/drm-intel into drm-core-next
Daniel Vetter writes: A new drm-intel-next pull. Highlights: - More gmbus patches from Daniel Kurtz, I think gmbus is now ready, all known issues fixed. - Fencing cleanup and pipelined fencing removal from Chris. - rc6 residency interface from Ben, useful for powertop. - Cleanups and code reorg around the ringbuffer code (Ben&me). - Use hw semaphores in the pageflip code from Ben. - More vlv stuff from Jesse, unfortunately his vlv cpu is doa, so less merged than I've hoped for - we still have the unused function warning :( - More hsw patches from Eugeni, again, not yet enabled fully. - intel_pm.c refactoring from Eugeni. - Ironlake sprite support from Chris. - And various smaller improvements/fixes all over the place. Note that this pull request also contains a backmerge of -rc3 to sort out a few things in -next. I've also had to frob the shortlog a bit to exclude anything that -rc3 brings in with this pull. Regression wise we have a few strange bugs going on, but for all of them closer inspection revealed that they've been pre-existing, just now slightly more likely to be hit. And for most of them we have a patch already. Otherwise QA has not reported any regressions, and I'm also not aware of anything bad happening in 3.4. * tag 'drm-intel-next-2012-04-23' of git://people.freedesktop.org/~danvet/drm-intel: (420 commits) drm/i915: rc6 residency (fix the fix) drm/i915/tv: fix open-coded ARRAY_SIZE. drm/i915: invalidate render cache on gen2 drm/i915: Silence the change of LVDS sync polarity drm/i915: add generic power management initialization drm/i915: move clock gating functionality into intel_pm module drm/i915: move emon functionality into intel_pm module drm/i915: move drps, rps and rc6-related functions to intel_pm drm/i915: fix line breaks in intel_pm drm/i915: move watermarks settings into intel_pm module drm/i915: move fbc-related functionality into intel_pm module drm/i915: Refactor get_fence() to use the common fence writing routine drm/i915: Refactor fence clearing to use the common fence writing routine drm/i915: Refactor put_fence() to use the common fence writing routine drm/i915: Prepare to consolidate fence writing drm/i915: Remove the unsightly "optimisation" from flush_fence() drm/i915: Simplify fence finding drm/i915: Discard the unused obj->last_fenced_ring drm/i915: Remove unused ring->setup_seqno drm/i915: Remove fence pipelining ...
This commit is contained in:
commit
5bc69bf9ae
@ -1,5 +1,5 @@
|
||||
What: /sys/bus/usb/drivers/usbtmc/devices/*/interface_capabilities
|
||||
What: /sys/bus/usb/drivers/usbtmc/devices/*/device_capabilities
|
||||
What: /sys/bus/usb/drivers/usbtmc/*/interface_capabilities
|
||||
What: /sys/bus/usb/drivers/usbtmc/*/device_capabilities
|
||||
Date: August 2008
|
||||
Contact: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
Description:
|
||||
@ -12,8 +12,8 @@ Description:
|
||||
The files are read only.
|
||||
|
||||
|
||||
What: /sys/bus/usb/drivers/usbtmc/devices/*/usb488_interface_capabilities
|
||||
What: /sys/bus/usb/drivers/usbtmc/devices/*/usb488_device_capabilities
|
||||
What: /sys/bus/usb/drivers/usbtmc/*/usb488_interface_capabilities
|
||||
What: /sys/bus/usb/drivers/usbtmc/*/usb488_device_capabilities
|
||||
Date: August 2008
|
||||
Contact: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
Description:
|
||||
@ -27,7 +27,7 @@ Description:
|
||||
The files are read only.
|
||||
|
||||
|
||||
What: /sys/bus/usb/drivers/usbtmc/devices/*/TermChar
|
||||
What: /sys/bus/usb/drivers/usbtmc/*/TermChar
|
||||
Date: August 2008
|
||||
Contact: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
Description:
|
||||
@ -40,7 +40,7 @@ Description:
|
||||
sent to the device or not.
|
||||
|
||||
|
||||
What: /sys/bus/usb/drivers/usbtmc/devices/*/TermCharEnabled
|
||||
What: /sys/bus/usb/drivers/usbtmc/*/TermCharEnabled
|
||||
Date: August 2008
|
||||
Contact: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
Description:
|
||||
@ -51,7 +51,7 @@ Description:
|
||||
published by the USB-IF.
|
||||
|
||||
|
||||
What: /sys/bus/usb/drivers/usbtmc/devices/*/auto_abort
|
||||
What: /sys/bus/usb/drivers/usbtmc/*/auto_abort
|
||||
Date: August 2008
|
||||
Contact: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
Description:
|
||||
|
18
Documentation/ABI/testing/sysfs-block-rssd
Normal file
18
Documentation/ABI/testing/sysfs-block-rssd
Normal file
@ -0,0 +1,18 @@
|
||||
What: /sys/block/rssd*/registers
|
||||
Date: March 2012
|
||||
KernelVersion: 3.3
|
||||
Contact: Asai Thambi S P <asamymuthupa@micron.com>
|
||||
Description: This is a read-only file. Dumps below driver information and
|
||||
hardware registers.
|
||||
- S ACTive
|
||||
- Command Issue
|
||||
- Allocated
|
||||
- Completed
|
||||
- PORT IRQ STAT
|
||||
- HOST IRQ STAT
|
||||
|
||||
What: /sys/block/rssd*/status
|
||||
Date: April 2012
|
||||
KernelVersion: 3.4
|
||||
Contact: Asai Thambi S P <asamymuthupa@micron.com>
|
||||
Description: This is a read-only file. Indicates the status of the device.
|
8
Documentation/ABI/testing/sysfs-cfq-target-latency
Normal file
8
Documentation/ABI/testing/sysfs-cfq-target-latency
Normal file
@ -0,0 +1,8 @@
|
||||
What: /sys/block/<device>/iosched/target_latency
|
||||
Date: March 2012
|
||||
contact: Tao Ma <boyu.mt@taobao.com>
|
||||
Description:
|
||||
The /sys/block/<device>/iosched/target_latency only exists
|
||||
when the user sets cfq to /sys/block/<device>/scheduler.
|
||||
It contains an estimated latency time for the cfq. cfq will
|
||||
use it to calculate the time slice used for every task.
|
@ -34,8 +34,7 @@ Current Status: linux-2.6.34-mmotm(development version of 2010/April)
|
||||
|
||||
Features:
|
||||
- accounting anonymous pages, file caches, swap caches usage and limiting them.
|
||||
- private LRU and reclaim routine. (system's global LRU and private LRU
|
||||
work independently from each other)
|
||||
- pages are linked to per-memcg LRU exclusively, and there is no global LRU.
|
||||
- optionally, memory+swap usage can be accounted and limited.
|
||||
- hierarchical accounting
|
||||
- soft limit
|
||||
@ -154,7 +153,7 @@ updated. page_cgroup has its own LRU on cgroup.
|
||||
2.2.1 Accounting details
|
||||
|
||||
All mapped anon pages (RSS) and cache pages (Page Cache) are accounted.
|
||||
Some pages which are never reclaimable and will not be on the global LRU
|
||||
Some pages which are never reclaimable and will not be on the LRU
|
||||
are not accounted. We just account pages under usual VM management.
|
||||
|
||||
RSS pages are accounted at page_fault unless they've already been accounted
|
||||
|
@ -531,3 +531,11 @@ Why: There appear to be no production users of the get_robust_list syscall,
|
||||
of ASLR. It was only ever intended for debugging, so it should be
|
||||
removed.
|
||||
Who: Kees Cook <keescook@chromium.org>
|
||||
|
||||
----------------------------
|
||||
|
||||
What: setitimer accepts user NULL pointer (value)
|
||||
When: 3.6
|
||||
Why: setitimer is not returning -EFAULT if user pointer is NULL. This
|
||||
violates the spec.
|
||||
Who: Sasikantha Babu <sasikanth.v19@gmail.com>
|
||||
|
@ -114,7 +114,7 @@ members are defined:
|
||||
struct file_system_type {
|
||||
const char *name;
|
||||
int fs_flags;
|
||||
struct dentry (*mount) (struct file_system_type *, int,
|
||||
struct dentry *(*mount) (struct file_system_type *, int,
|
||||
const char *, void *);
|
||||
void (*kill_sb) (struct super_block *);
|
||||
struct module *owner;
|
||||
|
@ -43,7 +43,9 @@ ALC680
|
||||
|
||||
ALC882/883/885/888/889
|
||||
======================
|
||||
N/A
|
||||
acer-aspire-4930g Acer Aspire 4930G/5930G/6530G/6930G/7730G
|
||||
acer-aspire-8930g Acer Aspire 8330G/6935G
|
||||
acer-aspire Acer Aspire others
|
||||
|
||||
ALC861/660
|
||||
==========
|
||||
|
@ -168,6 +168,28 @@ that if the completion handler or anyone else tries to resubmit it
|
||||
they will get a -EPERM error. Thus you can be sure that when
|
||||
usb_kill_urb() returns, the URB is totally idle.
|
||||
|
||||
There is a lifetime issue to consider. An URB may complete at any
|
||||
time, and the completion handler may free the URB. If this happens
|
||||
while usb_unlink_urb or usb_kill_urb is running, it will cause a
|
||||
memory-access violation. The driver is responsible for avoiding this,
|
||||
which often means some sort of lock will be needed to prevent the URB
|
||||
from being deallocated while it is still in use.
|
||||
|
||||
On the other hand, since usb_unlink_urb may end up calling the
|
||||
completion handler, the handler must not take any lock that is held
|
||||
when usb_unlink_urb is invoked. The general solution to this problem
|
||||
is to increment the URB's reference count while holding the lock, then
|
||||
drop the lock and call usb_unlink_urb or usb_kill_urb, and then
|
||||
decrement the URB's reference count. You increment the reference
|
||||
count by calling
|
||||
|
||||
struct urb *usb_get_urb(struct urb *urb)
|
||||
|
||||
(ignore the return value; it is the same as the argument) and
|
||||
decrement the reference count by calling usb_free_urb. Of course,
|
||||
none of this is necessary if there's no danger of the URB being freed
|
||||
by the completion handler.
|
||||
|
||||
|
||||
1.7. What about the completion handler?
|
||||
|
||||
|
@ -183,10 +183,10 @@ An input control transfer to get a port status.
|
||||
d5ea89a0 3575914555 S Ci:1:001:0 s a3 00 0000 0003 0004 4 <
|
||||
d5ea89a0 3575914560 C Ci:1:001:0 0 4 = 01050000
|
||||
|
||||
An output bulk transfer to send a SCSI command 0x5E in a 31-byte Bulk wrapper
|
||||
to a storage device at address 5:
|
||||
An output bulk transfer to send a SCSI command 0x28 (READ_10) in a 31-byte
|
||||
Bulk wrapper to a storage device at address 5:
|
||||
|
||||
dd65f0e8 4128379752 S Bo:1:005:2 -115 31 = 55534243 5e000000 00000000 00000600 00000000 00000000 00000000 000000
|
||||
dd65f0e8 4128379752 S Bo:1:005:2 -115 31 = 55534243 ad000000 00800000 80010a28 20000000 20000040 00000000 000000
|
||||
dd65f0e8 4128379808 C Bo:1:005:2 0 31 >
|
||||
|
||||
* Raw binary format and API
|
||||
|
21
MAINTAINERS
21
MAINTAINERS
@ -1521,8 +1521,8 @@ M: Gustavo Padovan <gustavo@padovan.org>
|
||||
M: Johan Hedberg <johan.hedberg@gmail.com>
|
||||
L: linux-bluetooth@vger.kernel.org
|
||||
W: http://www.bluez.org/
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/padovan/bluetooth.git
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/jh/bluetooth.git
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth.git
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git
|
||||
S: Maintained
|
||||
F: drivers/bluetooth/
|
||||
|
||||
@ -1532,8 +1532,8 @@ M: Gustavo Padovan <gustavo@padovan.org>
|
||||
M: Johan Hedberg <johan.hedberg@gmail.com>
|
||||
L: linux-bluetooth@vger.kernel.org
|
||||
W: http://www.bluez.org/
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/padovan/bluetooth.git
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/jh/bluetooth.git
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth.git
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git
|
||||
S: Maintained
|
||||
F: net/bluetooth/
|
||||
F: include/net/bluetooth/
|
||||
@ -4533,8 +4533,7 @@ S: Supported
|
||||
F: drivers/net/ethernet/myricom/myri10ge/
|
||||
|
||||
NATSEMI ETHERNET DRIVER (DP8381x)
|
||||
M: Tim Hockin <thockin@hockin.org>
|
||||
S: Maintained
|
||||
S: Orphan
|
||||
F: drivers/net/ethernet/natsemi/natsemi.c
|
||||
|
||||
NATIVE INSTRUMENTS USB SOUND INTERFACE DRIVER
|
||||
@ -4803,6 +4802,7 @@ F: arch/arm/mach-omap2/clockdomain2xxx_3xxx.c
|
||||
F: arch/arm/mach-omap2/clockdomain44xx.c
|
||||
|
||||
OMAP AUDIO SUPPORT
|
||||
M: Peter Ujfalusi <peter.ujfalusi@ti.com>
|
||||
M: Jarkko Nikula <jarkko.nikula@bitmer.com>
|
||||
L: alsa-devel@alsa-project.org (subscribers-only)
|
||||
L: linux-omap@vger.kernel.org
|
||||
@ -5117,6 +5117,11 @@ F: drivers/i2c/busses/i2c-pca-*
|
||||
F: include/linux/i2c-algo-pca.h
|
||||
F: include/linux/i2c-pca-platform.h
|
||||
|
||||
PCDP - PRIMARY CONSOLE AND DEBUG PORT
|
||||
M: Khalid Aziz <khalid.aziz@hp.com>
|
||||
S: Maintained
|
||||
F: drivers/firmware/pcdp.*
|
||||
|
||||
PCI ERROR RECOVERY
|
||||
M: Linas Vepstas <linasvepstas@gmail.com>
|
||||
L: linux-pci@vger.kernel.org
|
||||
@ -6466,6 +6471,7 @@ S: Odd Fixes
|
||||
F: drivers/staging/olpc_dcon/
|
||||
|
||||
STAGING - OZMO DEVICES USB OVER WIFI DRIVER
|
||||
M: Rupesh Gujare <rgujare@ozmodevices.com>
|
||||
M: Chris Kelly <ckelly@ozmodevices.com>
|
||||
S: Maintained
|
||||
F: drivers/staging/ozwpan/
|
||||
@ -7461,8 +7467,7 @@ F: include/linux/wm97xx.h
|
||||
|
||||
WOLFSON MICROELECTRONICS DRIVERS
|
||||
M: Mark Brown <broonie@opensource.wolfsonmicro.com>
|
||||
M: Ian Lartey <ian@opensource.wolfsonmicro.com>
|
||||
M: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
|
||||
L: patches@opensource.wolfsonmicro.com
|
||||
T: git git://opensource.wolfsonmicro.com/linux-2.6-asoc
|
||||
T: git git://opensource.wolfsonmicro.com/linux-2.6-audioplus
|
||||
W: http://opensource.wolfsonmicro.com/content/linux-drivers-wolfson-devices
|
||||
|
2
Makefile
2
Makefile
@ -1,7 +1,7 @@
|
||||
VERSION = 3
|
||||
PATCHLEVEL = 4
|
||||
SUBLEVEL = 0
|
||||
EXTRAVERSION = -rc2
|
||||
EXTRAVERSION = -rc3
|
||||
NAME = Saber-toothed Squirrel
|
||||
|
||||
# *DOCUMENTATION*
|
||||
|
@ -3,6 +3,7 @@
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <asm/barrier.h>
|
||||
#include <asm/cmpxchg.h>
|
||||
|
||||
/*
|
||||
* Atomic operations that C can't guarantee us. Useful for
|
||||
@ -168,73 +169,6 @@ static __inline__ long atomic64_sub_return(long i, atomic64_t * v)
|
||||
return result;
|
||||
}
|
||||
|
||||
/*
|
||||
* Atomic exchange routines.
|
||||
*/
|
||||
|
||||
#define __ASM__MB
|
||||
#define ____xchg(type, args...) __xchg ## type ## _local(args)
|
||||
#define ____cmpxchg(type, args...) __cmpxchg ## type ## _local(args)
|
||||
#include <asm/xchg.h>
|
||||
|
||||
#define xchg_local(ptr,x) \
|
||||
({ \
|
||||
__typeof__(*(ptr)) _x_ = (x); \
|
||||
(__typeof__(*(ptr))) __xchg_local((ptr), (unsigned long)_x_, \
|
||||
sizeof(*(ptr))); \
|
||||
})
|
||||
|
||||
#define cmpxchg_local(ptr, o, n) \
|
||||
({ \
|
||||
__typeof__(*(ptr)) _o_ = (o); \
|
||||
__typeof__(*(ptr)) _n_ = (n); \
|
||||
(__typeof__(*(ptr))) __cmpxchg_local((ptr), (unsigned long)_o_, \
|
||||
(unsigned long)_n_, \
|
||||
sizeof(*(ptr))); \
|
||||
})
|
||||
|
||||
#define cmpxchg64_local(ptr, o, n) \
|
||||
({ \
|
||||
BUILD_BUG_ON(sizeof(*(ptr)) != 8); \
|
||||
cmpxchg_local((ptr), (o), (n)); \
|
||||
})
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
#undef __ASM__MB
|
||||
#define __ASM__MB "\tmb\n"
|
||||
#endif
|
||||
#undef ____xchg
|
||||
#undef ____cmpxchg
|
||||
#define ____xchg(type, args...) __xchg ##type(args)
|
||||
#define ____cmpxchg(type, args...) __cmpxchg ##type(args)
|
||||
#include <asm/xchg.h>
|
||||
|
||||
#define xchg(ptr,x) \
|
||||
({ \
|
||||
__typeof__(*(ptr)) _x_ = (x); \
|
||||
(__typeof__(*(ptr))) __xchg((ptr), (unsigned long)_x_, \
|
||||
sizeof(*(ptr))); \
|
||||
})
|
||||
|
||||
#define cmpxchg(ptr, o, n) \
|
||||
({ \
|
||||
__typeof__(*(ptr)) _o_ = (o); \
|
||||
__typeof__(*(ptr)) _n_ = (n); \
|
||||
(__typeof__(*(ptr))) __cmpxchg((ptr), (unsigned long)_o_, \
|
||||
(unsigned long)_n_, sizeof(*(ptr)));\
|
||||
})
|
||||
|
||||
#define cmpxchg64(ptr, o, n) \
|
||||
({ \
|
||||
BUILD_BUG_ON(sizeof(*(ptr)) != 8); \
|
||||
cmpxchg((ptr), (o), (n)); \
|
||||
})
|
||||
|
||||
#undef __ASM__MB
|
||||
#undef ____cmpxchg
|
||||
|
||||
#define __HAVE_ARCH_CMPXCHG 1
|
||||
|
||||
#define atomic64_cmpxchg(v, old, new) (cmpxchg(&((v)->counter), old, new))
|
||||
#define atomic64_xchg(v, new) (xchg(&((v)->counter), new))
|
||||
|
||||
|
71
arch/alpha/include/asm/cmpxchg.h
Normal file
71
arch/alpha/include/asm/cmpxchg.h
Normal file
@ -0,0 +1,71 @@
|
||||
#ifndef _ALPHA_CMPXCHG_H
|
||||
#define _ALPHA_CMPXCHG_H
|
||||
|
||||
/*
|
||||
* Atomic exchange routines.
|
||||
*/
|
||||
|
||||
#define __ASM__MB
|
||||
#define ____xchg(type, args...) __xchg ## type ## _local(args)
|
||||
#define ____cmpxchg(type, args...) __cmpxchg ## type ## _local(args)
|
||||
#include <asm/xchg.h>
|
||||
|
||||
#define xchg_local(ptr, x) \
|
||||
({ \
|
||||
__typeof__(*(ptr)) _x_ = (x); \
|
||||
(__typeof__(*(ptr))) __xchg_local((ptr), (unsigned long)_x_, \
|
||||
sizeof(*(ptr))); \
|
||||
})
|
||||
|
||||
#define cmpxchg_local(ptr, o, n) \
|
||||
({ \
|
||||
__typeof__(*(ptr)) _o_ = (o); \
|
||||
__typeof__(*(ptr)) _n_ = (n); \
|
||||
(__typeof__(*(ptr))) __cmpxchg_local((ptr), (unsigned long)_o_, \
|
||||
(unsigned long)_n_, \
|
||||
sizeof(*(ptr))); \
|
||||
})
|
||||
|
||||
#define cmpxchg64_local(ptr, o, n) \
|
||||
({ \
|
||||
BUILD_BUG_ON(sizeof(*(ptr)) != 8); \
|
||||
cmpxchg_local((ptr), (o), (n)); \
|
||||
})
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
#undef __ASM__MB
|
||||
#define __ASM__MB "\tmb\n"
|
||||
#endif
|
||||
#undef ____xchg
|
||||
#undef ____cmpxchg
|
||||
#define ____xchg(type, args...) __xchg ##type(args)
|
||||
#define ____cmpxchg(type, args...) __cmpxchg ##type(args)
|
||||
#include <asm/xchg.h>
|
||||
|
||||
#define xchg(ptr, x) \
|
||||
({ \
|
||||
__typeof__(*(ptr)) _x_ = (x); \
|
||||
(__typeof__(*(ptr))) __xchg((ptr), (unsigned long)_x_, \
|
||||
sizeof(*(ptr))); \
|
||||
})
|
||||
|
||||
#define cmpxchg(ptr, o, n) \
|
||||
({ \
|
||||
__typeof__(*(ptr)) _o_ = (o); \
|
||||
__typeof__(*(ptr)) _n_ = (n); \
|
||||
(__typeof__(*(ptr))) __cmpxchg((ptr), (unsigned long)_o_, \
|
||||
(unsigned long)_n_, sizeof(*(ptr)));\
|
||||
})
|
||||
|
||||
#define cmpxchg64(ptr, o, n) \
|
||||
({ \
|
||||
BUILD_BUG_ON(sizeof(*(ptr)) != 8); \
|
||||
cmpxchg((ptr), (o), (n)); \
|
||||
})
|
||||
|
||||
#undef __ASM__MB
|
||||
#undef ____cmpxchg
|
||||
|
||||
#define __HAVE_ARCH_CMPXCHG 1
|
||||
|
||||
#endif /* _ALPHA_CMPXCHG_H */
|
@ -1,10 +1,10 @@
|
||||
#ifndef _ALPHA_ATOMIC_H
|
||||
#ifndef _ALPHA_CMPXCHG_H
|
||||
#error Do not include xchg.h directly!
|
||||
#else
|
||||
/*
|
||||
* xchg/xchg_local and cmpxchg/cmpxchg_local share the same code
|
||||
* except that local version do not have the expensive memory barrier.
|
||||
* So this file is included twice from asm/system.h.
|
||||
* So this file is included twice from asm/cmpxchg.h.
|
||||
*/
|
||||
|
||||
/*
|
||||
|
@ -77,6 +77,8 @@ int atags_to_fdt(void *atag_list, void *fdt, int total_space)
|
||||
} else if (atag->hdr.tag == ATAG_MEM) {
|
||||
if (memcount >= sizeof(mem_reg_property)/4)
|
||||
continue;
|
||||
if (!atag->u.mem.size)
|
||||
continue;
|
||||
mem_reg_property[memcount++] = cpu_to_fdt32(atag->u.mem.start);
|
||||
mem_reg_property[memcount++] = cpu_to_fdt32(atag->u.mem.size);
|
||||
} else if (atag->hdr.tag == ATAG_INITRD2) {
|
||||
|
@ -273,7 +273,7 @@ restart: adr r0, LC0
|
||||
add r0, r0, #0x100
|
||||
mov r1, r6
|
||||
sub r2, sp, r6
|
||||
blne atags_to_fdt
|
||||
bleq atags_to_fdt
|
||||
|
||||
ldmfd sp!, {r0-r3, ip, lr}
|
||||
sub sp, sp, #0x10000
|
||||
|
@ -55,7 +55,6 @@ aic: interrupt-controller@fffff000 {
|
||||
#interrupt-cells = <2>;
|
||||
compatible = "atmel,at91rm9200-aic";
|
||||
interrupt-controller;
|
||||
interrupt-parent;
|
||||
reg = <0xfffff000 0x200>;
|
||||
};
|
||||
|
||||
|
@ -56,7 +56,6 @@ aic: interrupt-controller@fffff000 {
|
||||
#interrupt-cells = <2>;
|
||||
compatible = "atmel,at91rm9200-aic";
|
||||
interrupt-controller;
|
||||
interrupt-parent;
|
||||
reg = <0xfffff000 0x200>;
|
||||
};
|
||||
|
||||
|
@ -54,7 +54,6 @@ aic: interrupt-controller@fffff000 {
|
||||
#interrupt-cells = <2>;
|
||||
compatible = "atmel,at91rm9200-aic";
|
||||
interrupt-controller;
|
||||
interrupt-parent;
|
||||
reg = <0xfffff000 0x200>;
|
||||
};
|
||||
|
||||
|
@ -24,7 +24,6 @@ intc: interrupt-controller@a0411000 {
|
||||
#interrupt-cells = <3>;
|
||||
#address-cells = <1>;
|
||||
interrupt-controller;
|
||||
interrupt-parent;
|
||||
reg = <0xa0411000 0x1000>,
|
||||
<0xa0410100 0x100>;
|
||||
};
|
||||
|
@ -89,7 +89,6 @@ intc: interrupt-controller@fff11000 {
|
||||
#size-cells = <0>;
|
||||
#address-cells = <1>;
|
||||
interrupt-controller;
|
||||
interrupt-parent;
|
||||
reg = <0xfff11000 0x1000>,
|
||||
<0xfff10100 0x100>;
|
||||
};
|
||||
|
@ -427,19 +427,18 @@ int __init vic_of_init(struct device_node *node, struct device_node *parent)
|
||||
|
||||
/*
|
||||
* Handle each interrupt in a single VIC. Returns non-zero if we've
|
||||
* handled at least one interrupt. This does a single read of the
|
||||
* status register and handles all interrupts in order from LSB first.
|
||||
* handled at least one interrupt. This reads the status register
|
||||
* before handling each interrupt, which is necessary given that
|
||||
* handle_IRQ may briefly re-enable interrupts for soft IRQ handling.
|
||||
*/
|
||||
static int handle_one_vic(struct vic_device *vic, struct pt_regs *regs)
|
||||
{
|
||||
u32 stat, irq;
|
||||
int handled = 0;
|
||||
|
||||
stat = readl_relaxed(vic->base + VIC_IRQ_STATUS);
|
||||
while (stat) {
|
||||
while ((stat = readl_relaxed(vic->base + VIC_IRQ_STATUS))) {
|
||||
irq = ffs(stat) - 1;
|
||||
handle_IRQ(irq_find_mapping(vic->domain, irq), regs);
|
||||
stat &= ~(1 << irq);
|
||||
handled = 1;
|
||||
}
|
||||
|
||||
|
@ -14,7 +14,7 @@
|
||||
#define JUMP_LABEL_NOP "nop"
|
||||
#endif
|
||||
|
||||
static __always_inline bool arch_static_branch(struct jump_label_key *key)
|
||||
static __always_inline bool arch_static_branch(struct static_key *key)
|
||||
{
|
||||
asm goto("1:\n\t"
|
||||
JUMP_LABEL_NOP "\n\t"
|
||||
|
@ -523,7 +523,21 @@ int __init arm_add_memory(phys_addr_t start, unsigned long size)
|
||||
*/
|
||||
size -= start & ~PAGE_MASK;
|
||||
bank->start = PAGE_ALIGN(start);
|
||||
bank->size = size & PAGE_MASK;
|
||||
|
||||
#ifndef CONFIG_LPAE
|
||||
if (bank->start + size < bank->start) {
|
||||
printk(KERN_CRIT "Truncating memory at 0x%08llx to fit in "
|
||||
"32-bit physical address space\n", (long long)start);
|
||||
/*
|
||||
* To ensure bank->start + bank->size is representable in
|
||||
* 32 bits, we use ULONG_MAX as the upper limit rather than 4GB.
|
||||
* This means we lose a page after masking.
|
||||
*/
|
||||
size = ULONG_MAX - bank->start;
|
||||
}
|
||||
#endif
|
||||
|
||||
bank->size = size & PAGE_MASK;
|
||||
|
||||
/*
|
||||
* Check whether this memory region has non-zero size or
|
||||
|
@ -118,10 +118,14 @@ static int twd_cpufreq_transition(struct notifier_block *nb,
|
||||
* The twd clock events must be reprogrammed to account for the new
|
||||
* frequency. The timer is local to a cpu, so cross-call to the
|
||||
* changing cpu.
|
||||
*
|
||||
* Only wait for it to finish, if the cpu is active to avoid
|
||||
* deadlock when cpu1 is spinning on while(!cpu_active(cpu1)) during
|
||||
* booting of that cpu.
|
||||
*/
|
||||
if (state == CPUFREQ_POSTCHANGE || state == CPUFREQ_RESUMECHANGE)
|
||||
smp_call_function_single(freqs->cpu, twd_update_frequency,
|
||||
NULL, 1);
|
||||
NULL, cpu_active(freqs->cpu));
|
||||
|
||||
return NOTIFY_OK;
|
||||
}
|
||||
|
@ -368,6 +368,7 @@ comment "Flattened Device Tree based board for EXYNOS SoCs"
|
||||
|
||||
config MACH_EXYNOS4_DT
|
||||
bool "Samsung Exynos4 Machine using device tree"
|
||||
depends on ARCH_EXYNOS4
|
||||
select CPU_EXYNOS4210
|
||||
select USE_OF
|
||||
select ARM_AMBA
|
||||
@ -380,6 +381,7 @@ config MACH_EXYNOS4_DT
|
||||
|
||||
config MACH_EXYNOS5_DT
|
||||
bool "SAMSUNG EXYNOS5 Machine using device tree"
|
||||
depends on ARCH_EXYNOS5
|
||||
select SOC_EXYNOS5250
|
||||
select USE_OF
|
||||
select ARM_AMBA
|
||||
|
@ -212,6 +212,8 @@
|
||||
#define IRQ_MFC EXYNOS4_IRQ_MFC
|
||||
#define IRQ_SDO EXYNOS4_IRQ_SDO
|
||||
|
||||
#define IRQ_I2S0 EXYNOS4_IRQ_I2S0
|
||||
|
||||
#define IRQ_ADC EXYNOS4_IRQ_ADC0
|
||||
#define IRQ_TC EXYNOS4_IRQ_PEN0
|
||||
|
||||
|
@ -89,6 +89,10 @@
|
||||
#define EXYNOS4_PA_MDMA1 0x12840000
|
||||
#define EXYNOS4_PA_PDMA0 0x12680000
|
||||
#define EXYNOS4_PA_PDMA1 0x12690000
|
||||
#define EXYNOS5_PA_MDMA0 0x10800000
|
||||
#define EXYNOS5_PA_MDMA1 0x11C10000
|
||||
#define EXYNOS5_PA_PDMA0 0x121A0000
|
||||
#define EXYNOS5_PA_PDMA1 0x121B0000
|
||||
|
||||
#define EXYNOS4_PA_SYSMMU_MDMA 0x10A40000
|
||||
#define EXYNOS4_PA_SYSMMU_SSS 0x10A50000
|
||||
|
@ -255,9 +255,15 @@
|
||||
|
||||
/* For EXYNOS5250 */
|
||||
|
||||
#define EXYNOS5_APLL_LOCK EXYNOS_CLKREG(0x00000)
|
||||
#define EXYNOS5_APLL_CON0 EXYNOS_CLKREG(0x00100)
|
||||
#define EXYNOS5_CLKSRC_CPU EXYNOS_CLKREG(0x00200)
|
||||
#define EXYNOS5_CLKMUX_STATCPU EXYNOS_CLKREG(0x00400)
|
||||
#define EXYNOS5_CLKDIV_CPU0 EXYNOS_CLKREG(0x00500)
|
||||
#define EXYNOS5_CLKDIV_CPU1 EXYNOS_CLKREG(0x00504)
|
||||
#define EXYNOS5_CLKDIV_STATCPU0 EXYNOS_CLKREG(0x00600)
|
||||
#define EXYNOS5_CLKDIV_STATCPU1 EXYNOS_CLKREG(0x00604)
|
||||
|
||||
#define EXYNOS5_MPLL_CON0 EXYNOS_CLKREG(0x04100)
|
||||
#define EXYNOS5_CLKSRC_CORE1 EXYNOS_CLKREG(0x04204)
|
||||
|
||||
|
@ -45,7 +45,7 @@ static const struct of_dev_auxdata exynos5250_auxdata_lookup[] __initconst = {
|
||||
"exynos4210-uart.3", NULL),
|
||||
OF_DEV_AUXDATA("arm,pl330", EXYNOS5_PA_PDMA0, "dma-pl330.0", NULL),
|
||||
OF_DEV_AUXDATA("arm,pl330", EXYNOS5_PA_PDMA1, "dma-pl330.1", NULL),
|
||||
OF_DEV_AUXDATA("arm,pl330", EXYNOS5_PA_PDMA1, "dma-pl330.2", NULL),
|
||||
OF_DEV_AUXDATA("arm,pl330", EXYNOS5_PA_MDMA1, "dma-pl330.2", NULL),
|
||||
{},
|
||||
};
|
||||
|
||||
|
@ -307,49 +307,7 @@ static struct i2c_board_info i2c1_devs[] __initdata = {
|
||||
};
|
||||
|
||||
/* TSP */
|
||||
static u8 mxt_init_vals[] = {
|
||||
/* MXT_GEN_COMMAND(6) */
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
/* MXT_GEN_POWER(7) */
|
||||
0x20, 0xff, 0x32,
|
||||
/* MXT_GEN_ACQUIRE(8) */
|
||||
0x0a, 0x00, 0x05, 0x00, 0x00, 0x00, 0x09, 0x23,
|
||||
/* MXT_TOUCH_MULTI(9) */
|
||||
0x00, 0x00, 0x00, 0x13, 0x0b, 0x00, 0x00, 0x00, 0x02, 0x00,
|
||||
0x00, 0x01, 0x01, 0x0e, 0x0a, 0x0a, 0x0a, 0x0a, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00,
|
||||
/* MXT_TOUCH_KEYARRAY(15) */
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00,
|
||||
0x00,
|
||||
/* MXT_SPT_GPIOPWM(19) */
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
/* MXT_PROCI_GRIPFACE(20) */
|
||||
0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x28, 0x04,
|
||||
0x0f, 0x0a,
|
||||
/* MXT_PROCG_NOISE(22) */
|
||||
0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x23, 0x00,
|
||||
0x00, 0x05, 0x0f, 0x19, 0x23, 0x2d, 0x03,
|
||||
/* MXT_TOUCH_PROXIMITY(23) */
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
/* MXT_PROCI_ONETOUCH(24) */
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
/* MXT_SPT_SELFTEST(25) */
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00,
|
||||
/* MXT_PROCI_TWOTOUCH(27) */
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
/* MXT_SPT_CTECONFIG(28) */
|
||||
0x00, 0x00, 0x02, 0x08, 0x10, 0x00,
|
||||
};
|
||||
|
||||
static struct mxt_platform_data mxt_platform_data = {
|
||||
.config = mxt_init_vals,
|
||||
.config_length = ARRAY_SIZE(mxt_init_vals),
|
||||
|
||||
.x_line = 18,
|
||||
.y_line = 11,
|
||||
.x_size = 1024,
|
||||
@ -571,7 +529,7 @@ static struct regulator_init_data __initdata max8997_ldo7_data = {
|
||||
|
||||
static struct regulator_init_data __initdata max8997_ldo8_data = {
|
||||
.constraints = {
|
||||
.name = "VUSB/VDAC_3.3V_C210",
|
||||
.name = "VUSB+VDAC_3.3V_C210",
|
||||
.min_uV = 3300000,
|
||||
.max_uV = 3300000,
|
||||
.valid_ops_mask = REGULATOR_CHANGE_STATUS,
|
||||
@ -1347,6 +1305,7 @@ static struct platform_device *nuri_devices[] __initdata = {
|
||||
|
||||
static void __init nuri_map_io(void)
|
||||
{
|
||||
clk_xusbxti.rate = 24000000;
|
||||
exynos_init_io(NULL, 0);
|
||||
s3c24xx_init_clocks(24000000);
|
||||
s3c24xx_init_uarts(nuri_uartcfgs, ARRAY_SIZE(nuri_uartcfgs));
|
||||
@ -1379,7 +1338,6 @@ static void __init nuri_machine_init(void)
|
||||
nuri_camera_init();
|
||||
|
||||
nuri_ehci_init();
|
||||
clk_xusbxti.rate = 24000000;
|
||||
|
||||
/* Last */
|
||||
platform_add_devices(nuri_devices, ARRAY_SIZE(nuri_devices));
|
||||
|
@ -29,6 +29,7 @@
|
||||
#include <asm/mach-types.h>
|
||||
|
||||
#include <plat/regs-serial.h>
|
||||
#include <plat/clock.h>
|
||||
#include <plat/cpu.h>
|
||||
#include <plat/devs.h>
|
||||
#include <plat/iic.h>
|
||||
@ -1057,6 +1058,7 @@ static struct platform_device *universal_devices[] __initdata = {
|
||||
|
||||
static void __init universal_map_io(void)
|
||||
{
|
||||
clk_xusbxti.rate = 24000000;
|
||||
exynos_init_io(NULL, 0);
|
||||
s3c24xx_init_clocks(24000000);
|
||||
s3c24xx_init_uarts(universal_uartcfgs, ARRAY_SIZE(universal_uartcfgs));
|
||||
|
@ -86,9 +86,6 @@ static void __init halibut_init(void)
|
||||
static void __init halibut_fixup(struct tag *tags, char **cmdline,
|
||||
struct meminfo *mi)
|
||||
{
|
||||
mi->nr_banks=1;
|
||||
mi->bank[0].start = PHYS_OFFSET;
|
||||
mi->bank[0].size = (101*1024*1024);
|
||||
}
|
||||
|
||||
static void __init halibut_map_io(void)
|
||||
|
@ -12,6 +12,7 @@
|
||||
|
||||
#include <asm/io.h>
|
||||
#include <asm/mach-types.h>
|
||||
#include <asm/system_info.h>
|
||||
|
||||
#include <mach/msm_fb.h>
|
||||
#include <mach/vreg.h>
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/clkdev.h>
|
||||
|
||||
#include <asm/system_info.h>
|
||||
#include <asm/mach-types.h>
|
||||
#include <asm/mach/arch.h>
|
||||
#include <asm/mach/map.h>
|
||||
|
@ -121,7 +121,7 @@ int msm_proc_comm(unsigned cmd, unsigned *data1, unsigned *data2)
|
||||
* and unknown state. This function should be called early to
|
||||
* wait on the ARM9.
|
||||
*/
|
||||
void __init proc_comm_boot_wait(void)
|
||||
void __devinit proc_comm_boot_wait(void)
|
||||
{
|
||||
void __iomem *base = MSM_SHARED_RAM_BASE;
|
||||
|
||||
|
@ -165,83 +165,3 @@ int omap2_select_table_rate(struct clk *clk, unsigned long rate)
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_CPU_FREQ
|
||||
/*
|
||||
* Walk PRCM rate table and fillout cpufreq freq_table
|
||||
* XXX This should be replaced by an OPP layer in the near future
|
||||
*/
|
||||
static struct cpufreq_frequency_table *freq_table;
|
||||
|
||||
void omap2_clk_init_cpufreq_table(struct cpufreq_frequency_table **table)
|
||||
{
|
||||
const struct prcm_config *prcm;
|
||||
int i = 0;
|
||||
int tbl_sz = 0;
|
||||
|
||||
if (!cpu_is_omap24xx())
|
||||
return;
|
||||
|
||||
for (prcm = rate_table; prcm->mpu_speed; prcm++) {
|
||||
if (!(prcm->flags & cpu_mask))
|
||||
continue;
|
||||
if (prcm->xtal_speed != sclk->rate)
|
||||
continue;
|
||||
|
||||
/* don't put bypass rates in table */
|
||||
if (prcm->dpll_speed == prcm->xtal_speed)
|
||||
continue;
|
||||
|
||||
tbl_sz++;
|
||||
}
|
||||
|
||||
/*
|
||||
* XXX Ensure that we're doing what CPUFreq expects for this error
|
||||
* case and the following one
|
||||
*/
|
||||
if (tbl_sz == 0) {
|
||||
pr_warning("%s: no matching entries in rate_table\n",
|
||||
__func__);
|
||||
return;
|
||||
}
|
||||
|
||||
/* Include the CPUFREQ_TABLE_END terminator entry */
|
||||
tbl_sz++;
|
||||
|
||||
freq_table = kzalloc(sizeof(struct cpufreq_frequency_table) * tbl_sz,
|
||||
GFP_ATOMIC);
|
||||
if (!freq_table) {
|
||||
pr_err("%s: could not kzalloc frequency table\n", __func__);
|
||||
return;
|
||||
}
|
||||
|
||||
for (prcm = rate_table; prcm->mpu_speed; prcm++) {
|
||||
if (!(prcm->flags & cpu_mask))
|
||||
continue;
|
||||
if (prcm->xtal_speed != sclk->rate)
|
||||
continue;
|
||||
|
||||
/* don't put bypass rates in table */
|
||||
if (prcm->dpll_speed == prcm->xtal_speed)
|
||||
continue;
|
||||
|
||||
freq_table[i].index = i;
|
||||
freq_table[i].frequency = prcm->mpu_speed / 1000;
|
||||
i++;
|
||||
}
|
||||
|
||||
freq_table[i].index = i;
|
||||
freq_table[i].frequency = CPUFREQ_TABLE_END;
|
||||
|
||||
*table = &freq_table[0];
|
||||
}
|
||||
|
||||
void omap2_clk_exit_cpufreq_table(struct cpufreq_frequency_table **table)
|
||||
{
|
||||
if (!cpu_is_omap24xx())
|
||||
return;
|
||||
|
||||
kfree(freq_table);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -536,10 +536,5 @@ struct clk_functions omap2_clk_functions = {
|
||||
.clk_set_rate = omap2_clk_set_rate,
|
||||
.clk_set_parent = omap2_clk_set_parent,
|
||||
.clk_disable_unused = omap2_clk_disable_unused,
|
||||
#ifdef CONFIG_CPU_FREQ
|
||||
/* These will be removed when the OPP code is integrated */
|
||||
.clk_init_cpufreq_table = omap2_clk_init_cpufreq_table,
|
||||
.clk_exit_cpufreq_table = omap2_clk_exit_cpufreq_table,
|
||||
#endif
|
||||
};
|
||||
|
||||
|
@ -146,14 +146,6 @@ extern const struct clksel_rate gpt_sys_rates[];
|
||||
extern const struct clksel_rate gfx_l3_rates[];
|
||||
extern const struct clksel_rate dsp_ick_rates[];
|
||||
|
||||
#if defined(CONFIG_ARCH_OMAP2) && defined(CONFIG_CPU_FREQ)
|
||||
extern void omap2_clk_init_cpufreq_table(struct cpufreq_frequency_table **table);
|
||||
extern void omap2_clk_exit_cpufreq_table(struct cpufreq_frequency_table **table);
|
||||
#else
|
||||
#define omap2_clk_init_cpufreq_table 0
|
||||
#define omap2_clk_exit_cpufreq_table 0
|
||||
#endif
|
||||
|
||||
extern const struct clkops clkops_omap2_iclk_dflt_wait;
|
||||
extern const struct clkops clkops_omap2_iclk_dflt;
|
||||
extern const struct clkops clkops_omap2_iclk_idle_only;
|
||||
|
@ -33,8 +33,6 @@
|
||||
#include <mach/irqs.h>
|
||||
#include <mach/dma.h>
|
||||
|
||||
static u64 dma_dmamask = DMA_BIT_MASK(32);
|
||||
|
||||
static u8 pdma0_peri[] = {
|
||||
DMACH_UART0_RX,
|
||||
DMACH_UART0_TX,
|
||||
|
@ -484,8 +484,8 @@ static struct wm8994_pdata wm8994_platform_data = {
|
||||
.gpio_defaults[8] = 0x0100,
|
||||
.gpio_defaults[9] = 0x0100,
|
||||
.gpio_defaults[10] = 0x0100,
|
||||
.ldo[0] = { S5PV210_MP03(6), NULL, &wm8994_ldo1_data }, /* XM0FRNB_2 */
|
||||
.ldo[1] = { 0, NULL, &wm8994_ldo2_data },
|
||||
.ldo[0] = { S5PV210_MP03(6), &wm8994_ldo1_data }, /* XM0FRNB_2 */
|
||||
.ldo[1] = { 0, &wm8994_ldo2_data },
|
||||
};
|
||||
|
||||
/* GPIO I2C PMIC */
|
||||
|
@ -674,8 +674,8 @@ static struct wm8994_pdata wm8994_platform_data = {
|
||||
.gpio_defaults[8] = 0x0100,
|
||||
.gpio_defaults[9] = 0x0100,
|
||||
.gpio_defaults[10] = 0x0100,
|
||||
.ldo[0] = { S5PV210_MP03(6), NULL, &wm8994_ldo1_data }, /* XM0FRNB_2 */
|
||||
.ldo[1] = { 0, NULL, &wm8994_ldo2_data },
|
||||
.ldo[0] = { S5PV210_MP03(6), &wm8994_ldo1_data }, /* XM0FRNB_2 */
|
||||
.ldo[1] = { 0, &wm8994_ldo2_data },
|
||||
};
|
||||
|
||||
/* GPIO I2C PMIC */
|
||||
|
@ -723,7 +723,7 @@ config CPU_HIGH_VECTOR
|
||||
bool "Select the High exception vector"
|
||||
help
|
||||
Say Y here to select high exception vector(0xFFFF0000~).
|
||||
The exception vector can be vary depending on the platform
|
||||
The exception vector can vary depending on the platform
|
||||
design in nommu mode. If your platform needs to select
|
||||
high exception vector, say Y.
|
||||
Otherwise or if you are unsure, say N, and the low exception
|
||||
|
@ -320,7 +320,7 @@ do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
|
||||
*/
|
||||
|
||||
perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS, 1, regs, addr);
|
||||
if (flags & FAULT_FLAG_ALLOW_RETRY) {
|
||||
if (!(fault & VM_FAULT_ERROR) && flags & FAULT_FLAG_ALLOW_RETRY) {
|
||||
if (fault & VM_FAULT_MAJOR) {
|
||||
tsk->maj_flt++;
|
||||
perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MAJ, 1,
|
||||
|
@ -13,6 +13,7 @@
|
||||
#include <asm/sections.h>
|
||||
#include <asm/page.h>
|
||||
#include <asm/setup.h>
|
||||
#include <asm/traps.h>
|
||||
#include <asm/mach/arch.h>
|
||||
|
||||
#include "mm.h"
|
||||
@ -39,6 +40,7 @@ void __init sanity_check_meminfo(void)
|
||||
*/
|
||||
void __init paging_init(struct machine_desc *mdesc)
|
||||
{
|
||||
early_trap_init((void *)CONFIG_VECTORS_BASE);
|
||||
bootmem_init();
|
||||
}
|
||||
|
||||
|
@ -254,6 +254,18 @@ __v7_setup:
|
||||
ldr r6, =NMRR @ NMRR
|
||||
mcr p15, 0, r5, c10, c2, 0 @ write PRRR
|
||||
mcr p15, 0, r6, c10, c2, 1 @ write NMRR
|
||||
#endif
|
||||
#ifndef CONFIG_ARM_THUMBEE
|
||||
mrc p15, 0, r0, c0, c1, 0 @ read ID_PFR0 for ThumbEE
|
||||
and r0, r0, #(0xf << 12) @ ThumbEE enabled field
|
||||
teq r0, #(1 << 12) @ check if ThumbEE is present
|
||||
bne 1f
|
||||
mov r5, #0
|
||||
mcr p14, 6, r5, c1, c0, 0 @ Initialize TEEHBR to 0
|
||||
mrc p14, 6, r0, c0, c0, 0 @ load TEECR
|
||||
orr r0, r0, #1 @ set the 1st bit in order to
|
||||
mcr p14, 6, r0, c0, c0, 0 @ stop userspace TEEHBR access
|
||||
1:
|
||||
#endif
|
||||
adr r5, v7_crval
|
||||
ldmia r5, {r5, r6}
|
||||
|
@ -398,32 +398,6 @@ struct clk dummy_ck = {
|
||||
.ops = &clkops_null,
|
||||
};
|
||||
|
||||
#ifdef CONFIG_CPU_FREQ
|
||||
void clk_init_cpufreq_table(struct cpufreq_frequency_table **table)
|
||||
{
|
||||
unsigned long flags;
|
||||
|
||||
if (!arch_clock || !arch_clock->clk_init_cpufreq_table)
|
||||
return;
|
||||
|
||||
spin_lock_irqsave(&clockfw_lock, flags);
|
||||
arch_clock->clk_init_cpufreq_table(table);
|
||||
spin_unlock_irqrestore(&clockfw_lock, flags);
|
||||
}
|
||||
|
||||
void clk_exit_cpufreq_table(struct cpufreq_frequency_table **table)
|
||||
{
|
||||
unsigned long flags;
|
||||
|
||||
if (!arch_clock || !arch_clock->clk_exit_cpufreq_table)
|
||||
return;
|
||||
|
||||
spin_lock_irqsave(&clockfw_lock, flags);
|
||||
arch_clock->clk_exit_cpufreq_table(table);
|
||||
spin_unlock_irqrestore(&clockfw_lock, flags);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
*
|
||||
*/
|
||||
|
@ -272,8 +272,6 @@ struct clk {
|
||||
#endif
|
||||
};
|
||||
|
||||
struct cpufreq_frequency_table;
|
||||
|
||||
struct clk_functions {
|
||||
int (*clk_enable)(struct clk *clk);
|
||||
void (*clk_disable)(struct clk *clk);
|
||||
@ -283,10 +281,6 @@ struct clk_functions {
|
||||
void (*clk_allow_idle)(struct clk *clk);
|
||||
void (*clk_deny_idle)(struct clk *clk);
|
||||
void (*clk_disable_unused)(struct clk *clk);
|
||||
#ifdef CONFIG_CPU_FREQ
|
||||
void (*clk_init_cpufreq_table)(struct cpufreq_frequency_table **);
|
||||
void (*clk_exit_cpufreq_table)(struct cpufreq_frequency_table **);
|
||||
#endif
|
||||
};
|
||||
|
||||
extern int mpurate;
|
||||
@ -301,10 +295,6 @@ extern void recalculate_root_clocks(void);
|
||||
extern unsigned long followparent_recalc(struct clk *clk);
|
||||
extern void clk_enable_init_clocks(void);
|
||||
unsigned long omap_fixed_divisor_recalc(struct clk *clk);
|
||||
#ifdef CONFIG_CPU_FREQ
|
||||
extern void clk_init_cpufreq_table(struct cpufreq_frequency_table **table);
|
||||
extern void clk_exit_cpufreq_table(struct cpufreq_frequency_table **table);
|
||||
#endif
|
||||
extern struct clk *omap_clk_get_by_name(const char *name);
|
||||
extern int omap_clk_enable_autoidle_all(void);
|
||||
extern int omap_clk_disable_autoidle_all(void);
|
||||
|
@ -302,6 +302,7 @@ comment "Power management"
|
||||
config SAMSUNG_PM_DEBUG
|
||||
bool "S3C2410 PM Suspend debug"
|
||||
depends on PM
|
||||
select DEBUG_LL
|
||||
help
|
||||
Say Y here if you want verbose debugging from the PM Suspend and
|
||||
Resume code. See <file:Documentation/arm/Samsung-S3C24XX/Suspend.txt>
|
||||
|
@ -42,10 +42,6 @@
|
||||
/* This number is used when no interrupt has been assigned */
|
||||
#define NO_IRQ 0
|
||||
|
||||
struct irq_data;
|
||||
extern irq_hw_number_t irqd_to_hwirq(struct irq_data *d);
|
||||
extern irq_hw_number_t virq_to_hw(unsigned int virq);
|
||||
|
||||
extern void __init init_pic_c64xplus(void);
|
||||
|
||||
extern void init_IRQ(void);
|
||||
|
@ -130,16 +130,3 @@ int arch_show_interrupts(struct seq_file *p, int prec)
|
||||
seq_printf(p, "%*s: %10lu\n", prec, "Err", irq_err_count);
|
||||
return 0;
|
||||
}
|
||||
|
||||
irq_hw_number_t irqd_to_hwirq(struct irq_data *d)
|
||||
{
|
||||
return d->hwirq;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(irqd_to_hwirq);
|
||||
|
||||
irq_hw_number_t virq_to_hw(unsigned int virq)
|
||||
{
|
||||
struct irq_data *irq_data = irq_get_irq_data(virq);
|
||||
return WARN_ON(!irq_data) ? 0 : irq_data->hwirq;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(virq_to_hw);
|
||||
|
@ -1 +1,147 @@
|
||||
#include <asm/intrinsics.h>
|
||||
#ifndef _ASM_IA64_CMPXCHG_H
|
||||
#define _ASM_IA64_CMPXCHG_H
|
||||
|
||||
/*
|
||||
* Compare/Exchange, forked from asm/intrinsics.h
|
||||
* which was:
|
||||
*
|
||||
* Copyright (C) 2002-2003 Hewlett-Packard Co
|
||||
* David Mosberger-Tang <davidm@hpl.hp.com>
|
||||
*/
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
#include <linux/types.h>
|
||||
/* include compiler specific intrinsics */
|
||||
#include <asm/ia64regs.h>
|
||||
#ifdef __INTEL_COMPILER
|
||||
# include <asm/intel_intrin.h>
|
||||
#else
|
||||
# include <asm/gcc_intrin.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* This function doesn't exist, so you'll get a linker error if
|
||||
* something tries to do an invalid xchg().
|
||||
*/
|
||||
extern void ia64_xchg_called_with_bad_pointer(void);
|
||||
|
||||
#define __xchg(x, ptr, size) \
|
||||
({ \
|
||||
unsigned long __xchg_result; \
|
||||
\
|
||||
switch (size) { \
|
||||
case 1: \
|
||||
__xchg_result = ia64_xchg1((__u8 *)ptr, x); \
|
||||
break; \
|
||||
\
|
||||
case 2: \
|
||||
__xchg_result = ia64_xchg2((__u16 *)ptr, x); \
|
||||
break; \
|
||||
\
|
||||
case 4: \
|
||||
__xchg_result = ia64_xchg4((__u32 *)ptr, x); \
|
||||
break; \
|
||||
\
|
||||
case 8: \
|
||||
__xchg_result = ia64_xchg8((__u64 *)ptr, x); \
|
||||
break; \
|
||||
default: \
|
||||
ia64_xchg_called_with_bad_pointer(); \
|
||||
} \
|
||||
__xchg_result; \
|
||||
})
|
||||
|
||||
#define xchg(ptr, x) \
|
||||
((__typeof__(*(ptr))) __xchg((unsigned long) (x), (ptr), sizeof(*(ptr))))
|
||||
|
||||
/*
|
||||
* Atomic compare and exchange. Compare OLD with MEM, if identical,
|
||||
* store NEW in MEM. Return the initial value in MEM. Success is
|
||||
* indicated by comparing RETURN with OLD.
|
||||
*/
|
||||
|
||||
#define __HAVE_ARCH_CMPXCHG 1
|
||||
|
||||
/*
|
||||
* This function doesn't exist, so you'll get a linker error
|
||||
* if something tries to do an invalid cmpxchg().
|
||||
*/
|
||||
extern long ia64_cmpxchg_called_with_bad_pointer(void);
|
||||
|
||||
#define ia64_cmpxchg(sem, ptr, old, new, size) \
|
||||
({ \
|
||||
__u64 _o_, _r_; \
|
||||
\
|
||||
switch (size) { \
|
||||
case 1: \
|
||||
_o_ = (__u8) (long) (old); \
|
||||
break; \
|
||||
case 2: \
|
||||
_o_ = (__u16) (long) (old); \
|
||||
break; \
|
||||
case 4: \
|
||||
_o_ = (__u32) (long) (old); \
|
||||
break; \
|
||||
case 8: \
|
||||
_o_ = (__u64) (long) (old); \
|
||||
break; \
|
||||
default: \
|
||||
break; \
|
||||
} \
|
||||
switch (size) { \
|
||||
case 1: \
|
||||
_r_ = ia64_cmpxchg1_##sem((__u8 *) ptr, new, _o_); \
|
||||
break; \
|
||||
\
|
||||
case 2: \
|
||||
_r_ = ia64_cmpxchg2_##sem((__u16 *) ptr, new, _o_); \
|
||||
break; \
|
||||
\
|
||||
case 4: \
|
||||
_r_ = ia64_cmpxchg4_##sem((__u32 *) ptr, new, _o_); \
|
||||
break; \
|
||||
\
|
||||
case 8: \
|
||||
_r_ = ia64_cmpxchg8_##sem((__u64 *) ptr, new, _o_); \
|
||||
break; \
|
||||
\
|
||||
default: \
|
||||
_r_ = ia64_cmpxchg_called_with_bad_pointer(); \
|
||||
break; \
|
||||
} \
|
||||
(__typeof__(old)) _r_; \
|
||||
})
|
||||
|
||||
#define cmpxchg_acq(ptr, o, n) \
|
||||
ia64_cmpxchg(acq, (ptr), (o), (n), sizeof(*(ptr)))
|
||||
#define cmpxchg_rel(ptr, o, n) \
|
||||
ia64_cmpxchg(rel, (ptr), (o), (n), sizeof(*(ptr)))
|
||||
|
||||
/* for compatibility with other platforms: */
|
||||
#define cmpxchg(ptr, o, n) cmpxchg_acq((ptr), (o), (n))
|
||||
#define cmpxchg64(ptr, o, n) cmpxchg_acq((ptr), (o), (n))
|
||||
|
||||
#define cmpxchg_local cmpxchg
|
||||
#define cmpxchg64_local cmpxchg64
|
||||
|
||||
#ifdef CONFIG_IA64_DEBUG_CMPXCHG
|
||||
# define CMPXCHG_BUGCHECK_DECL int _cmpxchg_bugcheck_count = 128;
|
||||
# define CMPXCHG_BUGCHECK(v) \
|
||||
do { \
|
||||
if (_cmpxchg_bugcheck_count-- <= 0) { \
|
||||
void *ip; \
|
||||
extern int printk(const char *fmt, ...); \
|
||||
ip = (void *) ia64_getreg(_IA64_REG_IP); \
|
||||
printk("CMPXCHG_BUGCHECK: stuck at %p on word %p\n", ip, (v));\
|
||||
break; \
|
||||
} \
|
||||
} while (0)
|
||||
#else /* !CONFIG_IA64_DEBUG_CMPXCHG */
|
||||
# define CMPXCHG_BUGCHECK_DECL
|
||||
# define CMPXCHG_BUGCHECK(v)
|
||||
#endif /* !CONFIG_IA64_DEBUG_CMPXCHG */
|
||||
|
||||
#endif /* !__ASSEMBLY__ */
|
||||
|
||||
#endif /* _ASM_IA64_CMPXCHG_H */
|
||||
|
@ -18,6 +18,7 @@
|
||||
#else
|
||||
# include <asm/gcc_intrin.h>
|
||||
#endif
|
||||
#include <asm/cmpxchg.h>
|
||||
|
||||
#define ia64_native_get_psr_i() (ia64_native_getreg(_IA64_REG_PSR) & IA64_PSR_I)
|
||||
|
||||
@ -81,119 +82,6 @@ extern unsigned long __bad_increment_for_ia64_fetch_and_add (void);
|
||||
|
||||
#define ia64_fetch_and_add(i,v) (ia64_fetchadd(i, v, rel) + (i)) /* return new value */
|
||||
|
||||
/*
|
||||
* This function doesn't exist, so you'll get a linker error if
|
||||
* something tries to do an invalid xchg().
|
||||
*/
|
||||
extern void ia64_xchg_called_with_bad_pointer (void);
|
||||
|
||||
#define __xchg(x,ptr,size) \
|
||||
({ \
|
||||
unsigned long __xchg_result; \
|
||||
\
|
||||
switch (size) { \
|
||||
case 1: \
|
||||
__xchg_result = ia64_xchg1((__u8 *)ptr, x); \
|
||||
break; \
|
||||
\
|
||||
case 2: \
|
||||
__xchg_result = ia64_xchg2((__u16 *)ptr, x); \
|
||||
break; \
|
||||
\
|
||||
case 4: \
|
||||
__xchg_result = ia64_xchg4((__u32 *)ptr, x); \
|
||||
break; \
|
||||
\
|
||||
case 8: \
|
||||
__xchg_result = ia64_xchg8((__u64 *)ptr, x); \
|
||||
break; \
|
||||
default: \
|
||||
ia64_xchg_called_with_bad_pointer(); \
|
||||
} \
|
||||
__xchg_result; \
|
||||
})
|
||||
|
||||
#define xchg(ptr,x) \
|
||||
((__typeof__(*(ptr))) __xchg ((unsigned long) (x), (ptr), sizeof(*(ptr))))
|
||||
|
||||
/*
|
||||
* Atomic compare and exchange. Compare OLD with MEM, if identical,
|
||||
* store NEW in MEM. Return the initial value in MEM. Success is
|
||||
* indicated by comparing RETURN with OLD.
|
||||
*/
|
||||
|
||||
#define __HAVE_ARCH_CMPXCHG 1
|
||||
|
||||
/*
|
||||
* This function doesn't exist, so you'll get a linker error
|
||||
* if something tries to do an invalid cmpxchg().
|
||||
*/
|
||||
extern long ia64_cmpxchg_called_with_bad_pointer (void);
|
||||
|
||||
#define ia64_cmpxchg(sem,ptr,old,new,size) \
|
||||
({ \
|
||||
__u64 _o_, _r_; \
|
||||
\
|
||||
switch (size) { \
|
||||
case 1: _o_ = (__u8 ) (long) (old); break; \
|
||||
case 2: _o_ = (__u16) (long) (old); break; \
|
||||
case 4: _o_ = (__u32) (long) (old); break; \
|
||||
case 8: _o_ = (__u64) (long) (old); break; \
|
||||
default: break; \
|
||||
} \
|
||||
switch (size) { \
|
||||
case 1: \
|
||||
_r_ = ia64_cmpxchg1_##sem((__u8 *) ptr, new, _o_); \
|
||||
break; \
|
||||
\
|
||||
case 2: \
|
||||
_r_ = ia64_cmpxchg2_##sem((__u16 *) ptr, new, _o_); \
|
||||
break; \
|
||||
\
|
||||
case 4: \
|
||||
_r_ = ia64_cmpxchg4_##sem((__u32 *) ptr, new, _o_); \
|
||||
break; \
|
||||
\
|
||||
case 8: \
|
||||
_r_ = ia64_cmpxchg8_##sem((__u64 *) ptr, new, _o_); \
|
||||
break; \
|
||||
\
|
||||
default: \
|
||||
_r_ = ia64_cmpxchg_called_with_bad_pointer(); \
|
||||
break; \
|
||||
} \
|
||||
(__typeof__(old)) _r_; \
|
||||
})
|
||||
|
||||
#define cmpxchg_acq(ptr, o, n) \
|
||||
ia64_cmpxchg(acq, (ptr), (o), (n), sizeof(*(ptr)))
|
||||
#define cmpxchg_rel(ptr, o, n) \
|
||||
ia64_cmpxchg(rel, (ptr), (o), (n), sizeof(*(ptr)))
|
||||
|
||||
/* for compatibility with other platforms: */
|
||||
#define cmpxchg(ptr, o, n) cmpxchg_acq((ptr), (o), (n))
|
||||
#define cmpxchg64(ptr, o, n) cmpxchg_acq((ptr), (o), (n))
|
||||
|
||||
#define cmpxchg_local cmpxchg
|
||||
#define cmpxchg64_local cmpxchg64
|
||||
|
||||
#ifdef CONFIG_IA64_DEBUG_CMPXCHG
|
||||
# define CMPXCHG_BUGCHECK_DECL int _cmpxchg_bugcheck_count = 128;
|
||||
# define CMPXCHG_BUGCHECK(v) \
|
||||
do { \
|
||||
if (_cmpxchg_bugcheck_count-- <= 0) { \
|
||||
void *ip; \
|
||||
extern int printk(const char *fmt, ...); \
|
||||
ip = (void *) ia64_getreg(_IA64_REG_IP); \
|
||||
printk("CMPXCHG_BUGCHECK: stuck at %p on word %p\n", ip, (v)); \
|
||||
break; \
|
||||
} \
|
||||
} while (0)
|
||||
#else /* !CONFIG_IA64_DEBUG_CMPXCHG */
|
||||
# define CMPXCHG_BUGCHECK_DECL
|
||||
# define CMPXCHG_BUGCHECK(v)
|
||||
#endif /* !CONFIG_IA64_DEBUG_CMPXCHG */
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
@ -33,8 +33,6 @@ extern atomic_t ppc_n_lost_interrupts;
|
||||
/* Same thing, used by the generic IRQ code */
|
||||
#define NR_IRQS_LEGACY NUM_ISA_INTERRUPTS
|
||||
|
||||
struct irq_data;
|
||||
extern irq_hw_number_t irqd_to_hwirq(struct irq_data *d);
|
||||
extern irq_hw_number_t virq_to_hw(unsigned int virq);
|
||||
|
||||
/**
|
||||
|
@ -206,40 +206,43 @@ reenable_mmu: /* re-enable mmu so we can */
|
||||
andi. r10,r10,MSR_EE /* Did EE change? */
|
||||
beq 1f
|
||||
|
||||
/* Save handler and return address into the 2 unused words
|
||||
* of the STACK_FRAME_OVERHEAD (sneak sneak sneak). Everything
|
||||
* else can be recovered from the pt_regs except r3 which for
|
||||
* normal interrupts has been set to pt_regs and for syscalls
|
||||
* is an argument, so we temporarily use ORIG_GPR3 to save it
|
||||
*/
|
||||
stw r9,8(r1)
|
||||
stw r11,12(r1)
|
||||
stw r3,ORIG_GPR3(r1)
|
||||
/*
|
||||
* The trace_hardirqs_off will use CALLER_ADDR0 and CALLER_ADDR1.
|
||||
* If from user mode there is only one stack frame on the stack, and
|
||||
* accessing CALLER_ADDR1 will cause oops. So we need create a dummy
|
||||
* stack frame to make trace_hardirqs_off happy.
|
||||
*
|
||||
* This is handy because we also need to save a bunch of GPRs,
|
||||
* r3 can be different from GPR3(r1) at this point, r9 and r11
|
||||
* contains the old MSR and handler address respectively,
|
||||
* r4 & r5 can contain page fault arguments that need to be passed
|
||||
* along as well. r12, CCR, CTR, XER etc... are left clobbered as
|
||||
* they aren't useful past this point (aren't syscall arguments),
|
||||
* the rest is restored from the exception frame.
|
||||
*/
|
||||
stwu r1,-32(r1)
|
||||
stw r9,8(r1)
|
||||
stw r11,12(r1)
|
||||
stw r3,16(r1)
|
||||
stw r4,20(r1)
|
||||
stw r5,24(r1)
|
||||
andi. r12,r12,MSR_PR
|
||||
beq 11f
|
||||
stwu r1,-16(r1)
|
||||
b 11f
|
||||
bl trace_hardirqs_off
|
||||
addi r1,r1,16
|
||||
b 12f
|
||||
|
||||
11:
|
||||
bl trace_hardirqs_off
|
||||
12:
|
||||
lwz r5,24(r1)
|
||||
lwz r4,20(r1)
|
||||
lwz r3,16(r1)
|
||||
lwz r11,12(r1)
|
||||
lwz r9,8(r1)
|
||||
addi r1,r1,32
|
||||
lwz r0,GPR0(r1)
|
||||
lwz r3,ORIG_GPR3(r1)
|
||||
lwz r4,GPR4(r1)
|
||||
lwz r5,GPR5(r1)
|
||||
lwz r6,GPR6(r1)
|
||||
lwz r7,GPR7(r1)
|
||||
lwz r8,GPR8(r1)
|
||||
lwz r9,8(r1)
|
||||
lwz r11,12(r1)
|
||||
1: mtctr r11
|
||||
mtlr r9
|
||||
bctr /* jump to handler */
|
||||
|
@ -560,12 +560,6 @@ void do_softirq(void)
|
||||
local_irq_restore(flags);
|
||||
}
|
||||
|
||||
irq_hw_number_t irqd_to_hwirq(struct irq_data *d)
|
||||
{
|
||||
return d->hwirq;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(irqd_to_hwirq);
|
||||
|
||||
irq_hw_number_t virq_to_hw(unsigned int virq)
|
||||
{
|
||||
struct irq_data *irq_data = irq_get_irq_data(virq);
|
||||
|
@ -1235,7 +1235,7 @@ void __ppc64_runlatch_on(void)
|
||||
ctrl |= CTRL_RUNLATCH;
|
||||
mtspr(SPRN_CTRLT, ctrl);
|
||||
|
||||
ti->local_flags |= TLF_RUNLATCH;
|
||||
ti->local_flags |= _TLF_RUNLATCH;
|
||||
}
|
||||
|
||||
/* Called with hard IRQs off */
|
||||
@ -1244,7 +1244,7 @@ void __ppc64_runlatch_off(void)
|
||||
struct thread_info *ti = current_thread_info();
|
||||
unsigned long ctrl;
|
||||
|
||||
ti->local_flags &= ~TLF_RUNLATCH;
|
||||
ti->local_flags &= ~_TLF_RUNLATCH;
|
||||
|
||||
ctrl = mfspr(SPRN_CTRLF);
|
||||
ctrl &= ~CTRL_RUNLATCH;
|
||||
|
@ -392,7 +392,7 @@ static int axon_msi_probe(struct platform_device *device)
|
||||
}
|
||||
memset(msic->fifo_virt, 0xff, MSIC_FIFO_SIZE_BYTES);
|
||||
|
||||
msic->irq_domain = irq_domain_add_nomap(dn, &msic_host_ops, msic);
|
||||
msic->irq_domain = irq_domain_add_nomap(dn, 0, &msic_host_ops, msic);
|
||||
if (!msic->irq_domain) {
|
||||
printk(KERN_ERR "axon_msi: couldn't allocate irq_domain for %s\n",
|
||||
dn->full_name);
|
||||
|
@ -239,7 +239,7 @@ void __init beatic_init_IRQ(void)
|
||||
ppc_md.get_irq = beatic_get_irq;
|
||||
|
||||
/* Allocate an irq host */
|
||||
beatic_host = irq_domain_add_nomap(NULL, &beatic_pic_host_ops, NULL);
|
||||
beatic_host = irq_domain_add_nomap(NULL, 0, &beatic_pic_host_ops, NULL);
|
||||
BUG_ON(beatic_host == NULL);
|
||||
irq_set_default_host(beatic_host);
|
||||
}
|
||||
|
@ -192,7 +192,7 @@ static int psurge_secondary_ipi_init(void)
|
||||
{
|
||||
int rc = -ENOMEM;
|
||||
|
||||
psurge_host = irq_domain_add_nomap(NULL, &psurge_host_ops, NULL);
|
||||
psurge_host = irq_domain_add_nomap(NULL, 0, &psurge_host_ops, NULL);
|
||||
|
||||
if (psurge_host)
|
||||
psurge_secondary_virq = irq_create_direct_mapping(psurge_host);
|
||||
|
@ -753,9 +753,8 @@ void __init ps3_init_IRQ(void)
|
||||
unsigned cpu;
|
||||
struct irq_domain *host;
|
||||
|
||||
host = irq_domain_add_nomap(NULL, &ps3_host_ops, NULL);
|
||||
host = irq_domain_add_nomap(NULL, PS3_PLUG_MAX + 1, &ps3_host_ops, NULL);
|
||||
irq_set_default_host(host);
|
||||
irq_set_virq_count(PS3_PLUG_MAX + 1);
|
||||
|
||||
for_each_possible_cpu(cpu) {
|
||||
struct ps3_private *pd = &per_cpu(ps3_private, cpu);
|
||||
|
@ -1264,4 +1264,4 @@ static int __init ds_init(void)
|
||||
return vio_register_driver(&ds_driver);
|
||||
}
|
||||
|
||||
subsys_initcall(ds_init);
|
||||
fs_initcall(ds_init);
|
||||
|
@ -45,7 +45,6 @@ void leon_pci_init(struct platform_device *ofdev, struct leon_pci_info *info)
|
||||
|
||||
void __devinit pcibios_fixup_bus(struct pci_bus *pbus)
|
||||
{
|
||||
struct leon_pci_info *info = pbus->sysdata;
|
||||
struct pci_dev *dev;
|
||||
int i, has_io, has_mem;
|
||||
u16 cmd;
|
||||
@ -111,18 +110,6 @@ int pcibios_enable_device(struct pci_dev *dev, int mask)
|
||||
return pci_enable_resources(dev, mask);
|
||||
}
|
||||
|
||||
struct device_node *pci_device_to_OF_node(struct pci_dev *pdev)
|
||||
{
|
||||
/*
|
||||
* Currently the OpenBoot nodes are not connected with the PCI device,
|
||||
* this is because the LEON PROM does not create PCI nodes. Eventually
|
||||
* this will change and the same approach as pcic.c can be used to
|
||||
* match PROM nodes with pci devices.
|
||||
*/
|
||||
return NULL;
|
||||
}
|
||||
EXPORT_SYMBOL(pci_device_to_OF_node);
|
||||
|
||||
void __devinit pcibios_update_irq(struct pci_dev *dev, int irq)
|
||||
{
|
||||
#ifdef CONFIG_PCI_DEBUG
|
||||
|
@ -20,11 +20,6 @@
|
||||
|
||||
.text
|
||||
.align 32
|
||||
__handle_softirq:
|
||||
call do_softirq
|
||||
nop
|
||||
ba,a,pt %xcc, __handle_softirq_continue
|
||||
nop
|
||||
__handle_preemption:
|
||||
call schedule
|
||||
wrpr %g0, RTRAP_PSTATE, %pstate
|
||||
@ -89,9 +84,7 @@ rtrap:
|
||||
cmp %l1, 0
|
||||
|
||||
/* mm/ultra.S:xcall_report_regs KNOWS about this load. */
|
||||
bne,pn %icc, __handle_softirq
|
||||
ldx [%sp + PTREGS_OFF + PT_V9_TSTATE], %l1
|
||||
__handle_softirq_continue:
|
||||
rtrap_xcall:
|
||||
sethi %hi(0xf << 20), %l4
|
||||
and %l1, %l4, %l4
|
||||
|
@ -225,6 +225,8 @@ asmlinkage void do_sparc_fault(struct pt_regs *regs, int text_fault, int write,
|
||||
unsigned long g2;
|
||||
int from_user = !(regs->psr & PSR_PS);
|
||||
int fault, code;
|
||||
unsigned int flags = (FAULT_FLAG_ALLOW_RETRY | FAULT_FLAG_KILLABLE |
|
||||
(write ? FAULT_FLAG_WRITE : 0));
|
||||
|
||||
if(text_fault)
|
||||
address = regs->pc;
|
||||
@ -251,6 +253,7 @@ asmlinkage void do_sparc_fault(struct pt_regs *regs, int text_fault, int write,
|
||||
|
||||
perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS, 1, regs, address);
|
||||
|
||||
retry:
|
||||
down_read(&mm->mmap_sem);
|
||||
|
||||
/*
|
||||
@ -289,7 +292,11 @@ asmlinkage void do_sparc_fault(struct pt_regs *regs, int text_fault, int write,
|
||||
* make sure we exit gracefully rather than endlessly redo
|
||||
* the fault.
|
||||
*/
|
||||
fault = handle_mm_fault(mm, vma, address, write ? FAULT_FLAG_WRITE : 0);
|
||||
fault = handle_mm_fault(mm, vma, address, flags);
|
||||
|
||||
if ((fault & VM_FAULT_RETRY) && fatal_signal_pending(current))
|
||||
return;
|
||||
|
||||
if (unlikely(fault & VM_FAULT_ERROR)) {
|
||||
if (fault & VM_FAULT_OOM)
|
||||
goto out_of_memory;
|
||||
@ -297,13 +304,29 @@ asmlinkage void do_sparc_fault(struct pt_regs *regs, int text_fault, int write,
|
||||
goto do_sigbus;
|
||||
BUG();
|
||||
}
|
||||
if (fault & VM_FAULT_MAJOR) {
|
||||
current->maj_flt++;
|
||||
perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MAJ, 1, regs, address);
|
||||
} else {
|
||||
current->min_flt++;
|
||||
perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MIN, 1, regs, address);
|
||||
|
||||
if (flags & FAULT_FLAG_ALLOW_RETRY) {
|
||||
if (fault & VM_FAULT_MAJOR) {
|
||||
current->maj_flt++;
|
||||
perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MAJ,
|
||||
1, regs, address);
|
||||
} else {
|
||||
current->min_flt++;
|
||||
perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MIN,
|
||||
1, regs, address);
|
||||
}
|
||||
if (fault & VM_FAULT_RETRY) {
|
||||
flags &= ~FAULT_FLAG_ALLOW_RETRY;
|
||||
|
||||
/* No need to up_read(&mm->mmap_sem) as we would
|
||||
* have already released it in __lock_page_or_retry
|
||||
* in mm/filemap.c.
|
||||
*/
|
||||
|
||||
goto retry;
|
||||
}
|
||||
}
|
||||
|
||||
up_read(&mm->mmap_sem);
|
||||
return;
|
||||
|
||||
|
@ -279,6 +279,7 @@ asmlinkage void __kprobes do_sparc64_fault(struct pt_regs *regs)
|
||||
unsigned int insn = 0;
|
||||
int si_code, fault_code, fault;
|
||||
unsigned long address, mm_rss;
|
||||
unsigned int flags = FAULT_FLAG_ALLOW_RETRY | FAULT_FLAG_KILLABLE;
|
||||
|
||||
fault_code = get_thread_fault_code();
|
||||
|
||||
@ -333,6 +334,8 @@ asmlinkage void __kprobes do_sparc64_fault(struct pt_regs *regs)
|
||||
insn = get_fault_insn(regs, insn);
|
||||
goto handle_kernel_fault;
|
||||
}
|
||||
|
||||
retry:
|
||||
down_read(&mm->mmap_sem);
|
||||
}
|
||||
|
||||
@ -423,7 +426,12 @@ asmlinkage void __kprobes do_sparc64_fault(struct pt_regs *regs)
|
||||
goto bad_area;
|
||||
}
|
||||
|
||||
fault = handle_mm_fault(mm, vma, address, (fault_code & FAULT_CODE_WRITE) ? FAULT_FLAG_WRITE : 0);
|
||||
flags |= ((fault_code & FAULT_CODE_WRITE) ? FAULT_FLAG_WRITE : 0);
|
||||
fault = handle_mm_fault(mm, vma, address, flags);
|
||||
|
||||
if ((fault & VM_FAULT_RETRY) && fatal_signal_pending(current))
|
||||
return;
|
||||
|
||||
if (unlikely(fault & VM_FAULT_ERROR)) {
|
||||
if (fault & VM_FAULT_OOM)
|
||||
goto out_of_memory;
|
||||
@ -431,12 +439,27 @@ asmlinkage void __kprobes do_sparc64_fault(struct pt_regs *regs)
|
||||
goto do_sigbus;
|
||||
BUG();
|
||||
}
|
||||
if (fault & VM_FAULT_MAJOR) {
|
||||
current->maj_flt++;
|
||||
perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MAJ, 1, regs, address);
|
||||
} else {
|
||||
current->min_flt++;
|
||||
perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MIN, 1, regs, address);
|
||||
|
||||
if (flags & FAULT_FLAG_ALLOW_RETRY) {
|
||||
if (fault & VM_FAULT_MAJOR) {
|
||||
current->maj_flt++;
|
||||
perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MAJ,
|
||||
1, regs, address);
|
||||
} else {
|
||||
current->min_flt++;
|
||||
perf_sw_event(PERF_COUNT_SW_PAGE_FAULTS_MIN,
|
||||
1, regs, address);
|
||||
}
|
||||
if (fault & VM_FAULT_RETRY) {
|
||||
flags &= ~FAULT_FLAG_ALLOW_RETRY;
|
||||
|
||||
/* No need to up_read(&mm->mmap_sem) as we would
|
||||
* have already released it in __lock_page_or_retry
|
||||
* in mm/filemap.c.
|
||||
*/
|
||||
|
||||
goto retry;
|
||||
}
|
||||
}
|
||||
up_read(&mm->mmap_sem);
|
||||
|
||||
|
@ -146,7 +146,6 @@ static ctl_table unaligned_table[] = {
|
||||
},
|
||||
{}
|
||||
};
|
||||
#endif
|
||||
|
||||
static struct ctl_path tile_path[] = {
|
||||
{ .procname = "tile" },
|
||||
@ -155,10 +154,9 @@ static struct ctl_path tile_path[] = {
|
||||
|
||||
static int __init proc_sys_tile_init(void)
|
||||
{
|
||||
#ifndef __tilegx__ /* FIXME: GX: no support for unaligned access yet */
|
||||
register_sysctl_paths(tile_path, unaligned_table);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
arch_initcall(proc_sys_tile_init);
|
||||
#endif
|
||||
|
@ -196,6 +196,8 @@ void __cpuinit online_secondary(void)
|
||||
/* This must be done before setting cpu_online_mask */
|
||||
wmb();
|
||||
|
||||
notify_cpu_starting(smp_processor_id());
|
||||
|
||||
/*
|
||||
* We need to hold call_lock, so there is no inconsistency
|
||||
* between the time smp_call_function() determines number of
|
||||
|
@ -3,41 +3,6 @@
|
||||
|
||||
#include <asm/types.h>
|
||||
|
||||
#if defined(__KERNEL__)
|
||||
|
||||
# include <asm/byteorder.h>
|
||||
|
||||
# if defined(__BIG_ENDIAN)
|
||||
# define ntohll(x) (x)
|
||||
# define htonll(x) (x)
|
||||
# elif defined(__LITTLE_ENDIAN)
|
||||
# define ntohll(x) be64_to_cpu(x)
|
||||
# define htonll(x) cpu_to_be64(x)
|
||||
# else
|
||||
# error "Could not determine byte order"
|
||||
# endif
|
||||
|
||||
#else
|
||||
/* For the definition of ntohl, htonl and __BYTE_ORDER */
|
||||
#include <endian.h>
|
||||
#include <netinet/in.h>
|
||||
#if defined(__BYTE_ORDER)
|
||||
|
||||
# if __BYTE_ORDER == __BIG_ENDIAN
|
||||
# define ntohll(x) (x)
|
||||
# define htonll(x) (x)
|
||||
# elif __BYTE_ORDER == __LITTLE_ENDIAN
|
||||
# define ntohll(x) bswap_64(x)
|
||||
# define htonll(x) bswap_64(x)
|
||||
# else
|
||||
# error "Could not determine byte order: __BYTE_ORDER uncorrectly defined"
|
||||
# endif
|
||||
|
||||
#else /* ! defined(__BYTE_ORDER) */
|
||||
# error "Could not determine byte order: __BYTE_ORDER not defined"
|
||||
#endif
|
||||
#endif /* ! defined(__KERNEL__) */
|
||||
|
||||
extern int init_cow_file(int fd, char *cow_file, char *backing_file,
|
||||
int sectorsize, int alignment, int *bitmap_offset_out,
|
||||
unsigned long *bitmap_len_out, int *data_offset_out);
|
||||
|
@ -8,11 +8,10 @@
|
||||
* that.
|
||||
*/
|
||||
#include <unistd.h>
|
||||
#include <byteswap.h>
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <asm/types.h>
|
||||
#include <endian.h>
|
||||
#include "cow.h"
|
||||
#include "cow_sys.h"
|
||||
|
||||
@ -214,8 +213,8 @@ int write_cow_header(char *cow_file, int fd, char *backing_file,
|
||||
"header\n");
|
||||
goto out;
|
||||
}
|
||||
header->magic = htonl(COW_MAGIC);
|
||||
header->version = htonl(COW_VERSION);
|
||||
header->magic = htobe32(COW_MAGIC);
|
||||
header->version = htobe32(COW_VERSION);
|
||||
|
||||
err = -EINVAL;
|
||||
if (strlen(backing_file) > sizeof(header->backing_file) - 1) {
|
||||
@ -246,10 +245,10 @@ int write_cow_header(char *cow_file, int fd, char *backing_file,
|
||||
goto out_free;
|
||||
}
|
||||
|
||||
header->mtime = htonl(modtime);
|
||||
header->size = htonll(*size);
|
||||
header->sectorsize = htonl(sectorsize);
|
||||
header->alignment = htonl(alignment);
|
||||
header->mtime = htobe32(modtime);
|
||||
header->size = htobe64(*size);
|
||||
header->sectorsize = htobe32(sectorsize);
|
||||
header->alignment = htobe32(alignment);
|
||||
header->cow_format = COW_BITMAP;
|
||||
|
||||
err = cow_write_file(fd, header, sizeof(*header));
|
||||
@ -301,8 +300,8 @@ int read_cow_header(int (*reader)(__u64, char *, int, void *), void *arg,
|
||||
magic = header->v1.magic;
|
||||
if (magic == COW_MAGIC)
|
||||
version = header->v1.version;
|
||||
else if (magic == ntohl(COW_MAGIC))
|
||||
version = ntohl(header->v1.version);
|
||||
else if (magic == be32toh(COW_MAGIC))
|
||||
version = be32toh(header->v1.version);
|
||||
/* No error printed because the non-COW case comes through here */
|
||||
else goto out;
|
||||
|
||||
@ -327,9 +326,9 @@ int read_cow_header(int (*reader)(__u64, char *, int, void *), void *arg,
|
||||
"header\n");
|
||||
goto out;
|
||||
}
|
||||
*mtime_out = ntohl(header->v2.mtime);
|
||||
*size_out = ntohll(header->v2.size);
|
||||
*sectorsize_out = ntohl(header->v2.sectorsize);
|
||||
*mtime_out = be32toh(header->v2.mtime);
|
||||
*size_out = be64toh(header->v2.size);
|
||||
*sectorsize_out = be32toh(header->v2.sectorsize);
|
||||
*bitmap_offset_out = sizeof(header->v2);
|
||||
*align_out = *sectorsize_out;
|
||||
file = header->v2.backing_file;
|
||||
@ -341,10 +340,10 @@ int read_cow_header(int (*reader)(__u64, char *, int, void *), void *arg,
|
||||
"header\n");
|
||||
goto out;
|
||||
}
|
||||
*mtime_out = ntohl(header->v3.mtime);
|
||||
*size_out = ntohll(header->v3.size);
|
||||
*sectorsize_out = ntohl(header->v3.sectorsize);
|
||||
*align_out = ntohl(header->v3.alignment);
|
||||
*mtime_out = be32toh(header->v3.mtime);
|
||||
*size_out = be64toh(header->v3.size);
|
||||
*sectorsize_out = be32toh(header->v3.sectorsize);
|
||||
*align_out = be32toh(header->v3.alignment);
|
||||
if (*align_out == 0) {
|
||||
cow_printf("read_cow_header - invalid COW header, "
|
||||
"align == 0\n");
|
||||
@ -366,16 +365,16 @@ int read_cow_header(int (*reader)(__u64, char *, int, void *), void *arg,
|
||||
* this was used until Dec2005 - 64bits are needed to represent
|
||||
* 2038+. I.e. we can safely do this truncating cast.
|
||||
*
|
||||
* Additionally, we must use ntohl() instead of ntohll(), since
|
||||
* Additionally, we must use be32toh() instead of be64toh(), since
|
||||
* the program used to use the former (tested - I got mtime
|
||||
* mismatch "0 vs whatever").
|
||||
*
|
||||
* Ever heard about bug-to-bug-compatibility ? ;-) */
|
||||
*mtime_out = (time32_t) ntohl(header->v3_b.mtime);
|
||||
*mtime_out = (time32_t) be32toh(header->v3_b.mtime);
|
||||
|
||||
*size_out = ntohll(header->v3_b.size);
|
||||
*sectorsize_out = ntohl(header->v3_b.sectorsize);
|
||||
*align_out = ntohl(header->v3_b.alignment);
|
||||
*size_out = be64toh(header->v3_b.size);
|
||||
*sectorsize_out = be32toh(header->v3_b.sectorsize);
|
||||
*align_out = be32toh(header->v3_b.alignment);
|
||||
if (*align_out == 0) {
|
||||
cow_printf("read_cow_header - invalid COW header, "
|
||||
"align == 0\n");
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include <linux/workqueue.h>
|
||||
#include <linux/mutex.h>
|
||||
#include <asm/uaccess.h>
|
||||
#include <asm/switch_to.h>
|
||||
|
||||
#include "init.h"
|
||||
#include "irq_kern.h"
|
||||
|
@ -1,3 +1,4 @@
|
||||
generic-y += bug.h cputime.h device.h emergency-restart.h futex.h hardirq.h
|
||||
generic-y += hw_irq.h irq_regs.h kdebug.h percpu.h sections.h topology.h xor.h
|
||||
generic-y += ftrace.h pci.h io.h param.h delay.h mutex.h current.h
|
||||
generic-y += ftrace.h pci.h io.h param.h delay.h mutex.h current.h exec.h
|
||||
generic-y += switch_to.h
|
||||
|
@ -3,9 +3,10 @@
|
||||
# Licensed under the GPL
|
||||
#
|
||||
|
||||
CPPFLAGS_vmlinux.lds := -DSTART=$(LDS_START) \
|
||||
-DELF_ARCH=$(LDS_ELF_ARCH) \
|
||||
-DELF_FORMAT=$(LDS_ELF_FORMAT)
|
||||
CPPFLAGS_vmlinux.lds := -DSTART=$(LDS_START) \
|
||||
-DELF_ARCH=$(LDS_ELF_ARCH) \
|
||||
-DELF_FORMAT=$(LDS_ELF_FORMAT) \
|
||||
$(LDS_EXTRA)
|
||||
extra-y := vmlinux.lds
|
||||
clean-files :=
|
||||
|
||||
|
@ -88,11 +88,8 @@ static inline void set_current(struct task_struct *task)
|
||||
|
||||
extern void arch_switch_to(struct task_struct *to);
|
||||
|
||||
void *_switch_to(void *prev, void *next, void *last)
|
||||
void *__switch_to(struct task_struct *from, struct task_struct *to)
|
||||
{
|
||||
struct task_struct *from = prev;
|
||||
struct task_struct *to = next;
|
||||
|
||||
to->thread.prev_sched = from;
|
||||
set_current(to);
|
||||
|
||||
@ -111,7 +108,6 @@ void *_switch_to(void *prev, void *next, void *last)
|
||||
} while (current->thread.saved_task);
|
||||
|
||||
return current->thread.prev_sched;
|
||||
|
||||
}
|
||||
|
||||
void interrupt_end(void)
|
||||
|
@ -103,7 +103,6 @@ int init_new_context(struct task_struct *task, struct mm_struct *mm)
|
||||
|
||||
void uml_setup_stubs(struct mm_struct *mm)
|
||||
{
|
||||
struct page **pages;
|
||||
int err, ret;
|
||||
|
||||
if (!skas_needs_stub)
|
||||
|
@ -14,6 +14,9 @@ LINK-y += $(call cc-option,-m32)
|
||||
|
||||
export LDFLAGS
|
||||
|
||||
LDS_EXTRA := -Ui386
|
||||
export LDS_EXTRA
|
||||
|
||||
# First of all, tune CFLAGS for the specific CPU. This actually sets cflags-y.
|
||||
include $(srctree)/arch/x86/Makefile_32.cpu
|
||||
|
||||
|
@ -43,7 +43,7 @@ extern void __add_wrong_size(void)
|
||||
switch (sizeof(*(ptr))) { \
|
||||
case __X86_CASE_B: \
|
||||
asm volatile (lock #op "b %b0, %1\n" \
|
||||
: "+r" (__ret), "+m" (*(ptr)) \
|
||||
: "+q" (__ret), "+m" (*(ptr)) \
|
||||
: : "memory", "cc"); \
|
||||
break; \
|
||||
case __X86_CASE_W: \
|
||||
@ -173,7 +173,7 @@ extern void __add_wrong_size(void)
|
||||
switch (sizeof(*(ptr))) { \
|
||||
case __X86_CASE_B: \
|
||||
asm volatile (lock "addb %b1, %0\n" \
|
||||
: "+m" (*(ptr)) : "ri" (inc) \
|
||||
: "+m" (*(ptr)) : "qi" (inc) \
|
||||
: "memory", "cc"); \
|
||||
break; \
|
||||
case __X86_CASE_W: \
|
||||
|
@ -557,6 +557,8 @@ struct __large_struct { unsigned long buf[100]; };
|
||||
|
||||
extern unsigned long
|
||||
copy_from_user_nmi(void *to, const void __user *from, unsigned long n);
|
||||
extern __must_check long
|
||||
strncpy_from_user(char *dst, const char __user *src, long count);
|
||||
|
||||
/*
|
||||
* movsl can be slow when source and dest are not both 8-byte aligned
|
||||
|
@ -213,11 +213,6 @@ static inline unsigned long __must_check copy_from_user(void *to,
|
||||
return n;
|
||||
}
|
||||
|
||||
long __must_check strncpy_from_user(char *dst, const char __user *src,
|
||||
long count);
|
||||
long __must_check __strncpy_from_user(char *dst,
|
||||
const char __user *src, long count);
|
||||
|
||||
/**
|
||||
* strlen_user: - Get the size of a string in user space.
|
||||
* @str: The string to measure.
|
||||
|
@ -208,10 +208,6 @@ int __copy_in_user(void __user *dst, const void __user *src, unsigned size)
|
||||
}
|
||||
}
|
||||
|
||||
__must_check long
|
||||
strncpy_from_user(char *dst, const char __user *src, long count);
|
||||
__must_check long
|
||||
__strncpy_from_user(char *dst, const char __user *src, long count);
|
||||
__must_check long strnlen_user(const char __user *str, long n);
|
||||
__must_check long __strnlen_user(const char __user *str, long n);
|
||||
__must_check long strlen_user(const char __user *str);
|
||||
|
@ -216,9 +216,9 @@ bool emulate_vsyscall(struct pt_regs *regs, unsigned long address)
|
||||
current_thread_info()->sig_on_uaccess_error = 1;
|
||||
|
||||
/*
|
||||
* 0 is a valid user pointer (in the access_ok sense) on 32-bit and
|
||||
* NULL is a valid user pointer (in the access_ok sense) on 32-bit and
|
||||
* 64-bit, so we don't need to special-case it here. For all the
|
||||
* vsyscalls, 0 means "don't write anything" not "write it at
|
||||
* vsyscalls, NULL means "don't write anything" not "write it at
|
||||
* address 0".
|
||||
*/
|
||||
ret = -EFAULT;
|
||||
@ -247,7 +247,7 @@ bool emulate_vsyscall(struct pt_regs *regs, unsigned long address)
|
||||
|
||||
ret = sys_getcpu((unsigned __user *)regs->di,
|
||||
(unsigned __user *)regs->si,
|
||||
0);
|
||||
NULL);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -7,6 +7,8 @@
|
||||
#include <linux/highmem.h>
|
||||
#include <linux/module.h>
|
||||
|
||||
#include <asm/word-at-a-time.h>
|
||||
|
||||
/*
|
||||
* best effort, GUP based copy_from_user() that is NMI-safe
|
||||
*/
|
||||
@ -41,3 +43,104 @@ copy_from_user_nmi(void *to, const void __user *from, unsigned long n)
|
||||
return len;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(copy_from_user_nmi);
|
||||
|
||||
static inline unsigned long count_bytes(unsigned long mask)
|
||||
{
|
||||
mask = (mask - 1) & ~mask;
|
||||
mask >>= 7;
|
||||
return count_masked_bytes(mask);
|
||||
}
|
||||
|
||||
/*
|
||||
* Do a strncpy, return length of string without final '\0'.
|
||||
* 'count' is the user-supplied count (return 'count' if we
|
||||
* hit it), 'max' is the address space maximum (and we return
|
||||
* -EFAULT if we hit it).
|
||||
*/
|
||||
static inline long do_strncpy_from_user(char *dst, const char __user *src, long count, unsigned long max)
|
||||
{
|
||||
long res = 0;
|
||||
|
||||
/*
|
||||
* Truncate 'max' to the user-specified limit, so that
|
||||
* we only have one limit we need to check in the loop
|
||||
*/
|
||||
if (max > count)
|
||||
max = count;
|
||||
|
||||
while (max >= sizeof(unsigned long)) {
|
||||
unsigned long c;
|
||||
|
||||
/* Fall back to byte-at-a-time if we get a page fault */
|
||||
if (unlikely(__get_user(c,(unsigned long __user *)(src+res))))
|
||||
break;
|
||||
/* This can write a few bytes past the NUL character, but that's ok */
|
||||
*(unsigned long *)(dst+res) = c;
|
||||
c = has_zero(c);
|
||||
if (c)
|
||||
return res + count_bytes(c);
|
||||
res += sizeof(unsigned long);
|
||||
max -= sizeof(unsigned long);
|
||||
}
|
||||
|
||||
while (max) {
|
||||
char c;
|
||||
|
||||
if (unlikely(__get_user(c,src+res)))
|
||||
return -EFAULT;
|
||||
dst[res] = c;
|
||||
if (!c)
|
||||
return res;
|
||||
res++;
|
||||
max--;
|
||||
}
|
||||
|
||||
/*
|
||||
* Uhhuh. We hit 'max'. But was that the user-specified maximum
|
||||
* too? If so, that's ok - we got as much as the user asked for.
|
||||
*/
|
||||
if (res >= count)
|
||||
return res;
|
||||
|
||||
/*
|
||||
* Nope: we hit the address space limit, and we still had more
|
||||
* characters the caller would have wanted. That's an EFAULT.
|
||||
*/
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
/**
|
||||
* strncpy_from_user: - Copy a NUL terminated string from userspace.
|
||||
* @dst: Destination address, in kernel space. This buffer must be at
|
||||
* least @count bytes long.
|
||||
* @src: Source address, in user space.
|
||||
* @count: Maximum number of bytes to copy, including the trailing NUL.
|
||||
*
|
||||
* Copies a NUL-terminated string from userspace to kernel space.
|
||||
*
|
||||
* On success, returns the length of the string (not including the trailing
|
||||
* NUL).
|
||||
*
|
||||
* If access to userspace fails, returns -EFAULT (some data may have been
|
||||
* copied).
|
||||
*
|
||||
* If @count is smaller than the length of the string, copies @count bytes
|
||||
* and returns @count.
|
||||
*/
|
||||
long
|
||||
strncpy_from_user(char *dst, const char __user *src, long count)
|
||||
{
|
||||
unsigned long max_addr, src_addr;
|
||||
|
||||
if (unlikely(count <= 0))
|
||||
return 0;
|
||||
|
||||
max_addr = current_thread_info()->addr_limit.seg;
|
||||
src_addr = (unsigned long)src;
|
||||
if (likely(src_addr < max_addr)) {
|
||||
unsigned long max = max_addr - src_addr;
|
||||
return do_strncpy_from_user(dst, src, count, max);
|
||||
}
|
||||
return -EFAULT;
|
||||
}
|
||||
EXPORT_SYMBOL(strncpy_from_user);
|
||||
|
@ -32,93 +32,6 @@ static inline int __movsl_is_ok(unsigned long a1, unsigned long a2, unsigned lon
|
||||
#define movsl_is_ok(a1, a2, n) \
|
||||
__movsl_is_ok((unsigned long)(a1), (unsigned long)(a2), (n))
|
||||
|
||||
/*
|
||||
* Copy a null terminated string from userspace.
|
||||
*/
|
||||
|
||||
#define __do_strncpy_from_user(dst, src, count, res) \
|
||||
do { \
|
||||
int __d0, __d1, __d2; \
|
||||
might_fault(); \
|
||||
__asm__ __volatile__( \
|
||||
" testl %1,%1\n" \
|
||||
" jz 2f\n" \
|
||||
"0: lodsb\n" \
|
||||
" stosb\n" \
|
||||
" testb %%al,%%al\n" \
|
||||
" jz 1f\n" \
|
||||
" decl %1\n" \
|
||||
" jnz 0b\n" \
|
||||
"1: subl %1,%0\n" \
|
||||
"2:\n" \
|
||||
".section .fixup,\"ax\"\n" \
|
||||
"3: movl %5,%0\n" \
|
||||
" jmp 2b\n" \
|
||||
".previous\n" \
|
||||
_ASM_EXTABLE(0b,3b) \
|
||||
: "=&d"(res), "=&c"(count), "=&a" (__d0), "=&S" (__d1), \
|
||||
"=&D" (__d2) \
|
||||
: "i"(-EFAULT), "0"(count), "1"(count), "3"(src), "4"(dst) \
|
||||
: "memory"); \
|
||||
} while (0)
|
||||
|
||||
/**
|
||||
* __strncpy_from_user: - Copy a NUL terminated string from userspace, with less checking.
|
||||
* @dst: Destination address, in kernel space. This buffer must be at
|
||||
* least @count bytes long.
|
||||
* @src: Source address, in user space.
|
||||
* @count: Maximum number of bytes to copy, including the trailing NUL.
|
||||
*
|
||||
* Copies a NUL-terminated string from userspace to kernel space.
|
||||
* Caller must check the specified block with access_ok() before calling
|
||||
* this function.
|
||||
*
|
||||
* On success, returns the length of the string (not including the trailing
|
||||
* NUL).
|
||||
*
|
||||
* If access to userspace fails, returns -EFAULT (some data may have been
|
||||
* copied).
|
||||
*
|
||||
* If @count is smaller than the length of the string, copies @count bytes
|
||||
* and returns @count.
|
||||
*/
|
||||
long
|
||||
__strncpy_from_user(char *dst, const char __user *src, long count)
|
||||
{
|
||||
long res;
|
||||
__do_strncpy_from_user(dst, src, count, res);
|
||||
return res;
|
||||
}
|
||||
EXPORT_SYMBOL(__strncpy_from_user);
|
||||
|
||||
/**
|
||||
* strncpy_from_user: - Copy a NUL terminated string from userspace.
|
||||
* @dst: Destination address, in kernel space. This buffer must be at
|
||||
* least @count bytes long.
|
||||
* @src: Source address, in user space.
|
||||
* @count: Maximum number of bytes to copy, including the trailing NUL.
|
||||
*
|
||||
* Copies a NUL-terminated string from userspace to kernel space.
|
||||
*
|
||||
* On success, returns the length of the string (not including the trailing
|
||||
* NUL).
|
||||
*
|
||||
* If access to userspace fails, returns -EFAULT (some data may have been
|
||||
* copied).
|
||||
*
|
||||
* If @count is smaller than the length of the string, copies @count bytes
|
||||
* and returns @count.
|
||||
*/
|
||||
long
|
||||
strncpy_from_user(char *dst, const char __user *src, long count)
|
||||
{
|
||||
long res = -EFAULT;
|
||||
if (access_ok(VERIFY_READ, src, 1))
|
||||
__do_strncpy_from_user(dst, src, count, res);
|
||||
return res;
|
||||
}
|
||||
EXPORT_SYMBOL(strncpy_from_user);
|
||||
|
||||
/*
|
||||
* Zero Userspace
|
||||
*/
|
||||
|
@ -8,55 +8,6 @@
|
||||
#include <linux/module.h>
|
||||
#include <asm/uaccess.h>
|
||||
|
||||
/*
|
||||
* Copy a null terminated string from userspace.
|
||||
*/
|
||||
|
||||
#define __do_strncpy_from_user(dst,src,count,res) \
|
||||
do { \
|
||||
long __d0, __d1, __d2; \
|
||||
might_fault(); \
|
||||
__asm__ __volatile__( \
|
||||
" testq %1,%1\n" \
|
||||
" jz 2f\n" \
|
||||
"0: lodsb\n" \
|
||||
" stosb\n" \
|
||||
" testb %%al,%%al\n" \
|
||||
" jz 1f\n" \
|
||||
" decq %1\n" \
|
||||
" jnz 0b\n" \
|
||||
"1: subq %1,%0\n" \
|
||||
"2:\n" \
|
||||
".section .fixup,\"ax\"\n" \
|
||||
"3: movq %5,%0\n" \
|
||||
" jmp 2b\n" \
|
||||
".previous\n" \
|
||||
_ASM_EXTABLE(0b,3b) \
|
||||
: "=&r"(res), "=&c"(count), "=&a" (__d0), "=&S" (__d1), \
|
||||
"=&D" (__d2) \
|
||||
: "i"(-EFAULT), "0"(count), "1"(count), "3"(src), "4"(dst) \
|
||||
: "memory"); \
|
||||
} while (0)
|
||||
|
||||
long
|
||||
__strncpy_from_user(char *dst, const char __user *src, long count)
|
||||
{
|
||||
long res;
|
||||
__do_strncpy_from_user(dst, src, count, res);
|
||||
return res;
|
||||
}
|
||||
EXPORT_SYMBOL(__strncpy_from_user);
|
||||
|
||||
long
|
||||
strncpy_from_user(char *dst, const char __user *src, long count)
|
||||
{
|
||||
long res = -EFAULT;
|
||||
if (access_ok(VERIFY_READ, src, 1))
|
||||
return __strncpy_from_user(dst, src, count);
|
||||
return res;
|
||||
}
|
||||
EXPORT_SYMBOL(strncpy_from_user);
|
||||
|
||||
/*
|
||||
* Zero Userspace
|
||||
*/
|
||||
|
75
arch/x86/um/asm/barrier.h
Normal file
75
arch/x86/um/asm/barrier.h
Normal file
@ -0,0 +1,75 @@
|
||||
#ifndef _ASM_UM_BARRIER_H_
|
||||
#define _ASM_UM_BARRIER_H_
|
||||
|
||||
#include <asm/asm.h>
|
||||
#include <asm/segment.h>
|
||||
#include <asm/cpufeature.h>
|
||||
#include <asm/cmpxchg.h>
|
||||
#include <asm/nops.h>
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/irqflags.h>
|
||||
|
||||
/*
|
||||
* Force strict CPU ordering.
|
||||
* And yes, this is required on UP too when we're talking
|
||||
* to devices.
|
||||
*/
|
||||
#ifdef CONFIG_X86_32
|
||||
|
||||
#define mb() alternative("lock; addl $0,0(%%esp)", "mfence", X86_FEATURE_XMM2)
|
||||
#define rmb() alternative("lock; addl $0,0(%%esp)", "lfence", X86_FEATURE_XMM2)
|
||||
#define wmb() alternative("lock; addl $0,0(%%esp)", "sfence", X86_FEATURE_XMM)
|
||||
|
||||
#else /* CONFIG_X86_32 */
|
||||
|
||||
#define mb() asm volatile("mfence" : : : "memory")
|
||||
#define rmb() asm volatile("lfence" : : : "memory")
|
||||
#define wmb() asm volatile("sfence" : : : "memory")
|
||||
|
||||
#endif /* CONFIG_X86_32 */
|
||||
|
||||
#define read_barrier_depends() do { } while (0)
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
|
||||
#define smp_mb() mb()
|
||||
#ifdef CONFIG_X86_PPRO_FENCE
|
||||
#define smp_rmb() rmb()
|
||||
#else /* CONFIG_X86_PPRO_FENCE */
|
||||
#define smp_rmb() barrier()
|
||||
#endif /* CONFIG_X86_PPRO_FENCE */
|
||||
|
||||
#ifdef CONFIG_X86_OOSTORE
|
||||
#define smp_wmb() wmb()
|
||||
#else /* CONFIG_X86_OOSTORE */
|
||||
#define smp_wmb() barrier()
|
||||
#endif /* CONFIG_X86_OOSTORE */
|
||||
|
||||
#define smp_read_barrier_depends() read_barrier_depends()
|
||||
#define set_mb(var, value) do { (void)xchg(&var, value); } while (0)
|
||||
|
||||
#else /* CONFIG_SMP */
|
||||
|
||||
#define smp_mb() barrier()
|
||||
#define smp_rmb() barrier()
|
||||
#define smp_wmb() barrier()
|
||||
#define smp_read_barrier_depends() do { } while (0)
|
||||
#define set_mb(var, value) do { var = value; barrier(); } while (0)
|
||||
|
||||
#endif /* CONFIG_SMP */
|
||||
|
||||
/*
|
||||
* Stop RDTSC speculation. This is needed when you need to use RDTSC
|
||||
* (or get_cycles or vread that possibly accesses the TSC) in a defined
|
||||
* code region.
|
||||
*
|
||||
* (Could use an alternative three way for this if there was one.)
|
||||
*/
|
||||
static inline void rdtsc_barrier(void)
|
||||
{
|
||||
alternative(ASM_NOP3, "mfence", X86_FEATURE_MFENCE_RDTSC);
|
||||
alternative(ASM_NOP3, "lfence", X86_FEATURE_LFENCE_RDTSC);
|
||||
}
|
||||
|
||||
#endif
|
@ -1,135 +0,0 @@
|
||||
#ifndef _ASM_X86_SYSTEM_H_
|
||||
#define _ASM_X86_SYSTEM_H_
|
||||
|
||||
#include <asm/asm.h>
|
||||
#include <asm/segment.h>
|
||||
#include <asm/cpufeature.h>
|
||||
#include <asm/cmpxchg.h>
|
||||
#include <asm/nops.h>
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/irqflags.h>
|
||||
|
||||
/* entries in ARCH_DLINFO: */
|
||||
#ifdef CONFIG_IA32_EMULATION
|
||||
# define AT_VECTOR_SIZE_ARCH 2
|
||||
#else
|
||||
# define AT_VECTOR_SIZE_ARCH 1
|
||||
#endif
|
||||
|
||||
extern unsigned long arch_align_stack(unsigned long sp);
|
||||
|
||||
void default_idle(void);
|
||||
|
||||
/*
|
||||
* Force strict CPU ordering.
|
||||
* And yes, this is required on UP too when we're talking
|
||||
* to devices.
|
||||
*/
|
||||
#ifdef CONFIG_X86_32
|
||||
/*
|
||||
* Some non-Intel clones support out of order store. wmb() ceases to be a
|
||||
* nop for these.
|
||||
*/
|
||||
#define mb() alternative("lock; addl $0,0(%%esp)", "mfence", X86_FEATURE_XMM2)
|
||||
#define rmb() alternative("lock; addl $0,0(%%esp)", "lfence", X86_FEATURE_XMM2)
|
||||
#define wmb() alternative("lock; addl $0,0(%%esp)", "sfence", X86_FEATURE_XMM)
|
||||
#else
|
||||
#define mb() asm volatile("mfence":::"memory")
|
||||
#define rmb() asm volatile("lfence":::"memory")
|
||||
#define wmb() asm volatile("sfence" ::: "memory")
|
||||
#endif
|
||||
|
||||
/**
|
||||
* read_barrier_depends - Flush all pending reads that subsequents reads
|
||||
* depend on.
|
||||
*
|
||||
* No data-dependent reads from memory-like regions are ever reordered
|
||||
* over this barrier. All reads preceding this primitive are guaranteed
|
||||
* to access memory (but not necessarily other CPUs' caches) before any
|
||||
* reads following this primitive that depend on the data return by
|
||||
* any of the preceding reads. This primitive is much lighter weight than
|
||||
* rmb() on most CPUs, and is never heavier weight than is
|
||||
* rmb().
|
||||
*
|
||||
* These ordering constraints are respected by both the local CPU
|
||||
* and the compiler.
|
||||
*
|
||||
* Ordering is not guaranteed by anything other than these primitives,
|
||||
* not even by data dependencies. See the documentation for
|
||||
* memory_barrier() for examples and URLs to more information.
|
||||
*
|
||||
* For example, the following code would force ordering (the initial
|
||||
* value of "a" is zero, "b" is one, and "p" is "&a"):
|
||||
*
|
||||
* <programlisting>
|
||||
* CPU 0 CPU 1
|
||||
*
|
||||
* b = 2;
|
||||
* memory_barrier();
|
||||
* p = &b; q = p;
|
||||
* read_barrier_depends();
|
||||
* d = *q;
|
||||
* </programlisting>
|
||||
*
|
||||
* because the read of "*q" depends on the read of "p" and these
|
||||
* two reads are separated by a read_barrier_depends(). However,
|
||||
* the following code, with the same initial values for "a" and "b":
|
||||
*
|
||||
* <programlisting>
|
||||
* CPU 0 CPU 1
|
||||
*
|
||||
* a = 2;
|
||||
* memory_barrier();
|
||||
* b = 3; y = b;
|
||||
* read_barrier_depends();
|
||||
* x = a;
|
||||
* </programlisting>
|
||||
*
|
||||
* does not enforce ordering, since there is no data dependency between
|
||||
* the read of "a" and the read of "b". Therefore, on some CPUs, such
|
||||
* as Alpha, "y" could be set to 3 and "x" to 0. Use rmb()
|
||||
* in cases like this where there are no data dependencies.
|
||||
**/
|
||||
|
||||
#define read_barrier_depends() do { } while (0)
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
#define smp_mb() mb()
|
||||
#ifdef CONFIG_X86_PPRO_FENCE
|
||||
# define smp_rmb() rmb()
|
||||
#else
|
||||
# define smp_rmb() barrier()
|
||||
#endif
|
||||
#ifdef CONFIG_X86_OOSTORE
|
||||
# define smp_wmb() wmb()
|
||||
#else
|
||||
# define smp_wmb() barrier()
|
||||
#endif
|
||||
#define smp_read_barrier_depends() read_barrier_depends()
|
||||
#define set_mb(var, value) do { (void)xchg(&var, value); } while (0)
|
||||
#else
|
||||
#define smp_mb() barrier()
|
||||
#define smp_rmb() barrier()
|
||||
#define smp_wmb() barrier()
|
||||
#define smp_read_barrier_depends() do { } while (0)
|
||||
#define set_mb(var, value) do { var = value; barrier(); } while (0)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Stop RDTSC speculation. This is needed when you need to use RDTSC
|
||||
* (or get_cycles or vread that possibly accesses the TSC) in a defined
|
||||
* code region.
|
||||
*
|
||||
* (Could use an alternative three way for this if there was one.)
|
||||
*/
|
||||
static inline void rdtsc_barrier(void)
|
||||
{
|
||||
alternative(ASM_NOP3, "mfence", X86_FEATURE_MFENCE_RDTSC);
|
||||
alternative(ASM_NOP3, "lfence", X86_FEATURE_LFENCE_RDTSC);
|
||||
}
|
||||
|
||||
extern void *_switch_to(void *prev, void *next, void *last);
|
||||
#define switch_to(prev, next, last) prev = _switch_to(prev, next, last)
|
||||
|
||||
#endif
|
@ -483,7 +483,7 @@ struct request_queue *blk_alloc_queue_node(gfp_t gfp_mask, int node_id)
|
||||
if (!q)
|
||||
return NULL;
|
||||
|
||||
q->id = ida_simple_get(&blk_queue_ida, 0, 0, GFP_KERNEL);
|
||||
q->id = ida_simple_get(&blk_queue_ida, 0, 0, gfp_mask);
|
||||
if (q->id < 0)
|
||||
goto fail_q;
|
||||
|
||||
@ -1277,7 +1277,8 @@ static bool attempt_plug_merge(struct request_queue *q, struct bio *bio,
|
||||
list_for_each_entry_reverse(rq, &plug->list, queuelist) {
|
||||
int el_ret;
|
||||
|
||||
(*request_count)++;
|
||||
if (rq->q == q)
|
||||
(*request_count)++;
|
||||
|
||||
if (rq->q != q || !blk_rq_merge_ok(rq, bio))
|
||||
continue;
|
||||
|
@ -1218,7 +1218,7 @@ void blk_throtl_drain(struct request_queue *q)
|
||||
struct bio_list bl;
|
||||
struct bio *bio;
|
||||
|
||||
WARN_ON_ONCE(!queue_is_locked(q));
|
||||
queue_lockdep_assert_held(q);
|
||||
|
||||
bio_list_init(&bl);
|
||||
|
||||
|
@ -295,6 +295,7 @@ struct cfq_data {
|
||||
unsigned int cfq_slice_idle;
|
||||
unsigned int cfq_group_idle;
|
||||
unsigned int cfq_latency;
|
||||
unsigned int cfq_target_latency;
|
||||
|
||||
/*
|
||||
* Fallback dummy cfqq for extreme OOM conditions
|
||||
@ -604,7 +605,7 @@ cfq_group_slice(struct cfq_data *cfqd, struct cfq_group *cfqg)
|
||||
{
|
||||
struct cfq_rb_root *st = &cfqd->grp_service_tree;
|
||||
|
||||
return cfq_target_latency * cfqg->weight / st->total_weight;
|
||||
return cfqd->cfq_target_latency * cfqg->weight / st->total_weight;
|
||||
}
|
||||
|
||||
static inline unsigned
|
||||
@ -2271,7 +2272,8 @@ static void choose_service_tree(struct cfq_data *cfqd, struct cfq_group *cfqg)
|
||||
* to have higher weight. A more accurate thing would be to
|
||||
* calculate system wide asnc/sync ratio.
|
||||
*/
|
||||
tmp = cfq_target_latency * cfqg_busy_async_queues(cfqd, cfqg);
|
||||
tmp = cfqd->cfq_target_latency *
|
||||
cfqg_busy_async_queues(cfqd, cfqg);
|
||||
tmp = tmp/cfqd->busy_queues;
|
||||
slice = min_t(unsigned, slice, tmp);
|
||||
|
||||
@ -3737,6 +3739,7 @@ static void *cfq_init_queue(struct request_queue *q)
|
||||
cfqd->cfq_back_penalty = cfq_back_penalty;
|
||||
cfqd->cfq_slice[0] = cfq_slice_async;
|
||||
cfqd->cfq_slice[1] = cfq_slice_sync;
|
||||
cfqd->cfq_target_latency = cfq_target_latency;
|
||||
cfqd->cfq_slice_async_rq = cfq_slice_async_rq;
|
||||
cfqd->cfq_slice_idle = cfq_slice_idle;
|
||||
cfqd->cfq_group_idle = cfq_group_idle;
|
||||
@ -3788,6 +3791,7 @@ SHOW_FUNCTION(cfq_slice_sync_show, cfqd->cfq_slice[1], 1);
|
||||
SHOW_FUNCTION(cfq_slice_async_show, cfqd->cfq_slice[0], 1);
|
||||
SHOW_FUNCTION(cfq_slice_async_rq_show, cfqd->cfq_slice_async_rq, 0);
|
||||
SHOW_FUNCTION(cfq_low_latency_show, cfqd->cfq_latency, 0);
|
||||
SHOW_FUNCTION(cfq_target_latency_show, cfqd->cfq_target_latency, 1);
|
||||
#undef SHOW_FUNCTION
|
||||
|
||||
#define STORE_FUNCTION(__FUNC, __PTR, MIN, MAX, __CONV) \
|
||||
@ -3821,6 +3825,7 @@ STORE_FUNCTION(cfq_slice_async_store, &cfqd->cfq_slice[0], 1, UINT_MAX, 1);
|
||||
STORE_FUNCTION(cfq_slice_async_rq_store, &cfqd->cfq_slice_async_rq, 1,
|
||||
UINT_MAX, 0);
|
||||
STORE_FUNCTION(cfq_low_latency_store, &cfqd->cfq_latency, 0, 1, 0);
|
||||
STORE_FUNCTION(cfq_target_latency_store, &cfqd->cfq_target_latency, 1, UINT_MAX, 1);
|
||||
#undef STORE_FUNCTION
|
||||
|
||||
#define CFQ_ATTR(name) \
|
||||
@ -3838,6 +3843,7 @@ static struct elv_fs_entry cfq_attrs[] = {
|
||||
CFQ_ATTR(slice_idle),
|
||||
CFQ_ATTR(group_idle),
|
||||
CFQ_ATTR(low_latency),
|
||||
CFQ_ATTR(target_latency),
|
||||
__ATTR_NULL
|
||||
};
|
||||
|
||||
|
@ -627,7 +627,7 @@ config CRYPTO_BLOWFISH_COMMON
|
||||
|
||||
config CRYPTO_BLOWFISH_X86_64
|
||||
tristate "Blowfish cipher algorithm (x86_64)"
|
||||
depends on (X86 || UML_X86) && 64BIT
|
||||
depends on X86 && 64BIT
|
||||
select CRYPTO_ALGAPI
|
||||
select CRYPTO_BLOWFISH_COMMON
|
||||
help
|
||||
@ -657,7 +657,7 @@ config CRYPTO_CAMELLIA
|
||||
|
||||
config CRYPTO_CAMELLIA_X86_64
|
||||
tristate "Camellia cipher algorithm (x86_64)"
|
||||
depends on (X86 || UML_X86) && 64BIT
|
||||
depends on X86 && 64BIT
|
||||
depends on CRYPTO
|
||||
select CRYPTO_ALGAPI
|
||||
select CRYPTO_LRW
|
||||
@ -893,7 +893,7 @@ config CRYPTO_TWOFISH_X86_64
|
||||
|
||||
config CRYPTO_TWOFISH_X86_64_3WAY
|
||||
tristate "Twofish cipher algorithm (x86_64, 3-way parallel)"
|
||||
depends on (X86 || UML_X86) && 64BIT
|
||||
depends on X86 && 64BIT
|
||||
select CRYPTO_ALGAPI
|
||||
select CRYPTO_TWOFISH_COMMON
|
||||
select CRYPTO_TWOFISH_X86_64
|
||||
|
@ -247,8 +247,7 @@ static int amba_pm_restore(struct device *dev)
|
||||
/*
|
||||
* Hooks to provide runtime PM of the pclk (bus clock). It is safe to
|
||||
* enable/disable the bus clock at runtime PM suspend/resume as this
|
||||
* does not result in loss of context. However, disabling vcore power
|
||||
* would do, so we leave that to the driver.
|
||||
* does not result in loss of context.
|
||||
*/
|
||||
static int amba_pm_runtime_suspend(struct device *dev)
|
||||
{
|
||||
@ -354,39 +353,6 @@ static void amba_put_disable_pclk(struct amba_device *pcdev)
|
||||
clk_put(pclk);
|
||||
}
|
||||
|
||||
static int amba_get_enable_vcore(struct amba_device *pcdev)
|
||||
{
|
||||
struct regulator *vcore = regulator_get(&pcdev->dev, "vcore");
|
||||
int ret;
|
||||
|
||||
pcdev->vcore = vcore;
|
||||
|
||||
if (IS_ERR(vcore)) {
|
||||
/* It is OK not to supply a vcore regulator */
|
||||
if (PTR_ERR(vcore) == -ENODEV)
|
||||
return 0;
|
||||
return PTR_ERR(vcore);
|
||||
}
|
||||
|
||||
ret = regulator_enable(vcore);
|
||||
if (ret) {
|
||||
regulator_put(vcore);
|
||||
pcdev->vcore = ERR_PTR(-ENODEV);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void amba_put_disable_vcore(struct amba_device *pcdev)
|
||||
{
|
||||
struct regulator *vcore = pcdev->vcore;
|
||||
|
||||
if (!IS_ERR(vcore)) {
|
||||
regulator_disable(vcore);
|
||||
regulator_put(vcore);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* These are the device model conversion veneers; they convert the
|
||||
* device model structures to our more specific structures.
|
||||
@ -399,10 +365,6 @@ static int amba_probe(struct device *dev)
|
||||
int ret;
|
||||
|
||||
do {
|
||||
ret = amba_get_enable_vcore(pcdev);
|
||||
if (ret)
|
||||
break;
|
||||
|
||||
ret = amba_get_enable_pclk(pcdev);
|
||||
if (ret)
|
||||
break;
|
||||
@ -420,7 +382,6 @@ static int amba_probe(struct device *dev)
|
||||
pm_runtime_put_noidle(dev);
|
||||
|
||||
amba_put_disable_pclk(pcdev);
|
||||
amba_put_disable_vcore(pcdev);
|
||||
} while (0);
|
||||
|
||||
return ret;
|
||||
@ -442,7 +403,6 @@ static int amba_remove(struct device *dev)
|
||||
pm_runtime_put_noidle(dev);
|
||||
|
||||
amba_put_disable_pclk(pcdev);
|
||||
amba_put_disable_vcore(pcdev);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -15,7 +15,7 @@
|
||||
#include <linux/sys_soc.h>
|
||||
#include <linux/err.h>
|
||||
|
||||
static DEFINE_IDR(soc_ida);
|
||||
static DEFINE_IDA(soc_ida);
|
||||
static DEFINE_SPINLOCK(soc_lock);
|
||||
|
||||
static ssize_t soc_info_get(struct device *dev,
|
||||
@ -168,8 +168,6 @@ void soc_device_unregister(struct soc_device *soc_dev)
|
||||
|
||||
static int __init soc_bus_register(void)
|
||||
{
|
||||
spin_lock_init(&soc_lock);
|
||||
|
||||
return bus_register(&soc_bus_type);
|
||||
}
|
||||
core_initcall(soc_bus_register);
|
||||
|
@ -29,7 +29,7 @@ config BCMA_HOST_PCI
|
||||
|
||||
config BCMA_DRIVER_PCI_HOSTMODE
|
||||
bool "Driver for PCI core working in hostmode"
|
||||
depends on BCMA && MIPS
|
||||
depends on BCMA && MIPS && BCMA_HOST_PCI
|
||||
help
|
||||
PCI core hostmode operation (external PCI bus).
|
||||
|
||||
|
@ -10,6 +10,7 @@
|
||||
*/
|
||||
|
||||
#include "bcma_private.h"
|
||||
#include <linux/pci.h>
|
||||
#include <linux/export.h>
|
||||
#include <linux/bcma/bcma.h>
|
||||
#include <asm/paccess.h>
|
||||
|
@ -866,6 +866,7 @@ cciss_scsi_detect(ctlr_info_t *h)
|
||||
sh->can_queue = cciss_tape_cmds;
|
||||
sh->sg_tablesize = h->maxsgentries;
|
||||
sh->max_cmd_len = MAX_COMMAND_SIZE;
|
||||
sh->max_sectors = h->cciss_max_sectors;
|
||||
|
||||
((struct cciss_scsi_adapter_data_t *)
|
||||
h->scsi_ctlr)->scsi_host = sh;
|
||||
@ -1410,7 +1411,7 @@ static void cciss_scatter_gather(ctlr_info_t *h, CommandList_struct *c,
|
||||
/* track how many SG entries we are using */
|
||||
if (request_nsgs > h->maxSG)
|
||||
h->maxSG = request_nsgs;
|
||||
c->Header.SGTotal = (__u8) request_nsgs + chained;
|
||||
c->Header.SGTotal = (u16) request_nsgs + chained;
|
||||
if (request_nsgs > h->max_cmd_sgentries)
|
||||
c->Header.SGList = h->max_cmd_sgentries;
|
||||
else
|
||||
|
@ -4,6 +4,6 @@
|
||||
|
||||
config BLK_DEV_PCIESSD_MTIP32XX
|
||||
tristate "Block Device Driver for Micron PCIe SSDs"
|
||||
depends on HOTPLUG_PCI_PCIE
|
||||
depends on PCI
|
||||
help
|
||||
This enables the block driver for Micron PCIe SSDs.
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -34,8 +34,8 @@
|
||||
/* offset of Device Control register in PCIe extended capabilites space */
|
||||
#define PCIE_CONFIG_EXT_DEVICE_CONTROL_OFFSET 0x48
|
||||
|
||||
/* # of times to retry timed out IOs */
|
||||
#define MTIP_MAX_RETRIES 5
|
||||
/* # of times to retry timed out/failed IOs */
|
||||
#define MTIP_MAX_RETRIES 2
|
||||
|
||||
/* Various timeout values in ms */
|
||||
#define MTIP_NCQ_COMMAND_TIMEOUT_MS 5000
|
||||
@ -114,12 +114,41 @@
|
||||
#define __force_bit2int (unsigned int __force)
|
||||
|
||||
/* below are bit numbers in 'flags' defined in mtip_port */
|
||||
#define MTIP_FLAG_IC_ACTIVE_BIT 0
|
||||
#define MTIP_FLAG_EH_ACTIVE_BIT 1
|
||||
#define MTIP_FLAG_SVC_THD_ACTIVE_BIT 2
|
||||
#define MTIP_FLAG_ISSUE_CMDS_BIT 4
|
||||
#define MTIP_FLAG_REBUILD_BIT 5
|
||||
#define MTIP_FLAG_SVC_THD_SHOULD_STOP_BIT 8
|
||||
#define MTIP_PF_IC_ACTIVE_BIT 0 /* pio/ioctl */
|
||||
#define MTIP_PF_EH_ACTIVE_BIT 1 /* error handling */
|
||||
#define MTIP_PF_SE_ACTIVE_BIT 2 /* secure erase */
|
||||
#define MTIP_PF_DM_ACTIVE_BIT 3 /* download microcde */
|
||||
#define MTIP_PF_PAUSE_IO ((1 << MTIP_PF_IC_ACTIVE_BIT) | \
|
||||
(1 << MTIP_PF_EH_ACTIVE_BIT) | \
|
||||
(1 << MTIP_PF_SE_ACTIVE_BIT) | \
|
||||
(1 << MTIP_PF_DM_ACTIVE_BIT))
|
||||
|
||||
#define MTIP_PF_SVC_THD_ACTIVE_BIT 4
|
||||
#define MTIP_PF_ISSUE_CMDS_BIT 5
|
||||
#define MTIP_PF_REBUILD_BIT 6
|
||||
#define MTIP_PF_SVC_THD_STOP_BIT 8
|
||||
|
||||
/* below are bit numbers in 'dd_flag' defined in driver_data */
|
||||
#define MTIP_DDF_REMOVE_PENDING_BIT 1
|
||||
#define MTIP_DDF_OVER_TEMP_BIT 2
|
||||
#define MTIP_DDF_WRITE_PROTECT_BIT 3
|
||||
#define MTIP_DDF_STOP_IO ((1 << MTIP_DDF_REMOVE_PENDING_BIT) | \
|
||||
(1 << MTIP_DDF_OVER_TEMP_BIT) | \
|
||||
(1 << MTIP_DDF_WRITE_PROTECT_BIT))
|
||||
|
||||
#define MTIP_DDF_CLEANUP_BIT 5
|
||||
#define MTIP_DDF_RESUME_BIT 6
|
||||
#define MTIP_DDF_INIT_DONE_BIT 7
|
||||
#define MTIP_DDF_REBUILD_FAILED_BIT 8
|
||||
|
||||
__packed struct smart_attr{
|
||||
u8 attr_id;
|
||||
u16 flags;
|
||||
u8 cur;
|
||||
u8 worst;
|
||||
u32 data;
|
||||
u8 res[3];
|
||||
};
|
||||
|
||||
/* Register Frame Information Structure (FIS), host to device. */
|
||||
struct host_to_dev_fis {
|
||||
@ -345,6 +374,12 @@ struct mtip_port {
|
||||
* when the command slot and all associated data structures
|
||||
* are no longer needed.
|
||||
*/
|
||||
u16 *log_buf;
|
||||
dma_addr_t log_buf_dma;
|
||||
|
||||
u8 *smart_buf;
|
||||
dma_addr_t smart_buf_dma;
|
||||
|
||||
unsigned long allocated[SLOTBITS_IN_LONGS];
|
||||
/*
|
||||
* used to queue commands when an internal command is in progress
|
||||
@ -368,6 +403,7 @@ struct mtip_port {
|
||||
* Timer used to complete commands that have been active for too long.
|
||||
*/
|
||||
struct timer_list cmd_timer;
|
||||
unsigned long ic_pause_timer;
|
||||
/*
|
||||
* Semaphore used to block threads if there are no
|
||||
* command slots available.
|
||||
@ -404,13 +440,9 @@ struct driver_data {
|
||||
|
||||
unsigned slot_groups; /* number of slot groups the product supports */
|
||||
|
||||
atomic_t drv_cleanup_done; /* Atomic variable for SRSI */
|
||||
|
||||
unsigned long index; /* Index to determine the disk name */
|
||||
|
||||
unsigned int ftlrebuildflag; /* FTL rebuild flag */
|
||||
|
||||
atomic_t resumeflag; /* Atomic variable to track suspend/resume */
|
||||
unsigned long dd_flag; /* NOTE: use atomic bit operations on this */
|
||||
|
||||
struct task_struct *mtip_svc_handler; /* task_struct of svc thd */
|
||||
};
|
||||
|
@ -351,6 +351,7 @@ static void virtblk_config_changed_work(struct work_struct *work)
|
||||
cap_str_10, cap_str_2);
|
||||
|
||||
set_capacity(vblk->disk, capacity);
|
||||
revalidate_disk(vblk->disk);
|
||||
done:
|
||||
mutex_unlock(&vblk->config_lock);
|
||||
}
|
||||
|
@ -321,6 +321,7 @@ struct seg_buf {
|
||||
static void xen_blkbk_unmap(struct pending_req *req)
|
||||
{
|
||||
struct gnttab_unmap_grant_ref unmap[BLKIF_MAX_SEGMENTS_PER_REQUEST];
|
||||
struct page *pages[BLKIF_MAX_SEGMENTS_PER_REQUEST];
|
||||
unsigned int i, invcount = 0;
|
||||
grant_handle_t handle;
|
||||
int ret;
|
||||
@ -332,25 +333,12 @@ static void xen_blkbk_unmap(struct pending_req *req)
|
||||
gnttab_set_unmap_op(&unmap[invcount], vaddr(req, i),
|
||||
GNTMAP_host_map, handle);
|
||||
pending_handle(req, i) = BLKBACK_INVALID_HANDLE;
|
||||
pages[invcount] = virt_to_page(vaddr(req, i));
|
||||
invcount++;
|
||||
}
|
||||
|
||||
ret = HYPERVISOR_grant_table_op(
|
||||
GNTTABOP_unmap_grant_ref, unmap, invcount);
|
||||
ret = gnttab_unmap_refs(unmap, pages, invcount, false);
|
||||
BUG_ON(ret);
|
||||
/*
|
||||
* Note, we use invcount, so nr->pages, so we can't index
|
||||
* using vaddr(req, i).
|
||||
*/
|
||||
for (i = 0; i < invcount; i++) {
|
||||
ret = m2p_remove_override(
|
||||
virt_to_page(unmap[i].host_addr), false);
|
||||
if (ret) {
|
||||
pr_alert(DRV_PFX "Failed to remove M2P override for %lx\n",
|
||||
(unsigned long)unmap[i].host_addr);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static int xen_blkbk_map(struct blkif_request *req,
|
||||
@ -378,7 +366,7 @@ static int xen_blkbk_map(struct blkif_request *req,
|
||||
pending_req->blkif->domid);
|
||||
}
|
||||
|
||||
ret = HYPERVISOR_grant_table_op(GNTTABOP_map_grant_ref, map, nseg);
|
||||
ret = gnttab_map_refs(map, NULL, &blkbk->pending_page(pending_req, 0), nseg);
|
||||
BUG_ON(ret);
|
||||
|
||||
/*
|
||||
@ -398,15 +386,6 @@ static int xen_blkbk_map(struct blkif_request *req,
|
||||
if (ret)
|
||||
continue;
|
||||
|
||||
ret = m2p_add_override(PFN_DOWN(map[i].dev_bus_addr),
|
||||
blkbk->pending_page(pending_req, i), NULL);
|
||||
if (ret) {
|
||||
pr_alert(DRV_PFX "Failed to install M2P override for %lx (ret: %d)\n",
|
||||
(unsigned long)map[i].dev_bus_addr, ret);
|
||||
/* We could switch over to GNTTABOP_copy */
|
||||
continue;
|
||||
}
|
||||
|
||||
seg[i].buf = map[i].dev_bus_addr |
|
||||
(req->u.rw.seg[i].first_sect << 9);
|
||||
}
|
||||
@ -419,21 +398,18 @@ static int dispatch_discard_io(struct xen_blkif *blkif,
|
||||
int err = 0;
|
||||
int status = BLKIF_RSP_OKAY;
|
||||
struct block_device *bdev = blkif->vbd.bdev;
|
||||
unsigned long secure;
|
||||
|
||||
blkif->st_ds_req++;
|
||||
|
||||
xen_blkif_get(blkif);
|
||||
if (blkif->blk_backend_type == BLKIF_BACKEND_PHY ||
|
||||
blkif->blk_backend_type == BLKIF_BACKEND_FILE) {
|
||||
unsigned long secure = (blkif->vbd.discard_secure &&
|
||||
(req->u.discard.flag & BLKIF_DISCARD_SECURE)) ?
|
||||
BLKDEV_DISCARD_SECURE : 0;
|
||||
err = blkdev_issue_discard(bdev,
|
||||
req->u.discard.sector_number,
|
||||
req->u.discard.nr_sectors,
|
||||
GFP_KERNEL, secure);
|
||||
} else
|
||||
err = -EOPNOTSUPP;
|
||||
secure = (blkif->vbd.discard_secure &&
|
||||
(req->u.discard.flag & BLKIF_DISCARD_SECURE)) ?
|
||||
BLKDEV_DISCARD_SECURE : 0;
|
||||
|
||||
err = blkdev_issue_discard(bdev, req->u.discard.sector_number,
|
||||
req->u.discard.nr_sectors,
|
||||
GFP_KERNEL, secure);
|
||||
|
||||
if (err == -EOPNOTSUPP) {
|
||||
pr_debug(DRV_PFX "discard op failed, not supported\n");
|
||||
@ -830,7 +806,7 @@ static int __init xen_blkif_init(void)
|
||||
int i, mmap_pages;
|
||||
int rc = 0;
|
||||
|
||||
if (!xen_pv_domain())
|
||||
if (!xen_domain())
|
||||
return -ENODEV;
|
||||
|
||||
blkbk = kzalloc(sizeof(struct xen_blkbk), GFP_KERNEL);
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user