Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 18841
b: refs/heads/master
c: d1138cf
h: refs/heads/master
i:
  18839: 081ecc0
v: v3
  • Loading branch information
Linus Torvalds committed Jan 18, 2006
1 parent 6fb95c0 commit 01b9e02
Show file tree
Hide file tree
Showing 44 changed files with 569 additions and 594 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: 77783a78ded96a56e3a1a0c03bbe87c56896fe6e
refs/heads/master: d1138cf035ad5a8dc0796b213bd078a2fb92eb7c
13 changes: 6 additions & 7 deletions trunk/arch/sparc/mm/iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -295,8 +295,7 @@ static void iommu_release_one(u32 busa, int npages, struct sbus_bus *sbus)
int ioptex;
int i;

if (busa < iommu->start)
BUG();
BUG_ON(busa < iommu->start);
ioptex = (busa - iommu->start) >> PAGE_SHIFT;
for (i = 0; i < npages; i++) {
iopte_val(iommu->page_table[ioptex + i]) = 0;
Expand Down Expand Up @@ -340,9 +339,9 @@ static int iommu_map_dma_area(dma_addr_t *pba, unsigned long va,
iopte_t *first;
int ioptex;

if ((va & ~PAGE_MASK) != 0) BUG();
if ((addr & ~PAGE_MASK) != 0) BUG();
if ((len & ~PAGE_MASK) != 0) BUG();
BUG_ON((va & ~PAGE_MASK) != 0);
BUG_ON((addr & ~PAGE_MASK) != 0);
BUG_ON((len & ~PAGE_MASK) != 0);

/* page color = physical address */
ioptex = bit_map_string_get(&iommu->usemap, len >> PAGE_SHIFT,
Expand Down Expand Up @@ -405,8 +404,8 @@ static void iommu_unmap_dma_area(unsigned long busa, int len)
unsigned long end;
int ioptex = (busa - iommu->start) >> PAGE_SHIFT;

if ((busa & ~PAGE_MASK) != 0) BUG();
if ((len & ~PAGE_MASK) != 0) BUG();
BUG_ON((busa & ~PAGE_MASK) != 0);
BUG_ON((len & ~PAGE_MASK) != 0);

iopte += ioptex;
end = busa + len;
Expand Down
22 changes: 11 additions & 11 deletions trunk/arch/sparc64/kernel/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -280,9 +280,9 @@ static struct sparc64_tick_ops stick_operations __read_mostly = {
* Since STICK is constantly updating, we have to access it carefully.
*
* The sequence we use to read is:
* 1) read low
* 2) read high
* 3) read low again, if it rolled over increment high by 1
* 1) read high
* 2) read low
* 3) read high again, if it rolled re-read both low and high again.
*
* Writing STICK safely is also tricky:
* 1) write low to zero
Expand All @@ -295,18 +295,18 @@ static struct sparc64_tick_ops stick_operations __read_mostly = {
static unsigned long __hbird_read_stick(void)
{
unsigned long ret, tmp1, tmp2, tmp3;
unsigned long addr = HBIRD_STICK_ADDR;
unsigned long addr = HBIRD_STICK_ADDR+8;

__asm__ __volatile__("ldxa [%1] %5, %2\n\t"
"add %1, 0x8, %1\n\t"
"ldxa [%1] %5, %3\n\t"
__asm__ __volatile__("ldxa [%1] %5, %2\n"
"1:\n\t"
"sub %1, 0x8, %1\n\t"
"ldxa [%1] %5, %3\n\t"
"add %1, 0x8, %1\n\t"
"ldxa [%1] %5, %4\n\t"
"cmp %4, %2\n\t"
"blu,a,pn %%xcc, 1f\n\t"
" add %3, 1, %3\n"
"1:\n\t"
"sllx %3, 32, %3\n\t"
"bne,a,pn %%xcc, 1b\n\t"
" mov %4, %2\n\t"
"sllx %4, 32, %4\n\t"
"or %3, %4, %0\n\t"
: "=&r" (ret), "=&r" (addr),
"=&r" (tmp1), "=&r" (tmp2), "=&r" (tmp3)
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/net/cassini.c
Original file line number Diff line number Diff line change
Expand Up @@ -1925,8 +1925,8 @@ static void cas_tx(struct net_device *dev, struct cas *cp,
u64 compwb = le64_to_cpu(cp->init_block->tx_compwb);
#endif
if (netif_msg_intr(cp))
printk(KERN_DEBUG "%s: tx interrupt, status: 0x%x, %lx\n",
cp->dev->name, status, compwb);
printk(KERN_DEBUG "%s: tx interrupt, status: 0x%x, %llx\n",
cp->dev->name, status, (unsigned long long)compwb);
/* process all the rings */
for (ring = 0; ring < N_TX_RINGS; ring++) {
#ifdef USE_TX_COMPWB
Expand Down
82 changes: 54 additions & 28 deletions trunk/drivers/net/tg3.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@

#define DRV_MODULE_NAME "tg3"
#define PFX DRV_MODULE_NAME ": "
#define DRV_MODULE_VERSION "3.47"
#define DRV_MODULE_RELDATE "Dec 28, 2005"
#define DRV_MODULE_VERSION "3.48"
#define DRV_MODULE_RELDATE "Jan 16, 2006"

#define TG3_DEF_MAC_MODE 0
#define TG3_DEF_RX_MODE 0
Expand Down Expand Up @@ -1325,10 +1325,12 @@ static int tg3_set_power_state(struct tg3 *tp, int state)
val &= ~((1 << 16) | (1 << 4) | (1 << 2) | (1 << 1) | 1);
tw32(0x7d00, val);
if (!(tp->tg3_flags & TG3_FLAG_ENABLE_ASF)) {
tg3_nvram_lock(tp);
int err;

err = tg3_nvram_lock(tp);
tg3_halt_cpu(tp, RX_CPU_BASE);
tw32_f(NVRAM_SWARB, SWARB_REQ_CLR0);
tg3_nvram_unlock(tp);
if (!err)
tg3_nvram_unlock(tp);
}
}

Expand Down Expand Up @@ -4193,23 +4195,32 @@ static int tg3_nvram_lock(struct tg3 *tp)
if (tp->tg3_flags & TG3_FLAG_NVRAM) {
int i;

tw32(NVRAM_SWARB, SWARB_REQ_SET1);
for (i = 0; i < 8000; i++) {
if (tr32(NVRAM_SWARB) & SWARB_GNT1)
break;
udelay(20);
if (tp->nvram_lock_cnt == 0) {
tw32(NVRAM_SWARB, SWARB_REQ_SET1);
for (i = 0; i < 8000; i++) {
if (tr32(NVRAM_SWARB) & SWARB_GNT1)
break;
udelay(20);
}
if (i == 8000) {
tw32(NVRAM_SWARB, SWARB_REQ_CLR1);
return -ENODEV;
}
}
if (i == 8000)
return -ENODEV;
tp->nvram_lock_cnt++;
}
return 0;
}

/* tp->lock is held. */
static void tg3_nvram_unlock(struct tg3 *tp)
{
if (tp->tg3_flags & TG3_FLAG_NVRAM)
tw32_f(NVRAM_SWARB, SWARB_REQ_CLR1);
if (tp->tg3_flags & TG3_FLAG_NVRAM) {
if (tp->nvram_lock_cnt > 0)
tp->nvram_lock_cnt--;
if (tp->nvram_lock_cnt == 0)
tw32_f(NVRAM_SWARB, SWARB_REQ_CLR1);
}
}

/* tp->lock is held. */
Expand Down Expand Up @@ -4320,8 +4331,13 @@ static int tg3_chip_reset(struct tg3 *tp)
void (*write_op)(struct tg3 *, u32, u32);
int i;

if (!(tp->tg3_flags2 & TG3_FLG2_SUN_570X))
if (!(tp->tg3_flags2 & TG3_FLG2_SUN_570X)) {
tg3_nvram_lock(tp);
/* No matching tg3_nvram_unlock() after this because
* chip reset below will undo the nvram lock.
*/
tp->nvram_lock_cnt = 0;
}

/*
* We must avoid the readl() that normally takes place.
Expand Down Expand Up @@ -4717,6 +4733,10 @@ static int tg3_halt_cpu(struct tg3 *tp, u32 offset)
(offset == RX_CPU_BASE ? "RX" : "TX"));
return -ENODEV;
}

/* Clear firmware's nvram arbitration. */
if (tp->tg3_flags & TG3_FLAG_NVRAM)
tw32(NVRAM_SWARB, SWARB_REQ_CLR0);
return 0;
}

Expand All @@ -4736,7 +4756,7 @@ struct fw_info {
static int tg3_load_firmware_cpu(struct tg3 *tp, u32 cpu_base, u32 cpu_scratch_base,
int cpu_scratch_size, struct fw_info *info)
{
int err, i;
int err, lock_err, i;
void (*write_op)(struct tg3 *, u32, u32);

if (cpu_base == TX_CPU_BASE &&
Expand All @@ -4755,9 +4775,10 @@ static int tg3_load_firmware_cpu(struct tg3 *tp, u32 cpu_base, u32 cpu_scratch_b
/* It is possible that bootcode is still loading at this point.
* Get the nvram lock first before halting the cpu.
*/
tg3_nvram_lock(tp);
lock_err = tg3_nvram_lock(tp);
err = tg3_halt_cpu(tp, cpu_base);
tg3_nvram_unlock(tp);
if (!lock_err)
tg3_nvram_unlock(tp);
if (err)
goto out;

Expand Down Expand Up @@ -8182,7 +8203,7 @@ static void tg3_self_test(struct net_device *dev, struct ethtool_test *etest,
data[1] = 1;
}
if (etest->flags & ETH_TEST_FL_OFFLINE) {
int irq_sync = 0;
int err, irq_sync = 0;

if (netif_running(dev)) {
tg3_netif_stop(tp);
Expand All @@ -8192,11 +8213,12 @@ static void tg3_self_test(struct net_device *dev, struct ethtool_test *etest,
tg3_full_lock(tp, irq_sync);

tg3_halt(tp, RESET_KIND_SUSPEND, 1);
tg3_nvram_lock(tp);
err = tg3_nvram_lock(tp);
tg3_halt_cpu(tp, RX_CPU_BASE);
if (!(tp->tg3_flags2 & TG3_FLG2_5705_PLUS))
tg3_halt_cpu(tp, TX_CPU_BASE);
tg3_nvram_unlock(tp);
if (!err)
tg3_nvram_unlock(tp);

if (tg3_test_registers(tp) != 0) {
etest->flags |= ETH_TEST_FL_FAILED;
Expand Down Expand Up @@ -8588,7 +8610,11 @@ static void __devinit tg3_nvram_init(struct tg3 *tp)
GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5701) {
tp->tg3_flags |= TG3_FLAG_NVRAM;

tg3_nvram_lock(tp);
if (tg3_nvram_lock(tp)) {
printk(KERN_WARNING PFX "%s: Cannot get nvarm lock, "
"tg3_nvram_init failed.\n", tp->dev->name);
return;
}
tg3_enable_nvram_access(tp);

if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5752)
Expand Down Expand Up @@ -8686,7 +8712,9 @@ static int tg3_nvram_read(struct tg3 *tp, u32 offset, u32 *val)
if (offset > NVRAM_ADDR_MSK)
return -EINVAL;

tg3_nvram_lock(tp);
ret = tg3_nvram_lock(tp);
if (ret)
return ret;

tg3_enable_nvram_access(tp);

Expand Down Expand Up @@ -8785,10 +8813,6 @@ static int tg3_nvram_write_block_unbuffered(struct tg3 *tp, u32 offset, u32 len,

offset = offset + (pagesize - page_off);

/* Nvram lock released by tg3_nvram_read() above,
* so need to get it again.
*/
tg3_nvram_lock(tp);
tg3_enable_nvram_access(tp);

/*
Expand Down Expand Up @@ -8925,7 +8949,9 @@ static int tg3_nvram_write_block(struct tg3 *tp, u32 offset, u32 len, u8 *buf)
else {
u32 grc_mode;

tg3_nvram_lock(tp);
ret = tg3_nvram_lock(tp);
if (ret)
return ret;

tg3_enable_nvram_access(tp);
if ((tp->tg3_flags2 & TG3_FLG2_5750_PLUS) &&
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/net/tg3.h
Original file line number Diff line number Diff line change
Expand Up @@ -2275,6 +2275,7 @@ struct tg3 {
dma_addr_t stats_mapping;
struct work_struct reset_task;

int nvram_lock_cnt;
u32 nvram_size;
u32 nvram_pagesize;
u32 nvram_jedecnum;
Expand Down
9 changes: 3 additions & 6 deletions trunk/drivers/video/sbuslib.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,7 @@ struct fbcmap32 {
#define FBIOPUTCMAP32 _IOW('F', 3, struct fbcmap32)
#define FBIOGETCMAP32 _IOW('F', 4, struct fbcmap32)

static int fbiogetputcmap(struct file *file, struct fb_info *info,
unsigned int cmd, unsigned long arg)
static int fbiogetputcmap(struct fb_info *info, unsigned int cmd, unsigned long arg)
{
struct fbcmap32 __user *argp = (void __user *)arg;
struct fbcmap __user *p = compat_alloc_user_space(sizeof(*p));
Expand Down Expand Up @@ -236,8 +235,7 @@ struct fbcursor32 {
#define FBIOSCURSOR32 _IOW('F', 24, struct fbcursor32)
#define FBIOGCURSOR32 _IOW('F', 25, struct fbcursor32)

static int fbiogscursor(struct file *file, struct fb_info *info,
unsigned long arg)
static int fbiogscursor(struct fb_info *info, unsigned long arg)
{
struct fbcursor __user *p = compat_alloc_user_space(sizeof(*p));
struct fbcursor32 __user *argp = (void __user *)arg;
Expand All @@ -263,8 +261,7 @@ static int fbiogscursor(struct file *file, struct fb_info *info,
return info->fbops->fb_ioctl(info, FBIOSCURSOR, (unsigned long)p);
}

long sbusfb_compat_ioctl(struct fb_info *info, unsigned int cmd,
unsigned long arg)
int sbusfb_compat_ioctl(struct fb_info *info, unsigned int cmd, unsigned long arg)
{
switch (cmd) {
case FBIOGTYPE:
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/video/sbuslib.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ extern int sbusfb_mmap_helper(struct sbus_mmap_map *map,
int sbusfb_ioctl_helper(unsigned long cmd, unsigned long arg,
struct fb_info *info,
int type, int fb_depth, unsigned long fb_size);
long sbusfb_compat_ioctl(struct fb_info *info, unsigned int cmd,
int sbusfb_compat_ioctl(struct fb_info *info, unsigned int cmd,
unsigned long arg);

#endif /* _SBUSLIB_H */
4 changes: 2 additions & 2 deletions trunk/include/asm-powerpc/lppaca.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

/* The Hypervisor barfs if the lppaca crosses a page boundary. A 1k
* alignment is sufficient to prevent this */
struct __attribute__((__aligned__(0x400))) lppaca {
struct lppaca {
//=============================================================================
// CACHE_LINE_1 0x0000 - 0x007F Contains read-only data
// NOTE: The xDynXyz fields are fields that will be dynamically changed by
Expand Down Expand Up @@ -129,7 +129,7 @@ struct __attribute__((__aligned__(0x400))) lppaca {
// CACHE_LINE_4-5 0x0100 - 0x01FF Contains PMC interrupt data
//=============================================================================
u8 pmc_save_area[256]; // PMC interrupt Area x00-xFF
};
} __attribute__((__aligned__(0x400)));

extern struct lppaca lppaca[];

Expand Down
1 change: 1 addition & 0 deletions trunk/include/linux/kernel.h
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ extern void dump_stack(void);
ntohs((addr).s6_addr16[6]), \
ntohs((addr).s6_addr16[7])
#define NIP6_FMT "%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x"
#define NIP6_SEQFMT "%04x%04x%04x%04x%04x%04x%04x%04x"

#if defined(__LITTLE_ENDIAN)
#define HIPQUAD(addr) \
Expand Down
9 changes: 0 additions & 9 deletions trunk/include/linux/netfilter_ipv6/ip6t_ah.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,4 @@ struct ip6t_ah
#define IP6T_AH_INV_LEN 0x02 /* Invert the sense of length. */
#define IP6T_AH_INV_MASK 0x03 /* All possible flags. */

#define MASK_HOPOPTS 128
#define MASK_DSTOPTS 64
#define MASK_ROUTING 32
#define MASK_FRAGMENT 16
#define MASK_AH 8
#define MASK_ESP 4
#define MASK_NONE 2
#define MASK_PROTO 1

#endif /*_IP6T_AH_H*/
9 changes: 0 additions & 9 deletions trunk/include/linux/netfilter_ipv6/ip6t_esp.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,6 @@ struct ip6t_esp
u_int8_t invflags; /* Inverse flags */
};

#define MASK_HOPOPTS 128
#define MASK_DSTOPTS 64
#define MASK_ROUTING 32
#define MASK_FRAGMENT 16
#define MASK_AH 8
#define MASK_ESP 4
#define MASK_NONE 2
#define MASK_PROTO 1

/* Values for "invflags" field in struct ip6t_esp. */
#define IP6T_ESP_INV_SPI 0x01 /* Invert the sense of spi. */
#define IP6T_ESP_INV_MASK 0x01 /* All possible flags. */
Expand Down
9 changes: 0 additions & 9 deletions trunk/include/linux/netfilter_ipv6/ip6t_frag.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,4 @@ struct ip6t_frag
#define IP6T_FRAG_INV_LEN 0x02 /* Invert the sense of length. */
#define IP6T_FRAG_INV_MASK 0x03 /* All possible flags. */

#define MASK_HOPOPTS 128
#define MASK_DSTOPTS 64
#define MASK_ROUTING 32
#define MASK_FRAGMENT 16
#define MASK_AH 8
#define MASK_ESP 4
#define MASK_NONE 2
#define MASK_PROTO 1

#endif /*_IP6T_FRAG_H*/
Loading

0 comments on commit 01b9e02

Please sign in to comment.