Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 188825
b: refs/heads/master
c: 2a238a9
h: refs/heads/master
i:
  188823: a5c4fdf
v: v3
  • Loading branch information
Akinobu Mita authored and Matt Turner committed Mar 19, 2010
1 parent d87c3de commit b7a890e
Show file tree
Hide file tree
Showing 137 changed files with 392 additions and 28,914 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 95c46afe6034d15bdf0f95d69f25489cecad9a47
refs/heads/master: 2a238a96358dde09aa52de9b9f97a383165ca651
2 changes: 1 addition & 1 deletion trunk/Documentation/ABI/testing/sysfs-bus-usb
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ Description:
match the driver to the device. For example:
# echo "046d c315" > /sys/bus/usb/drivers/foo/remove_id

What: /sys/bus/usb/device/.../avoid_reset_quirk
What: /sys/bus/usb/device/.../avoid_reset
Date: December 2009
Contact: Oliver Neukum <oliver@neukum.org>
Description:
Expand Down
139 changes: 0 additions & 139 deletions trunk/Documentation/filesystems/ceph.txt

This file was deleted.

1 change: 0 additions & 1 deletion trunk/Documentation/ioctl/ioctl-number.txt
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,6 @@ Code Seq#(hex) Include File Comments
0x92 00-0F drivers/usb/mon/mon_bin.c
0x93 60-7F linux/auto_fs.h
0x94 all fs/btrfs/ioctl.h
0x97 00-7F fs/ceph/ioctl.h Ceph file system
0x99 00-0F 537-Addinboard driver
<mailto:buk@buks.ipn.de>
0xA0 all linux/sdp/sdp.h Industrial Device Project
Expand Down
60 changes: 20 additions & 40 deletions trunk/Documentation/kobject.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,56 +59,37 @@ nice to have in other objects. The C language does not allow for the
direct expression of inheritance, so other techniques - such as structure
embedding - must be used.

(As an aside, for those familiar with the kernel linked list implementation,
this is analogous as to how "list_head" structs are rarely useful on
their own, but are invariably found embedded in the larger objects of
interest.)
So, for example, the UIO code has a structure that defines the memory
region associated with a uio device:

So, for example, the UIO code in drivers/uio/uio.c has a structure that
defines the memory region associated with a uio device:

struct uio_map {
struct uio_mem {
struct kobject kobj;
struct uio_mem *mem;
};
unsigned long addr;
unsigned long size;
int memtype;
void __iomem *internal_addr;
};

If you have a struct uio_map structure, finding its embedded kobject is
If you have a struct uio_mem structure, finding its embedded kobject is
just a matter of using the kobj member. Code that works with kobjects will
often have the opposite problem, however: given a struct kobject pointer,
what is the pointer to the containing structure? You must avoid tricks
(such as assuming that the kobject is at the beginning of the structure)
and, instead, use the container_of() macro, found in <linux/kernel.h>:

container_of(pointer, type, member)

where:

* "pointer" is the pointer to the embedded kobject,
* "type" is the type of the containing structure, and
* "member" is the name of the structure field to which "pointer" points.

The return value from container_of() is a pointer to the corresponding
container type. So, for example, a pointer "kp" to a struct kobject
embedded *within* a struct uio_map could be converted to a pointer to the
*containing* uio_map structure with:

struct uio_map *u_map = container_of(kp, struct uio_map, kobj);

For convenience, programmers often define a simple macro for "back-casting"
kobject pointers to the containing type. Exactly this happens in the
earlier drivers/uio/uio.c, as you can see here:

struct uio_map {
struct kobject kobj;
struct uio_mem *mem;
};
container_of(pointer, type, member)

#define to_map(map) container_of(map, struct uio_map, kobj)
where pointer is the pointer to the embedded kobject, type is the type of
the containing structure, and member is the name of the structure field to
which pointer points. The return value from container_of() is a pointer to
the given type. So, for example, a pointer "kp" to a struct kobject
embedded within a struct uio_mem could be converted to a pointer to the
containing uio_mem structure with:

where the macro argument "map" is a pointer to the struct kobject in
question. That macro is subsequently invoked with:
struct uio_mem *u_mem = container_of(kp, struct uio_mem, kobj);

struct uio_map *map = to_map(kobj);
Programmers often define a simple macro for "back-casting" kobject pointers
to the containing type.


Initialization of kobjects
Expand Down Expand Up @@ -406,5 +387,4 @@ called, and the objects in the former circle release each other.
Example code to copy from

For a more complete example of using ksets and kobjects properly, see the
example programs samples/kobject/{kobject-example.c,kset-example.c},
which will be built as loadable modules if you select CONFIG_SAMPLE_KOBJECT.
sample/kobject/kset-example.c code.
9 changes: 0 additions & 9 deletions trunk/MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -1441,15 +1441,6 @@ F: arch/powerpc/include/asm/spu*.h
F: arch/powerpc/oprofile/*cell*
F: arch/powerpc/platforms/cell/

CEPH DISTRIBUTED FILE SYSTEM CLIENT
M: Sage Weil <sage@newdream.net>
L: ceph-devel@lists.sourceforge.net
W: http://ceph.newdream.net/
T: git git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client.git
S: Supported
F: Documentation/filesystems/ceph.txt
F: fs/ceph

CERTIFIED WIRELESS USB (WUSB) SUBSYSTEM:
M: David Vrabel <david.vrabel@csr.com>
L: linux-usb@vger.kernel.org
Expand Down
10 changes: 3 additions & 7 deletions trunk/arch/alpha/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include <linux/module.h>
#include <linux/init.h>
#include <linux/kallsyms.h>
#include <linux/ratelimit.h>

#include <asm/gentrap.h>
#include <asm/uaccess.h>
Expand Down Expand Up @@ -771,8 +772,7 @@ asmlinkage void
do_entUnaUser(void __user * va, unsigned long opcode,
unsigned long reg, struct pt_regs *regs)
{
static int cnt = 0;
static unsigned long last_time;
static DEFINE_RATELIMIT_STATE(ratelimit, 5 * HZ, 5);

unsigned long tmp1, tmp2, tmp3, tmp4;
unsigned long fake_reg, *reg_addr = &fake_reg;
Expand All @@ -783,15 +783,11 @@ do_entUnaUser(void __user * va, unsigned long opcode,
with the unaliged access. */

if (!test_thread_flag (TIF_UAC_NOPRINT)) {
if (cnt >= 5 && time_after(jiffies, last_time + 5 * HZ)) {
cnt = 0;
}
if (++cnt < 5) {
if (__ratelimit(&ratelimit)) {
printk("%s(%d): unaligned trap at %016lx: %p %lx %ld\n",
current->comm, task_pid_nr(current),
regs->pc - 4, va, opcode, reg);
}
last_time = jiffies;
}
if (test_thread_flag (TIF_UAC_SIGBUS))
goto give_sigbus;
Expand Down
13 changes: 13 additions & 0 deletions trunk/arch/powerpc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,19 @@ config 8XX_MINIMAL_FPEMU

It is recommended that you build a soft-float userspace instead.

config IOMMU_VMERGE
bool "Enable IOMMU virtual merging"
depends on PPC64
default y
help
Cause IO segments sent to a device for DMA to be merged virtually
by the IOMMU when they happen to have been allocated contiguously.
This doesn't add pressure to the IOMMU allocator. However, some
drivers don't support getting large merged segments coming back
from *_map_sg().

Most drivers don't have this problem; it is safe to say Y here.

config IOMMU_HELPER
def_bool PPC64

Expand Down
6 changes: 3 additions & 3 deletions trunk/arch/powerpc/include/asm/ppc-opcode.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#define PPC_INST_LDARX 0x7c0000a8
#define PPC_INST_LSWI 0x7c0004aa
#define PPC_INST_LSWX 0x7c00042a
#define PPC_INST_LWARX 0x7c000028
#define PPC_INST_LWARX 0x7c000029
#define PPC_INST_LWSYNC 0x7c2004ac
#define PPC_INST_LXVD2X 0x7c000698
#define PPC_INST_MCRXR 0x7c000400
Expand Down Expand Up @@ -62,8 +62,8 @@
#define __PPC_T_TLB(t) (((t) & 0x3) << 21)
#define __PPC_WC(w) (((w) & 0x3) << 21)
/*
* Only use the larx hint bit on 64bit CPUs. e500v1/v2 based CPUs will treat a
* larx with EH set as an illegal instruction.
* Only use the larx hint bit on 64bit CPUs. Once we verify it doesn't have
* any side effects on all 32bit processors, we can do this all the time.
*/
#ifdef CONFIG_PPC64
#define __PPC_EH(eh) (((eh) & 0x1) << 0)
Expand Down
6 changes: 3 additions & 3 deletions trunk/arch/powerpc/include/asm/syscall.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ static inline void syscall_rollback(struct task_struct *task,
static inline long syscall_get_error(struct task_struct *task,
struct pt_regs *regs)
{
return (regs->ccr & 0x10000000) ? -regs->gpr[3] : 0;
return (regs->ccr & 0x1000) ? -regs->gpr[3] : 0;
}

static inline long syscall_get_return_value(struct task_struct *task,
Expand All @@ -44,10 +44,10 @@ static inline void syscall_set_return_value(struct task_struct *task,
int error, long val)
{
if (error) {
regs->ccr |= 0x10000000L;
regs->ccr |= 0x1000L;
regs->gpr[3] = -error;
} else {
regs->ccr &= ~0x10000000L;
regs->ccr &= ~0x1000L;
regs->gpr[3] = val;
}
}
Expand Down
7 changes: 3 additions & 4 deletions trunk/arch/powerpc/kernel/head_fsl_booke.S
Original file line number Diff line number Diff line change
Expand Up @@ -746,6 +746,9 @@ finish_tlb_load:
rlwimi r12, r11, 32-19, 27, 31 /* extract WIMGE from pte */
#else
rlwimi r12, r11, 26, 27, 31 /* extract WIMGE from pte */
#endif
#ifdef CONFIG_SMP
ori r12, r12, MAS2_M
#endif
mtspr SPRN_MAS2, r12

Expand Down Expand Up @@ -884,17 +887,13 @@ KernelSPE:
lwz r3,_MSR(r1)
oris r3,r3,MSR_SPE@h
stw r3,_MSR(r1) /* enable use of SPE after return */
#ifdef CONFIG_PRINTK
lis r3,87f@h
ori r3,r3,87f@l
mr r4,r2 /* current */
lwz r5,_NIP(r1)
bl printk
#endif
b ret_from_except
#ifdef CONFIG_PRINTK
87: .string "SPE used in kernel (task=%p, pc=%x) \n"
#endif
.align 4,0

#endif /* CONFIG_SPE */
Expand Down
7 changes: 6 additions & 1 deletion trunk/arch/powerpc/kernel/iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,12 @@

#define DBG(...)

static int novmerge;
#ifdef CONFIG_IOMMU_VMERGE
static int novmerge = 0;
#else
static int novmerge = 1;
#endif

static int protect4gb = 1;

static void __iommu_free(struct iommu_table *, dma_addr_t, unsigned int);
Expand Down
Loading

0 comments on commit b7a890e

Please sign in to comment.