Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 64107
b: refs/heads/master
c: 5056836
h: refs/heads/master
i:
  64105: dc5773c
  64103: 1dca425
v: v3
  • Loading branch information
Linus Torvalds committed Aug 18, 2007
1 parent 671b693 commit dd2a143
Show file tree
Hide file tree
Showing 81 changed files with 1,168 additions and 253 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: 3ad40d647d5e7c320385649e5eb422a5e89e035d
refs/heads/master: 505683675cf0ed903765f160ad633f77ab90a9d4
2 changes: 1 addition & 1 deletion trunk/MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -1009,7 +1009,7 @@ P: Steve French
M: sfrench@samba.org
L: linux-cifs-client@lists.samba.org
L: samba-technical@lists.samba.org
W: http://us1.samba.org/samba/Linux_CIFS_client.html
W: http://linux-cifs.samba.org/
T: git kernel.org:/pub/scm/linux/kernel/git/sfrench/cifs-2.6.git
S: Supported

Expand Down
18 changes: 18 additions & 0 deletions trunk/arch/avr32/boards/atngw100/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*/
#include <linux/clk.h>
#include <linux/etherdevice.h>
#include <linux/i2c-gpio.h>
#include <linux/init.h>
#include <linux/linkage.h>
#include <linux/platform_device.h>
Expand Down Expand Up @@ -123,6 +124,19 @@ static struct platform_device ngw_gpio_leds = {
}
};

static struct i2c_gpio_platform_data i2c_gpio_data = {
.sda_pin = GPIO_PIN_PA(6),
.scl_pin = GPIO_PIN_PA(7),
};

static struct platform_device i2c_gpio_device = {
.name = "i2c-gpio",
.id = 0,
.dev = {
.platform_data = &i2c_gpio_data,
},
};

static int __init atngw100_init(void)
{
unsigned i;
Expand All @@ -147,6 +161,10 @@ static int __init atngw100_init(void)
}
platform_device_register(&ngw_gpio_leds);

at32_select_gpio(i2c_gpio_data.sda_pin, 0);
at32_select_gpio(i2c_gpio_data.scl_pin, 0);
platform_device_register(&i2c_gpio_device);

return 0;
}
postcore_initcall(atngw100_init);
26 changes: 26 additions & 0 deletions trunk/arch/avr32/boards/atstk1000/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,30 @@ config BOARD_ATSTK1002_SPI1
GPIO lines and accessed through the J1 jumper block. Say "y"
here to configure that SPI controller.

config BOARD_ATSTK1002_J2_LED
bool
default BOARD_ATSTK1002_J2_LED8 || BOARD_ATSTK1002_J2_RGB

choice
prompt "LEDs connected to J2:"
depends on LEDS_GPIO && !BOARD_ATSTK1002_SW4_CUSTOM
optional
help
Select this if you have jumpered the J2 jumper block to the
LED0..LED7 amber leds, or to the RGB leds, using a ten-pin
IDC cable. A default "heartbeat" trigger is provided, but
you can of course override this.

config BOARD_ATSTK1002_J2_LED8
bool "LED0..LED7"
help
Select this if J2 is jumpered to LED0..LED7 amber leds.

config BOARD_ATSTK1002_J2_RGB
bool "RGB leds"
help
Select this if J2 is jumpered to the RGB leds.

endchoice

endif # stk 1002
62 changes: 62 additions & 0 deletions trunk/arch/avr32/boards/atstk1000/atstk1002.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <linux/etherdevice.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/leds.h>
#include <linux/platform_device.h>
#include <linux/string.h>
#include <linux/types.h>
Expand Down Expand Up @@ -120,6 +121,65 @@ static void __init set_hw_addr(struct platform_device *pdev)
clk_put(pclk);
}

#ifdef CONFIG_BOARD_ATSTK1002_J2_LED

static struct gpio_led stk_j2_led[] = {
#ifdef CONFIG_BOARD_ATSTK1002_J2_LED8
#define LEDSTRING "J2 jumpered to LED8"
{ .name = "led0:amber", .gpio = GPIO_PIN_PB( 8), },
{ .name = "led1:amber", .gpio = GPIO_PIN_PB( 9), },
{ .name = "led2:amber", .gpio = GPIO_PIN_PB(10), },
{ .name = "led3:amber", .gpio = GPIO_PIN_PB(13), },
{ .name = "led4:amber", .gpio = GPIO_PIN_PB(14), },
{ .name = "led5:amber", .gpio = GPIO_PIN_PB(15), },
{ .name = "led6:amber", .gpio = GPIO_PIN_PB(16), },
{ .name = "led7:amber", .gpio = GPIO_PIN_PB(30),
.default_trigger = "heartbeat", },
#else /* RGB */
#define LEDSTRING "J2 jumpered to RGB LEDs"
{ .name = "r1:red", .gpio = GPIO_PIN_PB( 8), },
{ .name = "g1:green", .gpio = GPIO_PIN_PB(10), },
{ .name = "b1:blue", .gpio = GPIO_PIN_PB(14), },

{ .name = "r2:red", .gpio = GPIO_PIN_PB( 9),
.default_trigger = "heartbeat", },
{ .name = "g2:green", .gpio = GPIO_PIN_PB(13), },
{ .name = "b2:blue", .gpio = GPIO_PIN_PB(15),
.default_trigger = "heartbeat", },
/* PB16, PB30 unused */
#endif
};

static struct gpio_led_platform_data stk_j2_led_data = {
.num_leds = ARRAY_SIZE(stk_j2_led),
.leds = stk_j2_led,
};

static struct platform_device stk_j2_led_dev = {
.name = "leds-gpio",
.id = 2, /* gpio block J2 */
.dev = {
.platform_data = &stk_j2_led_data,
},
};

static void setup_j2_leds(void)
{
unsigned i;

for (i = 0; i < ARRAY_SIZE(stk_j2_led); i++)
at32_select_gpio(stk_j2_led[i].gpio, AT32_GPIOF_OUTPUT);

printk("STK1002: " LEDSTRING "\n");
platform_device_register(&stk_j2_led_dev);
}

#else
static void setup_j2_leds(void)
{
}
#endif

void __init setup_board(void)
{
#ifdef CONFIG_BOARD_ATSTK1002_SW2_CUSTOM
Expand Down Expand Up @@ -185,6 +245,8 @@ static int __init atstk1002_init(void)
at32_add_device_ssc(0, ATMEL_SSC_TX);
#endif

setup_j2_leds();

return 0;
}
postcore_initcall(atstk1002_init);
54 changes: 12 additions & 42 deletions trunk/arch/i386/boot/edd.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,40 +19,12 @@

#if defined(CONFIG_EDD) || defined(CONFIG_EDD_MODULE)

struct edd_dapa {
u8 pkt_size;
u8 rsvd;
u16 sector_cnt;
u16 buf_off, buf_seg;
u64 lba;
u64 buf_lin_addr;
};

/*
* Read the MBR (first sector) from a specific device.
*/
static int read_mbr(u8 devno, void *buf)
{
struct edd_dapa dapa;
u16 ax, bx, cx, dx, si;

memset(&dapa, 0, sizeof dapa);
dapa.pkt_size = sizeof(dapa);
dapa.sector_cnt = 1;
dapa.buf_off = (size_t)buf;
dapa.buf_seg = ds();
/* dapa.lba = 0; */

ax = 0x4200; /* Extended Read */
si = (size_t)&dapa;
dx = devno;
asm("pushfl; stc; int $0x13; setc %%al; popfl"
: "+a" (ax), "+S" (si), "+d" (dx)
: "m" (dapa)
: "ebx", "ecx", "edi", "memory");

if (!(u8)ax)
return 0; /* OK */
u16 ax, bx, cx, dx;

ax = 0x0201; /* Legacy Read, one sector */
cx = 0x0001; /* Sector 0-0-1 */
Expand All @@ -65,11 +37,10 @@ static int read_mbr(u8 devno, void *buf)
return -(u8)ax; /* 0 or -1 */
}

static u32 read_mbr_sig(u8 devno, struct edd_info *ei)
static u32 read_mbr_sig(u8 devno, struct edd_info *ei, u32 *mbrsig)
{
int sector_size;
char *mbrbuf_ptr, *mbrbuf_end;
u32 mbrsig;
u32 buf_base, mbr_base;
extern char _end[];

Expand All @@ -85,15 +56,15 @@ static u32 read_mbr_sig(u8 devno, struct edd_info *ei)

/* Make sure we actually have space on the heap... */
if (!(boot_params.hdr.loadflags & CAN_USE_HEAP))
return 0;
return -1;
if (mbrbuf_end > (char *)(size_t)boot_params.hdr.heap_end_ptr)
return 0;
return -1;

if (read_mbr(devno, mbrbuf_ptr))
return 0;
return -1;

mbrsig = *(u32 *)&mbrbuf_ptr[EDD_MBR_SIG_OFFSET];
return mbrsig;
*mbrsig = *(u32 *)&mbrbuf_ptr[EDD_MBR_SIG_OFFSET];
return 0;
}

static int get_edd_info(u8 devno, struct edd_info *ei)
Expand Down Expand Up @@ -160,6 +131,7 @@ void query_edd(void)
int do_edd = 1;
int devno;
struct edd_info ei, *edp;
u32 *mbrptr;

if (cmdline_find_option("edd", eddarg, sizeof eddarg) > 0) {
if (!strcmp(eddarg, "skipmbr") || !strcmp(eddarg, "skip"))
Expand All @@ -168,7 +140,8 @@ void query_edd(void)
do_edd = 0;
}

edp = (struct edd_info *)boot_params.eddbuf;
edp = boot_params.eddbuf;
mbrptr = boot_params.edd_mbr_sig_buffer;

if (!do_edd)
return;
Expand All @@ -186,11 +159,8 @@ void query_edd(void)
boot_params.eddbuf_entries++;
}

if (do_mbr) {
u32 mbr_sig;
mbr_sig = read_mbr_sig(devno, &ei);
boot_params.edd_mbr_sig_buffer[devno-0x80] = mbr_sig;
}
if (do_mbr && !read_mbr_sig(devno, &ei, mbrptr++))
boot_params.edd_mbr_sig_buf_entries = devno-0x80+1;
}
}

Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/i386/boot/video.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ static void store_video_mode(void)

/* Not all BIOSes are clean with respect to the top bit */
boot_params.screen_info.orig_video_mode = ax & 0x7f;
boot_params.screen_info.orig_video_page = page;
boot_params.screen_info.orig_video_page = page >> 8;
}

/*
Expand Down
18 changes: 0 additions & 18 deletions trunk/arch/powerpc/boot/flatdevtree.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,20 +134,6 @@ static char *ft_next(struct ft_cxt *cxt, char *p, struct ft_atom *ret)
#define HDR_SIZE _ALIGN(sizeof(struct boot_param_header), 8)
#define EXPAND_INCR 1024 /* alloc this much extra when expanding */

/* See if the regions are in the standard order and non-overlapping */
static int ft_ordered(struct ft_cxt *cxt)
{
char *p = (char *)cxt->bph + HDR_SIZE;
enum ft_rgn_id r;

for (r = FT_RSVMAP; r <= FT_STRINGS; ++r) {
if (p > cxt->rgn[r].start)
return 0;
p = cxt->rgn[r].start + cxt->rgn[r].size;
}
return p <= (char *)cxt->bph + cxt->max_size;
}

/* Copy the tree to a newly-allocated region and put things in order */
static int ft_reorder(struct ft_cxt *cxt, int nextra)
{
Expand Down Expand Up @@ -573,10 +559,6 @@ int ft_open(struct ft_cxt *cxt, void *blob, unsigned int max_size,
cxt->rgn[FT_STRUCT].size = struct_size(cxt);
cxt->rgn[FT_STRINGS].start = blob + be32_to_cpu(bph->off_dt_strings);
cxt->rgn[FT_STRINGS].size = be32_to_cpu(bph->dt_strings_size);
/* Leave as '0' to force first ft_make_space call to do a ft_reorder
* and move dt to an area allocated by realloc.
cxt->isordered = ft_ordered(cxt);
*/

cxt->p = cxt->rgn[FT_STRUCT].start;
cxt->str_anchor = cxt->rgn[FT_STRINGS].start;
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/powerpc/kernel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ obj-y += iomap.o
endif

ifeq ($(CONFIG_PPC_ISERIES),y)
CFLAGS_lparmap.s += -g0
extra-y += lparmap.s
$(obj)/head_64.o: $(obj)/lparmap.s
AFLAGS_head_64.o += -I$(obj)
Expand Down
12 changes: 11 additions & 1 deletion trunk/arch/powerpc/kernel/misc_32.S
Original file line number Diff line number Diff line change
Expand Up @@ -301,9 +301,19 @@ _GLOBAL(_tlbie)
mfspr r4,SPRN_MMUCR
mfspr r5,SPRN_PID /* Get PID */
rlwimi r4,r5,0,24,31 /* Set TID */
mtspr SPRN_MMUCR,r4

/* We have to run the search with interrupts disabled, even critical
* and debug interrupts (in fact the only critical exceptions we have
* are debug and machine check). Otherwise an interrupt which causes
* a TLB miss can clobber the MMUCR between the mtspr and the tlbsx. */
mfmsr r5
lis r6,(MSR_EE|MSR_CE|MSR_ME|MSR_DE)@ha
addi r6,r6,(MSR_EE|MSR_CE|MSR_ME|MSR_DE)@l
andc r6,r5,r6
mtmsr r6
mtspr SPRN_MMUCR,r4
tlbsx. r3, 0, r3
mtmsr r5
bne 10f
sync
/* There are only 64 TLB entries, so r3 < 64,
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/powerpc/mm/hash_utils_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -795,7 +795,7 @@ void hash_preload(struct mm_struct *mm, unsigned long ea,

#ifdef CONFIG_PPC_MM_SLICES
/* We only prefault standard pages for now */
if (unlikely(get_slice_psize(mm, ea) != mm->context.user_psize));
if (unlikely(get_slice_psize(mm, ea) != mm->context.user_psize))
return;
#endif

Expand Down
1 change: 1 addition & 0 deletions trunk/arch/powerpc/platforms/cell/spu_syscalls.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ asmlinkage long sys_spu_create(const char __user *name,
if (owner && try_module_get(owner)) {
if (flags & SPU_CREATE_AFFINITY_SPU) {
neighbor = fget_light(neighbor_fd, &fput_needed);
ret = -EBADF;
if (neighbor) {
ret = spufs_calls.create_thread(name, flags,
mode, neighbor);
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/powerpc/platforms/ps3/device-init.c
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ static int ps3_storage_wait_for_device(const struct ps3_repository_device *repo)
notify_event->dev_type == repo->dev_type) {
pr_debug("%s:%u: device ready: dev_id %u\n", __func__,
__LINE__, repo->dev_id);
result = 0;
error = 0;
break;
}

Expand Down
12 changes: 11 additions & 1 deletion trunk/arch/ppc/kernel/misc.S
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,19 @@ _GLOBAL(_tlbie)
mfspr r4,SPRN_MMUCR
mfspr r5,SPRN_PID /* Get PID */
rlwimi r4,r5,0,24,31 /* Set TID */
mtspr SPRN_MMUCR,r4

/* We have to run the search with interrupts disabled, even critical
* and debug interrupts (in fact the only critical exceptions we have
* are debug and machine check). Otherwise an interrupt which causes
* a TLB miss can clobber the MMUCR between the mtspr and the tlbsx. */
mfmsr r5
lis r6,(MSR_EE|MSR_CE|MSR_ME|MSR_DE)@ha
addi r6,r6,(MSR_EE|MSR_CE|MSR_ME|MSR_DE)@l
andc r6,r5,r6
mtmsr r6
mtspr SPRN_MMUCR,r4
tlbsx. r3, 0, r3
mtmsr r5
bne 10f
sync
/* There are only 64 TLB entries, so r3 < 64,
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/sparc/kernel/ebus.c
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@ void __init fill_ebus_device(struct device_node *dp, struct linux_ebus_device *d
sd = &dev->ofdev.dev.archdata;
sd->prom_node = dp;
sd->op = &dev->ofdev;
sd->iommu = dev->bus->ofdev.dev.parent->archdata.iommu;

dev->ofdev.node = dp;
dev->ofdev.dev.parent = &dev->bus->ofdev.dev;
Expand Down
Loading

0 comments on commit dd2a143

Please sign in to comment.