Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 260882
b: refs/heads/master
c: 597a67e
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed Jul 27, 2011
1 parent d292a14 commit eb5b758
Show file tree
Hide file tree
Showing 212 changed files with 27,311 additions and 1,500 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: 510792ee29770a38dd409bf2b469ade2fea9eb52
refs/heads/master: 597a67e0ba758e3d2239c81fbb648c6e69ec30a2
36 changes: 36 additions & 0 deletions trunk/Documentation/devicetree/bindings/gpio/gpio_keys.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
Device-Tree bindings for input/gpio_keys.c keyboard driver

Required properties:
- compatible = "gpio-keys";

Optional properties:
- autorepeat: Boolean, Enable auto repeat feature of Linux input
subsystem.

Each button (key) is represented as a sub-node of "gpio-keys":
Subnode properties:

- gpios: OF devcie-tree gpio specificatin.
- label: Descriptive name of the key.
- linux,code: Keycode to emit.

Optional subnode-properties:
- linux,input-type: Specify event type this button/key generates.
If not specified defaults to <1> == EV_KEY.
- debounce-interval: Debouncing interval time in milliseconds.
If not specified defaults to 5.
- gpio-key,wakeup: Boolean, button can wake-up the system.

Example nodes:

gpio_keys {
compatible = "gpio-keys";
#address-cells = <1>;
#size-cells = <0>;
autorepeat;
button@21 {
label = "GPIO Key UP";
linux,code = <103>;
gpios = <&gpio1 0 1>;
};
...
9 changes: 8 additions & 1 deletion trunk/Documentation/filesystems/nfs/Exporting
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,14 @@ For a filesystem to be exportable it must:
1/ provide the filehandle fragment routines described below.
2/ make sure that d_splice_alias is used rather than d_add
when ->lookup finds an inode for a given parent and name.
Typically the ->lookup routine will end with a:

If inode is NULL, d_splice_alias(inode, dentry) is eqivalent to

d_add(dentry, inode), NULL

Similarly, d_splice_alias(ERR_PTR(err), dentry) = ERR_PTR(err)

Typically the ->lookup routine will simply end with a:

return d_splice_alias(inode, dentry);
}
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/microblaze/include/asm/cpuinfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ struct cpuinfo {
u32 use_exc;
u32 ver_code;
u32 mmu;
u32 mmu_privins;
u32 endian;

/* CPU caches */
Expand Down
20 changes: 10 additions & 10 deletions trunk/arch/microblaze/include/asm/irqflags.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

#if CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR

static inline unsigned long arch_local_irq_save(void)
static inline notrace unsigned long arch_local_irq_save(void)
{
unsigned long flags;
asm volatile(" msrclr %0, %1 \n"
Expand All @@ -25,7 +25,7 @@ static inline unsigned long arch_local_irq_save(void)
return flags;
}

static inline void arch_local_irq_disable(void)
static inline notrace void arch_local_irq_disable(void)
{
/* this uses r0 without declaring it - is that correct? */
asm volatile(" msrclr r0, %0 \n"
Expand All @@ -35,7 +35,7 @@ static inline void arch_local_irq_disable(void)
: "memory");
}

static inline void arch_local_irq_enable(void)
static inline notrace void arch_local_irq_enable(void)
{
/* this uses r0 without declaring it - is that correct? */
asm volatile(" msrset r0, %0 \n"
Expand All @@ -47,7 +47,7 @@ static inline void arch_local_irq_enable(void)

#else /* !CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR */

static inline unsigned long arch_local_irq_save(void)
static inline notrace unsigned long arch_local_irq_save(void)
{
unsigned long flags, tmp;
asm volatile (" mfs %0, rmsr \n"
Expand All @@ -61,7 +61,7 @@ static inline unsigned long arch_local_irq_save(void)
return flags;
}

static inline void arch_local_irq_disable(void)
static inline notrace void arch_local_irq_disable(void)
{
unsigned long tmp;
asm volatile(" mfs %0, rmsr \n"
Expand All @@ -74,7 +74,7 @@ static inline void arch_local_irq_disable(void)
: "memory");
}

static inline void arch_local_irq_enable(void)
static inline notrace void arch_local_irq_enable(void)
{
unsigned long tmp;
asm volatile(" mfs %0, rmsr \n"
Expand All @@ -89,7 +89,7 @@ static inline void arch_local_irq_enable(void)

#endif /* CONFIG_XILINX_MICROBLAZE0_USE_MSR_INSTR */

static inline unsigned long arch_local_save_flags(void)
static inline notrace unsigned long arch_local_save_flags(void)
{
unsigned long flags;
asm volatile(" mfs %0, rmsr \n"
Expand All @@ -100,7 +100,7 @@ static inline unsigned long arch_local_save_flags(void)
return flags;
}

static inline void arch_local_irq_restore(unsigned long flags)
static inline notrace void arch_local_irq_restore(unsigned long flags)
{
asm volatile(" mts rmsr, %0 \n"
" nop \n"
Expand All @@ -109,12 +109,12 @@ static inline void arch_local_irq_restore(unsigned long flags)
: "memory");
}

static inline bool arch_irqs_disabled_flags(unsigned long flags)
static inline notrace bool arch_irqs_disabled_flags(unsigned long flags)
{
return (flags & MSR_IE) == 0;
}

static inline bool arch_irqs_disabled(void)
static inline notrace bool arch_irqs_disabled(void)
{
return arch_irqs_disabled_flags(arch_local_save_flags());
}
Expand Down
3 changes: 0 additions & 3 deletions trunk/arch/microblaze/include/asm/processor.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,6 @@ struct thread_struct {
.pgdir = swapper_pg_dir, \
}

/* Do necessary setup to start up a newly executed thread. */
void start_thread(struct pt_regs *regs,
unsigned long pc, unsigned long usp);

/* Free all resources held by a thread. */
extern inline void release_thread(struct task_struct *dead_task)
Expand Down
8 changes: 6 additions & 2 deletions trunk/arch/microblaze/include/asm/prom.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,12 @@
#define HAVE_ARCH_DEVTREE_FIXUPS

/* Other Prototypes */
extern int early_uartlite_console(void);
extern int early_uart16550_console(void);
enum early_consoles {
UARTLITE = 1,
UART16550 = 2,
};

extern int of_early_console(void *version);

/*
* OF address retreival & translation
Expand Down
5 changes: 3 additions & 2 deletions trunk/arch/microblaze/include/asm/pvr.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,16 +111,16 @@ struct pvr_s {
/* Target family PVR mask */
#define PVR10_TARGET_FAMILY_MASK 0xFF000000

/* MMU descrtiption */
/* MMU description */
#define PVR11_USE_MMU 0xC0000000
#define PVR11_MMU_ITLB_SIZE 0x38000000
#define PVR11_MMU_DTLB_SIZE 0x07000000
#define PVR11_MMU_TLB_ACCESS 0x00C00000
#define PVR11_MMU_ZONES 0x003C0000
#define PVR11_MMU_PRIVINS 0x00010000
/* MSR Reset value PVR mask */
#define PVR11_MSR_RESET_VALUE_MASK 0x000007FF


/* PVR access macros */
#define PVR_IS_FULL(_pvr) (_pvr.pvr[0] & PVR0_PVR_FULL_MASK)
#define PVR_USE_BARREL(_pvr) (_pvr.pvr[0] & PVR0_USE_BARREL_MASK)
Expand Down Expand Up @@ -216,6 +216,7 @@ struct pvr_s {
#define PVR_MMU_DTLB_SIZE(_pvr) (_pvr.pvr[11] & PVR11_MMU_DTLB_SIZE)
#define PVR_MMU_TLB_ACCESS(_pvr) (_pvr.pvr[11] & PVR11_MMU_TLB_ACCESS)
#define PVR_MMU_ZONES(_pvr) (_pvr.pvr[11] & PVR11_MMU_ZONES)
#define PVR_MMU_PRIVINS(pvr) (pvr.pvr[11] & PVR11_MMU_PRIVINS)

/* endian */
#define PVR_ENDIAN(_pvr) (_pvr.pvr[0] & PVR0_ENDI)
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/microblaze/include/asm/setup.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ extern char cmd_line[COMMAND_LINE_SIZE];
void early_printk(const char *fmt, ...);

int setup_early_printk(char *opt);
void remap_early_printk(void);
void disable_early_printk(void);

#if defined(CONFIG_EARLY_PRINTK)
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/microblaze/kernel/cpu/cpuinfo-pvr-full.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ void set_cpuinfo_pvr_full(struct cpuinfo *ci, struct device_node *cpu)
CI(pvr_user2, USER2);

CI(mmu, USE_MMU);
CI(mmu_privins, MMU_PRIVINS);
CI(endian, ENDIAN);

CI(use_icache, USE_ICACHE);
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/microblaze/kernel/cpu/cpuinfo-static.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ void __init set_cpuinfo_static(struct cpuinfo *ci, struct device_node *cpu)
ci->pvr_user2 = fcpu(cpu, "xlnx,pvr-user2");

ci->mmu = fcpu(cpu, "xlnx,use-mmu");
ci->mmu_privins = fcpu(cpu, "xlnx,mmu-privileged-instr");
ci->endian = fcpu(cpu, "xlnx,endianness");

ci->ver_code = 0;
Expand Down
4 changes: 4 additions & 0 deletions trunk/arch/microblaze/kernel/cpu/cpuinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,8 @@ void __init setup_cpuinfo(void)
printk(KERN_WARNING "%s: Unsupported PVR setting\n", __func__);
set_cpuinfo_static(&cpuinfo, cpu);
}

if (cpuinfo.mmu_privins)
printk(KERN_WARNING "%s: Stream instructions enabled"
" - USERSPACE CAN LOCK THIS KERNEL!\n", __func__);
}
9 changes: 7 additions & 2 deletions trunk/arch/microblaze/kernel/cpu/mb.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@ static int show_cpuinfo(struct seq_file *m, void *v)
(cpuinfo.use_exc & PVR2_FPU_EXC_MASK) ? "fpu " : "",
(cpuinfo.use_exc & PVR2_USE_FSL_EXC) ? "fsl " : "");

count += seq_printf(m,
"Stream-insns:\t%sprivileged\n",
cpuinfo.mmu_privins ? "un" : "");

if (cpuinfo.use_icache)
count += seq_printf(m,
"Icache:\t\t%ukB\tline length:\t%dB\n",
Expand All @@ -110,10 +114,11 @@ static int show_cpuinfo(struct seq_file *m, void *v)
"Dcache:\t\t%ukB\tline length:\t%dB\n",
cpuinfo.dcache_size >> 10,
cpuinfo.dcache_line_length);
seq_printf(m, "Dcache-Policy:\t");
if (cpuinfo.dcache_wb)
count += seq_printf(m, "\t\twrite-back\n");
count += seq_printf(m, "write-back\n");
else
count += seq_printf(m, "\t\twrite-through\n");
count += seq_printf(m, "write-through\n");
} else
count += seq_printf(m, "Dcache:\t\tno\n");

Expand Down
68 changes: 38 additions & 30 deletions trunk/arch/microblaze/kernel/early_printk.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ static void early_printk_uartlite_putc(char c)
* we'll never timeout on a working UART.
*/

unsigned retries = 10000;
unsigned retries = 1000000;
/* read status bit - 0x8 offset */
while (--retries && (in_be32(base_addr + 8) & (1 << 3)))
;
Expand All @@ -60,7 +60,7 @@ static void early_printk_uartlite_write(struct console *unused,
static struct console early_serial_uartlite_console = {
.name = "earlyser",
.write = early_printk_uartlite_write,
.flags = CON_PRINTBUFFER,
.flags = CON_PRINTBUFFER | CON_BOOT,
.index = -1,
};
#endif /* CONFIG_SERIAL_UARTLITE_CONSOLE */
Expand Down Expand Up @@ -104,7 +104,7 @@ static void early_printk_uart16550_write(struct console *unused,
static struct console early_serial_uart16550_console = {
.name = "earlyser",
.write = early_printk_uart16550_write,
.flags = CON_PRINTBUFFER,
.flags = CON_PRINTBUFFER | CON_BOOT,
.index = -1,
};
#endif /* CONFIG_SERIAL_8250_CONSOLE */
Expand All @@ -127,48 +127,56 @@ void early_printk(const char *fmt, ...)

int __init setup_early_printk(char *opt)
{
int version = 0;

if (early_console_initialized)
return 1;

#ifdef CONFIG_SERIAL_UARTLITE_CONSOLE
base_addr = early_uartlite_console();
base_addr = of_early_console(&version);
if (base_addr) {
early_console_initialized = 1;
#ifdef CONFIG_MMU
early_console_reg_tlb_alloc(base_addr);
#endif
early_console = &early_serial_uartlite_console;
early_printk("early_printk_console is enabled at 0x%08x\n",
base_addr);

/* register_console(early_console); */

return 0;
}
#endif /* CONFIG_SERIAL_UARTLITE_CONSOLE */

switch (version) {
#ifdef CONFIG_SERIAL_UARTLITE_CONSOLE
case UARTLITE:
printk(KERN_INFO "Early console on uartlite "
"at 0x%08x\n", base_addr);
early_console = &early_serial_uartlite_console;
break;
#endif
#ifdef CONFIG_SERIAL_8250_CONSOLE
base_addr = early_uart16550_console();
base_addr &= ~3; /* clear register offset */
if (base_addr) {
early_console_initialized = 1;
#ifdef CONFIG_MMU
early_console_reg_tlb_alloc(base_addr);
case UART16550:
printk(KERN_INFO "Early console on uart16650 "
"at 0x%08x\n", base_addr);
early_console = &early_serial_uart16550_console;
break;
#endif
early_console = &early_serial_uart16550_console;

early_printk("early_printk_console is enabled at 0x%08x\n",
base_addr);

/* register_console(early_console); */
default:
printk(KERN_INFO "Unsupported early console %d\n",
version);
return 1;
}

register_console(early_console);
early_console_initialized = 1;
return 0;
}
#endif /* CONFIG_SERIAL_8250_CONSOLE */

return 1;
}

/* Remap early console to virtual address and do not allocate one TLB
* only for early console because of performance degression */
void __init remap_early_printk(void)
{
if (!early_console_initialized || !early_console)
return;
printk(KERN_INFO "early_printk_console remaping from 0x%x to ",
base_addr);
base_addr = (u32) ioremap(base_addr, PAGE_SIZE);
printk(KERN_CONT "0x%x\n", base_addr);
}

void __init disable_early_printk(void)
{
if (!early_console_initialized || !early_console)
Expand Down
Loading

0 comments on commit eb5b758

Please sign in to comment.