Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 26570
b: refs/heads/master
c: d324031
h: refs/heads/master
v: v3
  • Loading branch information
Stephen Hemminger committed May 8, 2006
1 parent 63d8d04 commit 3e2dec4
Show file tree
Hide file tree
Showing 11 changed files with 65 additions and 56 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: c51e078f82096a7d35ac8ec2416272e843a0e1c4
refs/heads/master: d324031245abbb54e4e0321004430826052b6c37
4 changes: 4 additions & 0 deletions trunk/arch/ppc/kernel/head_8xx.S
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,9 @@ InstructionTLBMiss:

. = 0x1200
DataStoreTLBMiss:
#ifdef CONFIG_8xx_CPU6
stw r3, 8(r0)
#endif
DO_8xx_CPU6(0x3f80, r3)
mtspr SPRN_M_TW, r10 /* Save a couple of working registers */
mfcr r10
Expand Down Expand Up @@ -415,7 +417,9 @@ DataStoreTLBMiss:
lwz r11, 0(r0)
mtcr r11
lwz r11, 4(r0)
#ifdef CONFIG_8xx_CPU6
lwz r3, 8(r0)
#endif
rfi

/* This is an instruction TLB error on the MPC8xx. This could be due
Expand Down
20 changes: 4 additions & 16 deletions trunk/drivers/net/sky2.c
Original file line number Diff line number Diff line change
Expand Up @@ -2105,7 +2105,6 @@ static int sky2_poll(struct net_device *dev0, int *budget)
int work_done = 0;
u32 status = sky2_read32(hw, B0_Y2_SP_EISR);

restart_poll:
if (unlikely(status & ~Y2_IS_STAT_BMU)) {
if (status & Y2_IS_HW_ERR)
sky2_hw_intr(hw);
Expand Down Expand Up @@ -2136,7 +2135,7 @@ static int sky2_poll(struct net_device *dev0, int *budget)
}

if (status & Y2_IS_STAT_BMU) {
work_done += sky2_status_intr(hw, work_limit - work_done);
work_done = sky2_status_intr(hw, work_limit);
*budget -= work_done;
dev0->quota -= work_done;

Expand All @@ -2148,22 +2147,9 @@ static int sky2_poll(struct net_device *dev0, int *budget)

mod_timer(&hw->idle_timer, jiffies + HZ);

local_irq_disable();
__netif_rx_complete(dev0);
netif_rx_complete(dev0);

status = sky2_read32(hw, B0_Y2_SP_LISR);

if (unlikely(status)) {
/* More work pending, try and keep going */
if (__netif_rx_schedule_prep(dev0)) {
__netif_rx_reschedule(dev0, work_done);
status = sky2_read32(hw, B0_Y2_SP_EISR);
local_irq_enable();
goto restart_poll;
}
}

local_irq_enable();
return 0;
}

Expand All @@ -2181,6 +2167,8 @@ static irqreturn_t sky2_intr(int irq, void *dev_id, struct pt_regs *regs)
prefetch(&hw->st_le[hw->st_idx]);
if (likely(__netif_rx_schedule_prep(dev0)))
__netif_rx_schedule(dev0);
else
printk(KERN_DEBUG PFX "irq race detected\n");

return IRQ_HANDLED;
}
Expand Down
5 changes: 1 addition & 4 deletions trunk/fs/xfs/xfs_alloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1942,10 +1942,8 @@ xfs_alloc_fix_freelist(
/*
* Allocate as many blocks as possible at once.
*/
if ((error = xfs_alloc_ag_vextent(&targs))) {
xfs_trans_brelse(tp, agflbp);
if ((error = xfs_alloc_ag_vextent(&targs)))
return error;
}
/*
* Stop if we run out. Won't happen if callers are obeying
* the restrictions correctly. Can happen for free calls
Expand All @@ -1962,7 +1960,6 @@ xfs_alloc_fix_freelist(
return error;
}
}
xfs_trans_brelse(tp, agflbp);
args->agbp = agbp;
return 0;
}
Expand Down
12 changes: 0 additions & 12 deletions trunk/fs/xfs/xfs_rename.c
Original file line number Diff line number Diff line change
Expand Up @@ -316,18 +316,6 @@ xfs_rename(
}
}

/*
* If we are using project inheritance, we only allow renames
* into our tree when the project IDs are the same; else the
* tree quota mechanism would be circumvented.
*/
if (unlikely((target_dp->i_d.di_flags & XFS_DIFLAG_PROJINHERIT) &&
(target_dp->i_d.di_projid != src_ip->i_d.di_projid))) {
error = XFS_ERROR(EXDEV);
xfs_rename_unlock4(inodes, XFS_ILOCK_SHARED);
goto rele_return;
}

new_parent = (src_dp != target_dp);
src_is_directory = ((src_ip->i_d.di_mode & S_IFMT) == S_IFDIR);

Expand Down
27 changes: 18 additions & 9 deletions trunk/fs/xfs/xfs_vfsops.c
Original file line number Diff line number Diff line change
Expand Up @@ -669,22 +669,31 @@ xfs_mntupdate(
xfs_mount_t *mp = XFS_BHVTOM(bdp);
int error;

if (!(*flags & MS_RDONLY)) { /* rw/ro -> rw */
if (vfsp->vfs_flag & VFS_RDONLY)
vfsp->vfs_flag &= ~VFS_RDONLY;
if (args->flags & XFSMNT_BARRIER) {
mp->m_flags |= XFS_MOUNT_BARRIER;
if (args->flags & XFSMNT_BARRIER)
mp->m_flags |= XFS_MOUNT_BARRIER;
else
mp->m_flags &= ~XFS_MOUNT_BARRIER;

if ((vfsp->vfs_flag & VFS_RDONLY) &&
!(*flags & MS_RDONLY)) {
vfsp->vfs_flag &= ~VFS_RDONLY;

if (args->flags & XFSMNT_BARRIER)
xfs_mountfs_check_barriers(mp);
} else {
mp->m_flags &= ~XFS_MOUNT_BARRIER;
}
} else if (!(vfsp->vfs_flag & VFS_RDONLY)) { /* rw -> ro */
}

if (!(vfsp->vfs_flag & VFS_RDONLY) &&
(*flags & MS_RDONLY)) {
VFS_SYNC(vfsp, SYNC_FSDATA|SYNC_BDFLUSH|SYNC_ATTR, NULL, error);

xfs_quiesce_fs(mp);

/* Ok now write out an unmount record */
xfs_log_unmount_write(mp);
xfs_unmountfs_writesb(mp);
vfsp->vfs_flag |= VFS_RDONLY;
}

return 0;
}

Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/xfs/xfs_vnodeops.c
Original file line number Diff line number Diff line change
Expand Up @@ -2663,7 +2663,7 @@ xfs_link(
*/
if (unlikely((tdp->i_d.di_flags & XFS_DIFLAG_PROJINHERIT) &&
(tdp->i_d.di_projid != sip->i_d.di_projid))) {
error = XFS_ERROR(EXDEV);
error = XFS_ERROR(EPERM);
goto error_return;
}

Expand Down
1 change: 0 additions & 1 deletion trunk/include/asm-ppc/page.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
/* This must match what is in arch/ppc/Makefile */
#define PAGE_OFFSET CONFIG_KERNEL_START
#define KERNELBASE PAGE_OFFSET
#define is_kernel_addr(x) ((x) >= PAGE_OFFSET)

#ifndef __ASSEMBLY__

Expand Down
18 changes: 8 additions & 10 deletions trunk/include/linux/netdevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -831,21 +831,19 @@ static inline void netif_rx_schedule(struct net_device *dev)
__netif_rx_schedule(dev);
}


static inline void __netif_rx_reschedule(struct net_device *dev, int undo)
{
dev->quota += undo;
list_add_tail(&dev->poll_list, &__get_cpu_var(softnet_data).poll_list);
__raise_softirq_irqoff(NET_RX_SOFTIRQ);
}

/* Try to reschedule poll. Called by dev->poll() after netif_rx_complete(). */
/* Try to reschedule poll. Called by dev->poll() after netif_rx_complete().
* Do not inline this?
*/
static inline int netif_rx_reschedule(struct net_device *dev, int undo)
{
if (netif_rx_schedule_prep(dev)) {
unsigned long flags;

dev->quota += undo;

local_irq_save(flags);
__netif_rx_reschedule(dev, undo);
list_add_tail(&dev->poll_list, &__get_cpu_var(softnet_data).poll_list);
__raise_softirq_irqoff(NET_RX_SOFTIRQ);
local_irq_restore(flags);
return 1;
}
Expand Down
11 changes: 9 additions & 2 deletions trunk/scripts/mod/modpost.c
Original file line number Diff line number Diff line change
Expand Up @@ -709,10 +709,17 @@ static void check_sec_ref(struct module *mod, const char *modname,
for (rela = start; rela < stop; rela++) {
Elf_Rela r;
const char *secname;
unsigned int r_sym;
r.r_offset = TO_NATIVE(rela->r_offset);
r.r_info = TO_NATIVE(rela->r_info);
if (hdr->e_ident[EI_CLASS] == ELFCLASS64 &&
hdr->e_machine == EM_MIPS) {
r_sym = ELF64_MIPS_R_SYM(rela->r_info);
r_sym = TO_NATIVE(r_sym);
} else {
r_sym = ELF_R_SYM(TO_NATIVE(rela->r_info));
}
r.r_addend = TO_NATIVE(rela->r_addend);
sym = elf->symtab_start + ELF_R_SYM(r.r_info);
sym = elf->symtab_start + r_sym;
/* Skip special sections */
if (sym->st_shndx >= SHN_LORESERVE)
continue;
Expand Down
19 changes: 19 additions & 0 deletions trunk/scripts/mod/modpost.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,25 @@
#define ELF_R_TYPE ELF64_R_TYPE
#endif

/* The 64-bit MIPS ELF ABI uses an unusual reloc format. */
typedef struct
{
Elf32_Word r_sym; /* Symbol index */
unsigned char r_ssym; /* Special symbol for 2nd relocation */
unsigned char r_type3; /* 3rd relocation type */
unsigned char r_type2; /* 2nd relocation type */
unsigned char r_type1; /* 1st relocation type */
} _Elf64_Mips_R_Info;

typedef union
{
Elf64_Xword r_info_number;
_Elf64_Mips_R_Info r_info_fields;
} _Elf64_Mips_R_Info_union;

#define ELF64_MIPS_R_SYM(i) \
((__extension__ (_Elf64_Mips_R_Info_union)(i)).r_info_fields.r_sym)

#if KERNEL_ELFDATA != HOST_ELFDATA

static inline void __endian(const void *src, void *dest, unsigned int size)
Expand Down

0 comments on commit 3e2dec4

Please sign in to comment.